Hadoop各个配置文件的作用

core-site.xml

 其中 fs.defaultFS 配置的地址就是java代码访问的时候的路径,需要配置在java代码中代码中要用IP:9000不能用localhost

 
       
         

          fs.defaultFS
          hdfs://localhost:9000
       
       
          

          io.file.buffer.size
          131072
        
       
         

         hadoop.tmp.dir
         file:/usr/local/hadoop-2.4.1/tmp
         Abase for other temporary   directories.
       
        
            
           ipc.maximum.data.length
           134217728
        

hdfs-site.xml

 dfs.namenode.secondary.http-address 这个地址就是文件系统浏览器访问地址

主namenode有个hdfs协议的访问地址:http://192.168.187.128:50070

secondNamenode有个http协议的访问地址:http://192.168.187.128:50071

 

       

            
                dfs.namenode.secondary.http-address
               localhost:50070
       
     
            

             dfs.namenode.name.dir
             file:/usr/local/hadoop-2.4.1/dfs/name
       
      
            

              dfs.datanode.data.dir
              file:/usr/local/hadoop-2.4.1/dfs/data
       
       
            

               dfs.replication
               3
        
        
            

                dfs.webhdfs.enabled
                true
         

Hadoop各个配置文件的作用_第1张图片 

yarn-site.xml


               yarn.nodemanager.aux-services
               mapreduce_shuffle
        
                                                                        
               yarn.nodemanager.aux-services.mapreduce.shuffle.class
               org.apache.hadoop.mapred.ShuffleHandler
        
        
            
               yarn.resourcemanager.address
               singlehost:8032
       
       
            
               yarn.resourcemanager.scheduler.address
               singlehost:8030
       
       
            
            yarn.resourcemanager.resource-tracker.address
             singlehost:8031
      
      
            
              yarn.resourcemanager.admin.address
               singlehost:8033
       
       
            
               yarn.resourcemanager.webapp.address
               singlehost:8088
       

mapred-site.xml

MapReduce内部的一个通讯地址:singlehost:10020

MapReduce外部web访问的地址:singlehost:19888

 
           
            

             mapreduce.framework.name
             yarn
           
          
        

                  mapreduce.jobhistory.address
                  singlehost:10020
          
          

        
                mapreduce.jobhistory.webapp.address
                singleshost:19888
       

 

你可能感兴趣的:(hadoop)