简体   繁体   中英

Java error when running Mapreduce program

I have a MapReduce Program which aggregates the total stock volume in a stock exchange data set. I have compiled & created a jar file without any errors. But when i run the jar on Hadoop cluster it throws me a java class notfound exception. I am new to java and any help will be greatly appreciated

cloudera@cloudera-vm:~$ hadoop jar NYSE.jar -D com.rashmi.mapreduce.NYSE.NYSEJob /user/NYSE/NASDAQ_daily_prices_A_sample.csv /user/NYSE/outputException in thread "main" java.lang.ClassNotFoundException: -D
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:179)

Hi please correct the command as:

hadoop jar NYSE.jar com.rashmi.mapreduce.NYSE.NYSEJob /user/NYSE/NASDAQ_daily_prices_A_sample.csv /user/NYSE/output

You need not use -D option here.

hope this(link) helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM