我在跟踪https://github.com/mesos/hadoop
On Linux:
$ MESOS_NATIVE_JAVA_LIBRARY=/path/to/libmesos.so hadoop jobtracker
这会产生以下错误:
不赞成:不赞成使用此脚本执行mapred命令。而是使用mapred命令。
很抱歉,不再支持jobtracker命令。您可能会发现与“yarn”shell命令类似的功能。用法:mapred[--config confdir]command其中command是以下命令之一:管道运行管道作业作业操纵mapreduce作业队列
get information about jobqueues classpath打印运行mapreduce子命令historyserver run job history servers as a standalone daemon distcp copy file or directories recursive archive-archivename-p*创建hadoop archive hsadmin job history server管理接口
大多数命令在不带参数的情况下调用时打印帮助。
执行下载的hadoop二进制文件时产生:
~/hadoop-2.5.0-cdh5.2.0 # MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so ./bin/hadoop jobtracker
Error: Could not find or load main class org.apache.hadoop.mapred.JobTracker
我错过了什么?
执行前的类路径:
root@mesos-master3 ~/hadoop-2.5.0-cdh5.2.0 # MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so ./bin/hadoop jobtracker
/root/hadoop-2.5.0-cdh5.2.0/bin-mapreduce1/../etc/hadoop:/usr/lib/tools.jar:/root/hadoop-2.5.0-cdh5.2.0/bin-mapreduce1/../share/hadoop/mapreduce1/hadoop-core-2.5.0-mr1-cdh5.2.0.jar:/root/hadoop-2.5.0-cdh5.2.0/bin-mapreduce1/../lib/*.jar:/root/hadoop-2.5.0-cdh5.2.0/bin-mapreduce1/../lib/jsp-2.1/*.jar:/root/hadoop-2.5.0-cdh5.2.0/bin-mapreduce1/../etc/hadoop:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/common/lib/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/common/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/hdfs:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/hdfs/lib/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/hdfs/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/yarn/lib/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/yarn/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/mapreduce:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/mapreduce/lib/*:/root/hadoop-2.5.0-cdh5.2.0/share/hadoop/mapreduce/*
Error: Could not find or load main class org.apache.hadoop.mapred.JobTracker
1条答案
按热度按时间pkbketx91#
hadoop(2.4+)的现代版本默认启用了yarn/mapreduce2,因此旧的mrv1 jobtracker/tasktracker命令无法开箱即用。您必须更改配置以启用mrv1(设置
HADOOP_HOME
以及HADOOP_CONF_DIR
指向mr1目录)或通过myriad切换到mesos上的Yarn:https://github.com/mesos/myriad