Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added launcher script and logging config.
- Loading branch information
1 parent
e26df10
commit 45d4602
Showing
7 changed files
with
104 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
# resolve links - $0 may be a softlink | ||
this="${BASH_SOURCE-$0}" | ||
while [ -h "$this" ]; do | ||
ls=`ls -ld "$this"` | ||
link=`expr "$ls" : '.*-> \(.*\)$'` | ||
if expr "$link" : '.*/.*' > /dev/null; then | ||
this="$link" | ||
else | ||
this=`dirname "$this"`/"$link" | ||
fi | ||
done | ||
|
||
# convert relative path to absolute path | ||
bin=`dirname "$this"` | ||
script=`basename "$this"` | ||
bin=`unset CDPATH; cd "$bin"; pwd` | ||
this="$bin/$script" | ||
POOPER_HOME=`cd $bin/..;pwd` | ||
POOPER_JAR="$POOPER_HOME/HadooperPooper.jar" | ||
unset CDPATH | ||
cd $bin | ||
|
||
JAVA="java" | ||
|
||
if [ -z "$POOPER_CONFIG" ] ; then | ||
if [ -f ~/.ec2/pooper.properties ] ; then | ||
POOPER_CONFIG=~/.ec2/pooper.properties | ||
else | ||
if [ -f "$POOPER_HOME/config/pooper.properties" ] ; then | ||
POOPER_CONFIG="$POOPER_HOME/config/pooper.properties" | ||
fi | ||
fi | ||
fi | ||
|
||
POOPER_LIB="$POOPER_HOME/lib" | ||
#theincessant aws log messages will make you mental if you don't have this. | ||
|
||
if [ -z $CLASSPATH ] ; then | ||
CLASSPATH="." | ||
fi | ||
|
||
for jar in $POOPER_LIB/*.jar ; do | ||
CLASSPATH=$CLASSPATH:$jar | ||
done | ||
|
||
JAVA_OPTS="-Dlogging.config=$POOPER_HOME/config/log4j.properties" | ||
JAVA_OPTS="$JAVA_OPTS -Dclasspath=$CLASSPATH" | ||
JAVA_OPTS="$JAVA_OPTS -Dpooper.config=$POOPER_CONFIG" | ||
|
||
COMMAND="$JAVA $JAVA_OPTS -jar $POOPER_JAR $1 $2 $3 $4 $5 $6" | ||
|
||
exec $COMMAND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
log4j.rootLogger=WARN, A1 | ||
log4j.appender.A1=org.apache.log4j.ConsoleAppender | ||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
log4j.rootLogger=WARN, A1 | ||
log4j.appender.A1=org.apache.log4j.ConsoleAppender | ||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n |