Hadoop Yarn Simple Yarn

I am trying to run a simple yarn application, indicated here: https://github.com/hortonworks/simple-yarn-app

I start with both Java and Hadoop, and when I try to compile a simple yarn client file using ` javac`, I get the following error:

Client.java:9: error: package org.apache.hadoop.conf does not exist

import org.apache.hadoop.conf.Configuration;

The command I use to compile the file is as follows:

javac Client.java

I have a Googled error to see if I can find which JAR file is missing in my class path, but I could not find anything useful regarding YARN. Most of the results were related to HBASE, PIGor HIVE.

Can someone point me to the corresponding JAR file that I am missing here? Thank.

+4
2

. JAR . ' /hadoop . JAR.

, :

# javac -cp `$HADOOP_HOME\bin\hadoop classpath` Client.java 
+2

:

HADOOP_CLIENT=/usr/lib/hadoop/client-0.20
HADOOP_LIB=/usr/lib/hadoop/lib

for i in ${HADOOP_CLIENT}/*.jar ; do
    CLASSPATH=$CLASSPATH:$i
done

for i in ${HADOOP_LIB}/*.jar ; do
    CLASSPATH=$CLASSPATH:$i
done

javac -cp $CLASSPATH yourclass.java

runScript.sh .

+2

Source: https://habr.com/ru/post/1545021/


All Articles