Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/391.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Hadoop-2.4.1示例jar通用选项错误_Java_Generics_Hadoop_Jar - Fatal编程技术网

Java Hadoop-2.4.1示例jar通用选项错误

Java Hadoop-2.4.1示例jar通用选项错误,java,generics,hadoop,jar,Java,Generics,Hadoop,Jar,我正在centos6.5_x64上使用hadoop-2.4.1示例jar。作业已成功,但输出尚未写入hdfs /opt/hadoop-2.4.1/bin/hadoop jar hadoop-mapreduce-examples*.jar \ randomtextwriter \ -D mapred.output.compress=false \ -D mapreduce.randomtextwriter.bytespermap=107374182 \ -D mapreduce.randomtex

我正在centos6.5_x64上使用hadoop-2.4.1示例jar。作业已成功,但输出尚未写入hdfs

/opt/hadoop-2.4.1/bin/hadoop jar hadoop-mapreduce-examples*.jar \
randomtextwriter \
-D mapred.output.compress=false \
-D mapreduce.randomtextwriter.bytespermap=107374182 \
-D mapreduce.randomtextwriter.mapsperhost=2 \
/output
如果作业在没有通用选项解析器的情况下运行,则输出将写入HDFS

/opt/hadoop-2.4.1/bin/hadoop jar \
/opt/hadoop-2.4.1/share/hadoop/mapreduce/hadoop-mapreduce-examples*.jar \
randomtextwriter \
/test

为什么我不能使用泛型选项?

我尝试了这个方法,效果很好:hadoop jar/usr/lib/hadoop mapreduce/hadoop-mapreduce-examples.jar randomtextwriter-D mapred.output.compress=false-D mapreduce.randomtextwriter.BytesPerMapReduce=107374182-D mapreduce.randomtextwriter.mapsperhost=2 output可以尝试指定到mapreduce示例*.jar.yes,您的回答是正确的。但是hadoop-mapreduce-examples*.jar和hadoop-mapreduce-examples-2.4.1.jar有什么区别?