重新定义yarn.application.classpath值

时间:2016-01-27 02:54:52

标签: hadoop yarn

我有一个Ubuntu 14.04 LTS,带有一个hadoop 2.4.0单节点集群。当我在控制台上执行yarn classpath时,给我这个:

/usr/local/hadoop/etc/hadoop:/usr/local/hadoop/etc/hadoop:/usr/local/hadoop/etc/hadoop:/usr/local/hadoop/share/hadoop/common/lib/*:/usr/local/hadoop/share/hadoop/common/*:/usr/local/hadoop/share/hadoop/hdfs:/usr/local/hadoop/share/hadoop/hdfs/lib/*:/usr/local/hadoop/share/hadoop/hdfs/*:/usr/local/hadoop/share/hadoop/yarn/lib/*:/usr/local/hadoop/share/hadoop/yarn/*:/usr/local/hadoop/share/hadoop/mapreduce/lib/*:/usr/local/hadoop/share/hadoop/mapreduce/*:/usr/local/hadoop/contrib/capacity-scheduler/*.jar:/usr/local/hadoop/share/hadoop/yarn/*:/usr/local/hadoop/share/hadoop/yarn/lib/*

如您所见,第一个值重复三次。我找了一种重新定义或重置它的方法。据我所知,唯一的方法就是在yarn-site.xml重新定义一个属性,如下所示:

 <property>
    <description>Classpath for typical applications.</description>
     <name>yarn.application.classpath</name>
        <value>
        $HADOOP_CONF_DIR, $HADOOP_COMMON_HOME/share/hadoop/common/*, $HADOOP_COMMON_HOME/share/hadoop/common/lib/*, $HADO$
     </value>
  </property>

但是yarn.application.classpath保持不变,没有变化,即使我停止了hadoop的每个进程并再次启动它们。我还有什么其他选择?我在这里做错了什么?

更新: 我在hadoop-env.sh中定义了$ HADOOP_CONF_DIR的值,如下:

export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/usr/local/hadoop/etc/hadoop"}

0 个答案:

没有答案