/bin/bash: line 0: fg: no job control

按照我的步骤走,这些问题都能解决,我使用的IDE是eclipse
1:复制Hadoop的4个配置文件放到src目录下面:core-site.xml,hdfs-site.xml,log4j.properties,mapred-site.xml,yarn-site.xml
 
2:配置mapred-site.xml
复制代码
<configuration>
    <property>
        <name>mapreduce.framework.namename>
        <value>yarnvalue>
    property>
    <property>
        <name>mapred.remote.osname>
        <value>Linuxvalue>
    property>
    <property>
        <name>mapreduce.app-submission.cross-platformname>
        <value>truevalue>
    property>
    <property>
    <name>mapreduce.application.classpathname>
    <value>
        /opt/hadoop-2.6.0/etc/hadoop,
        /opt/hadoop-2.6.0/share/hadoop/common/*,
        /opt/hadoop-2.6.0/share/hadoop/common/lib/*,
        /opt/hadoop-2.6.0/share/hadoop/hdfs/*,
        /opt/hadoop-2.6.0/share/hadoop/hdfs/lib/*,
        /opt/hadoop-2.6.0/share/hadoop/mapreduce/*,
        /opt/hadoop-2.6.0/share/hadoop/mapreduce/lib/*,
        /opt/hadoop-2.6.0/share/hadoop/yarn/*,
        /opt/hadoop-2.6.0/share/hadoop/yarn/lib/*
    value>
property>    
    <property>
        <name>mapreduce.jobhistory.addressname>
        <value>master:10020value>
    property>
       <property>
                <name>mapreduce.jobhistory.webapp.addressname>
                <value>master:19888value>
        property>
configuration>
复制代码

 

注意mapreduce.application.classpath一定是绝对路径,不要搞什么$HADOOP_HOME,我这里反正是报错的
 
3:修改yarn-site.xml
  1. 复制代码
    <configuration>
    
      <property>
            <name>yarn.nodemanager.aux-servicesname>
            <value>mapreduce_shufflevalue>
        property>
        <property>
            <name>yarn.resourcemanager.addressname>
            <value>master:8032value>
        property>
    <property>
        <name>yarn.application.classpathname>
        <value>
            /opt/hadoop-2.6.0/etc/hadoop,
            /opt/hadoop-2.6.0/share/hadoop/common/*,
            /opt/hadoop-2.6.0/share/hadoop/common/lib/*,
            /opt/hadoop-2.6.0/share/hadoop/hdfs/*,
            /opt/hadoop-2.6.0/share/hadoop/hdfs/lib/*,
            /opt/hadoop-2.6.0/share/hadoop/mapreduce/*,
            /opt/hadoop-2.6.0/share/hadoop/mapreduce/lib/*,
            /opt/hadoop-2.6.0/share/hadoop/yarn/*,
            /opt/hadoop-2.6.0/share/hadoop/yarn/lib/*
        value>
      property>
    configuration>
    复制代码


注意yarn.application.classpath一定是绝对路径,不要搞什么$HADOOP_HOME

你可能感兴趣的:(Hadoop)