How to run a Hadoop program?

前端 未结 2 1039
谎友^
谎友^ 2021-02-13 02:54

I have set up Hadoop on my laptop and ran the example program given in the installation guide successfully. But, I am not able to run a program.

rohit@renaissa         


        
相关标签:
2条回答
  • 2021-02-13 03:35

    I found this problem as well when going thru the Hadoop Book (O'Reilly). I fixed it by setting the HADOOP_CLASSPATH variable in the hadoop-env.sh file in your configuration directory.

    0 讨论(0)
  • 2021-02-13 03:51

    You should package your application into a JAR file, that's much easier and less error-prone than fiddling with classpath folders.

    In your case, you must also compile the .java file. You said it's MaxTemparature.java, but there must also be a MaxTemperature.class before you can run it.

    0 讨论(0)
提交回复
热议问题