Skip to content

Commit

Permalink
- refined classpath in PACT CLI client script (pact-run.sh)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Hueske committed Mar 23, 2011
1 parent 999562e commit 9675c95
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions stratosphere-dist/src/main/stratosphere-bin/bin/pact-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,58 @@ fi

JVM_ARGS="$JVM_ARGS -Xmx512m"

# auxilliary function to construct a lightweight classpath for the
# PACT CLI client
constructPactCLIClientClassPath() {

for jarfile in `dir -d $NEPHELE_LIB_DIR/*.jar` ; do

add=0

if [[ "$jarfile" =~ 'nephele-server' ]]; then
add=1
elif [[ "$jarfile" =~ 'nephele-common' ]]; then
add=1
elif [[ "$jarfile" =~ 'nephele-management' ]]; then
add=1
elif [[ "$jarfile" =~ 'nephele-hdfs' ]]; then
add=1
elif [[ "$jarfile" =~ 'pact-clients' ]]; then
add=1
elif [[ "$jarfile" =~ 'pact-common' ]]; then
add=1
elif [[ "$jarfile" =~ 'pact-runtime' ]]; then
add=1
elif [[ "$jarfile" =~ 'pact-compiler' ]]; then
add=1
elif [[ "$jarfile" =~ 'commons-logging' ]]; then
add=1
elif [[ "$jarfile" =~ 'commons-cli' ]]; then
add=1
elif [[ "$jarfile" =~ 'log4j' ]]; then
add=1
elif [[ "$jarfile" =~ 'hadoop-core' ]]; then
add=1
elif [[ "$jarfile" =~ 'jackson-core-asl' ]]; then
add=1
elif [[ "$jarfile" =~ 'jackson-mapper-asl' ]]; then
add=1
fi

if [[ "$add" = "1" ]]; then
if [[ $PACT_CC_CLASSPATH = "" ]]; then
PACT_CC_CLASSPATH=$jarfile;
else
PACT_CC_CLASSPATH=$PACT_CC_CLASSPATH:$jarfile
fi
fi
done

echo $PACT_CC_CLASSPATH
}

PACT_CC_CLASSPATH=$(constructPactCLIClientClassPath)

log=$NEPHELE_LOG_DIR/nephele-$NEPHELE_IDENT_STRING-pact-run-$HOSTNAME.log
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:https://"$NEPHELE_CONF_DIR"/log4j.properties"

Expand Down

0 comments on commit 9675c95

Please sign in to comment.