关于#Hadoop#的问题,如何解决?

20、 MapReduce main接口设置和运行命令分别如下,请问MapReduce的输入文件为( )

Public void main(string[] args) { String[] otherArgs = new GeneriOptionsParser(conf, args).getRemainingArgs(); FileInputFormat.addInputPath(job,new Path(otherArgs [0])); FileOutputFormat.setOutputPath(job,new Path(otherArgs [1])); } 命令:hadoop jar WordCount.jar /user/hadoop/hdfs/test.txt /user/hadoop/hdfs/out 

A、 WordCount.jar
B、 /user/hadoop
C、 /user/hadoop/hdfs/test.txt
D、 /user/hadoop/hdfs/out

C呀

main函数的参数args是用户在命令行中输入的参数,其中第一个参数是输入文件的路径,第二个参数是输出文件的路径。在运行命令中,WordCount.jar是MapReduce程序的jar包,/user/hadoop是Hadoop集群的根目录,/user/hadoop/hdfs/test.txt是输入文件的路径,/user/hadoop/hdfs/out是输出文件的路径。因此,输入文件的路径为C、/user/hadoop/hdfs/test.txt。