|
|
|
@ -88,7 +88,7 @@ fi
@@ -88,7 +88,7 @@ fi
|
|
|
|
|
|
|
|
|
|
# JVM performance options |
|
|
|
|
if [ -z "$KAFKA_JVM_PERFORMANCE_OPTS" ]; then |
|
|
|
|
KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC" |
|
|
|
|
KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# GC options |
|
|
|
@ -101,20 +101,6 @@ if [ "$1" = "daemon" ] && [ -z "$KAFKA_GC_LOG_OPTS"] ; then
@@ -101,20 +101,6 @@ if [ "$1" = "daemon" ] && [ -z "$KAFKA_GC_LOG_OPTS"] ; then
|
|
|
|
|
KAFKA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/$GC_LOG_FILE_NAME -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps " |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
$JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@" |
|
|
|
|
|
|
|
|
|
exitval=$? |
|
|
|
|
|
|
|
|
|
if [ $exitval -eq "1" ] ; then |
|
|
|
|
$JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@" >& exception.txt |
|
|
|
|
exception=`cat exception.txt` |
|
|
|
|
noBuildMessage='Please build the project using sbt. Documentation is available at http://kafka.apache.org/' |
|
|
|
|
pattern="(Could not find or load main class)|(java\.lang\.NoClassDefFoundError)" |
|
|
|
|
match=`echo $exception | grep -E "$pattern"` |
|
|
|
|
if [[ -n "$match" ]]; then |
|
|
|
|
echo $noBuildMessage |
|
|
|
|
fi |
|
|
|
|
rm exception.txt |
|
|
|
|
fi |
|
|
|
|
exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|