Source

fogbow / bin / fogbow

#!/bin/bash

JARS=`echo $FOGBOW_DIR/lib/*.jar $FOGBOW_DIR/target/*.jar $HADOOP_HOME/*.jar $HADOOP_HOME/lib/*.jar | tr ' ' ':'`

JARS_MANAGED=
if [ -e $FOGBOW_DIR/lib_managed ]
then
    JARS_MANAGED=`find $FOGBOW_DIR/lib_managed -name '*.jar' -print | tr '\n' ':'`
fi

SCALA_LIB="$FOGBOW_DIR/project/boot/scala-2.9.0/lib/scala-library.jar"

CP=$FOGBOW_DIR/target/classes:$JARS:$JARS_MANAGED:$SCALA_LIB:$CLASSPATH

if [ -z $JAVA_MEM_FLAG ] 
then
    JAVA_MEM_FLAG=-Xmx2g
fi

JAVA_COMMAND="java $FOGBOW_JAVA_OPTIONS $JAVA_MEM_FLAG -classpath $CP"

CMD=$1
shift

help()
{
cat <<EOF
Fogbow 0.1.2 commands: 

  build         build Fogbow with SBT
  wordcount     do the standard word count example
  run           run the main method of a given class

Include --help with any option for more information
EOF
}

if [ $CMD = 'build' ]; then

    if test -f ~/.sbtconfig; then
	. ~/.sbtconfig
    fi
    java -Dfile.encoding=UTF8 -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m ${SBT_OPTS} -jar $FOGBOW_DIR/bin/sbt-launch.jar "$@"

else 

    CLASS=

    case $CMD in
	wordcount) CLASS=tacc.hadoop.example.WordCount;;
	run) CLASS=$1; shift;;
	help) help; exit 1;;
	*) echo "Unrecognized command: $CMD"; help; exit 1;;
    esac

    $JAVA_COMMAND $CLASS $*

fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.