Cloudera's CDH4 WordCount hadoop tutorial - issues -
i following tutorial: http://www.cloudera.com/content/cloudera-content/cloudera-docs/hadooptutorial/cdh4/hadoop-tutorial/ht_topic_5_2.html
it says following:
javac -cp classpath -d wordcount_classes wordcount.java
where classpath is:
cdh4 - /usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/* cdh3 - /usr/lib/hadoop-0.20/hadoop-0.20.2-cdh3u4-core.jar
i have downloaded "cloudera-quickstart-demo-vm-4.2.0-vmware" . running user cloudera.
[cloudera@localhost wordcount]$ javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/* -d wordcount_classes wordcount.java incorrect classpath: /usr/lib/hadoop/* incorrect classpath: /usr/lib/hadoop/client-0.20/* ---------- 1. error in wordcount.java (at line 8) import org.apache.hadoop.fs.path; ^^^^^^^^^^
when checking cp folder: .
[cloudera@localhost wordcount]$ ls -l /usr/lib/hadoop total 3500 drwxr-xr-x. 2 root root 4096 apr 22 14:37 bin drwxr-xr-x. 2 root root 4096 apr 22 14:33 client drwxr-xr-x. 2 root root 4096 apr 22 14:33 client-0.20 drwxr-xr-x. 2 root root 4096 apr 22 14:36 cloudera drwxr-xr-x. 2 root root 4096 apr 22 14:30 etc -rw-r--r--. 1 root root 16536 feb 15 14:24 hadoop-annotations-2.0.0-cdh4.2.0.jar lrwxrwxrwx. 1 root root 37 apr 22 14:30 hadoop-annotations.jar -> hadoop-annotations-2.0.0-cdh4.2.0.jar -rw-r--r--. 1 root root 46855 feb 15 14:24 hadoop-auth-2.0.0-cdh4.2.0.jar lrwxrwxrwx. 1 root root 30 apr 22 14:30 hadoop-auth.jar -> hadoop-auth-2.0.0-cdh4.2.0.jar -rw-r--r--. 1 root root 2266171 feb 15 14:24 hadoop-common-2.0.0-cdh4.2.0.jar -rw-r--r--. 1 root root 1212163 feb 15 14:24 hadoop-common-2.0.0-cdh4.2.0-tests.jar lrwxrwxrwx. 1 root root 32 apr 22 14:30 hadoop-common.jar -> hadoop-common-2.0.0-cdh4.2.0.jar drwxr-xr-x. 3 root root 4096 apr 22 14:36 lib drwxr-xr-x. 2 root root 4096 apr 22 14:33 libexec drwxr-xr-x. 2 root root 4096 apr 22 14:31 sbin
what doing wrong? directly cloudera quickstart vm cdh4 installed. following "hadoop tutorial" . says
**prerequisites** ensure cdh installed, configured, , running. easiest way going use cdh4 quickstart vm
which running tutorial - cdh4 quickstart vm.
what doing wrong?
*update version information;
[cloudera@localhost cloudera]$ cat cdh_version.properties # autogenerated build properties version=2.0.0-cdh4.2.0 git.hash=8bce4bd28a464e0a92950c50ba01a9deb1d85686 cloudera.hash=8bce4bd28a464e0a92950c50ba01a9deb1d85686 cloudera.base-branch=cdh4-base-2.0.0 cloudera.build-branch=cdh4-2.0.0_4.2.0 cloudera.pkg.version=2.0.0+922 cloudera.pkg.release=1.cdh4.2.0.p0.12 cloudera.cdh.release=cdh4.2.0 cloudera.build.time=2013.02.15-18:39:29gmt cloudera.pkg.name=hadoop
classpath env:
[cloudera@localhost bin]$ echo $classpath :/usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/*
edit!! think figured out. new issue possibly cloudera cd4 vm quickstart vm: from: this post dated yesterday person having exact same problem. seems javac program not accept wildcards on exported paths. had following:
export classpath=/usr/lib/hadoop/client-0.20/\*:/usr/lib/hadoop/\*
then javac -d [without -cp override]
javac -d wordcount_classes/ wordcount.java
only warnings appear.
i wonder if cloudera has fix quickstart vm.
you need have classpath variable set includes directories in /usr/lib/hadoop if want javac find them. can set env var follows
$: export classpath=$classpath:/usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/*
javac find libs. if have additional complaining regarding classpath variables can append them above line using colon (:) delimiter
you include in bash script, best practice set correct env variables @ runtime, want. in case word count or cdh4 env setting it, best set yourself.
Comments
Post a Comment