Some useful scripts

Include multiple jar files and run a java program

export JAR_HOME=/usr/local/hadoop-1.0.0

export JAR_LIB_HOME=/usr/local/hadoop-1.0.0/lib

for f in $JAR_HOME/*.jar
do
JAR_CLASSPATH=$JAR_CLASSPATH:$f
done

for g in $JAR_LIB_HOME/*.jar
do
JAR_CLASSPATH=$JAR_CLASSPATH:$g
done

 

export JAR_CLASSPATH

#the next line will print the JAR_CLASSPATH to the shell.
echo the classpath is $JAR_CLASSPATH

java -classpath $JAR_CLASSPATH org.apache.hadoop.tools.rumen.TraceBuilder ~/Desktop/test_rumen_output/job-trace.json ~/Desktop/test_rumen_output/topology.output ~/Desktop/test_rumen_data

Advertisements

About sangroyaamit

I am a PhD student in computer science at INRIA Grenoble.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s