hadoop only launch local job by default why?

后端 未结 3 2067
孤街浪徒
孤街浪徒 2021-01-05 12:44

I have written my own hadoop program and I can run using pseudo distribute mode in my own laptop, however, when I put the program in the cluster which can run example jar of

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-05 13:42

    LocalJobRunner has been chosen as your configuration most probably has the mapred.job.tracker property set to local or has not been set at all (in which case the default is local). To check, go to "wherever you extracted/installed hadoop"/etc/hadoop/ and see if the file mapred-site.xml exists (for me it did not, a file called mapped-site.xml.template was there). In that file (or create it if it doesn't exist) make sure it has the following property:

    
      
     mapreduce.framework.name  
     yarn  
     
    
    
    • See the source for org.apache.hadoop.mapred.JobClient.init(JobConf)

    What is the value of this configuration property in the hadoop configuration on the machine you are submitting this from? Also confirm that the hadoop executable you are running references this configuration (and that you don't have 2+ installations configured differently) - type which hadoop and trace any symlinks you come across.

    Alternatively you can override this when you submit your job, if you know the JobTracker host and port number using the -jt option:

    hadoop jar MyRandomForest_oob_distance.jar -jt hostname:port hdfs://montana-01:8020/user/randomforest/input/genotype1.txt hdfs://montana-01:8020/user/randomforest/input/phenotype1.txt hdfs://montana-01:8020/user/randomforest/output1_distance/ hdfs://montana-01:8020/user/randomforest/input/genotype101.txt hdfs://montana-01:8020/user/randomforest/input/phenotype101.txt 33 500 1
    

提交回复
热议问题