Skip to content

Instantly share code, notes, and snippets.

@metajack
Created November 6, 2009 22:23
Show Gist options
  • Save metajack/228343 to your computer and use it in GitHub Desktop.
Save metajack/228343 to your computer and use it in GitHub Desktop.
append_jardir_to_classpath()
{
jardir=$1
for j in `ls $jardir/*.jar`
do
if [ -z "$CLASSPATH" ]
then
CLASSPATH=$j
else
CLASSPATH=$CLASSPATH:$j
fi
done
}
append_jardir_to_classpath ~/hadoop
append_jardir_to_classpath ~/hadoop/lib
append_jardir_to_classpath ~/hive/lib
append_jardir_to_classpath ~/pig
append_jardir_to_classpath ~/pig/lib
HADOOP_HOME=~/hadoop
HIVE_HOME=~/hive
PIG_HOME=~/pig
PATH=$PATH:~/hadoop/bin:~/hive/bin:~/pig/bin
export HADOOP_HOME HIVE_HOME CLASSPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment