How can I run Hadoop run with a Java class?

前端 未结 9 927
甜味超标
甜味超标 2021-01-20 03:13

I am following the book Hadoop: the definitive Guide.

I am confused on example 3-1.

There is a Java source file, URLCat.java. I use javac to co

9条回答
  •  我在风中等你
    2021-01-20 03:55

    I did this based on help found on this site and the hadoop tutorial.

    mkdir urlcat_classes
    javac -classpath /usr/lib/hadoop/hadoop-0.20.2-cdh3u1-core.jar -d urlcat_classes URLCat.java
    jar -cvf urlcat.jar -C urlcat_classes .
    hadoop jar urlcat.jar no.gnome.URLCat hdfs://localhost/user/claus/sample.txt

    no.gnome is from 'package no.gnome;' in URLCat.java.

    regards
    Claus

提交回复
热议问题