This is an automated email from the ASF dual-hosted git repository.

oleewere pushed a commit to branch cloudbreak
in repository https://gitbox.apache.org/repos/asf/ambari-logsearch.git

commit a5b8b2af271e4e3339a6228c07c1d888d12fe473
Author: Oliver Szabo <oleew...@gmail.com>
AuthorDate: Thu Oct 18 18:08:31 2018 +0200

    AMBARI-24692. ADDENDUM: fix java version check
---
 ambari-logsearch-logfeeder/src/main/scripts/logfeeder.sh | 2 +-
 ambari-logsearch-server/src/main/scripts/logsearch.sh    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ambari-logsearch-logfeeder/src/main/scripts/logfeeder.sh 
b/ambari-logsearch-logfeeder/src/main/scripts/logfeeder.sh
index 37f5b00..e125768 100755
--- a/ambari-logsearch-logfeeder/src/main/scripts/logfeeder.sh
+++ b/ambari-logsearch-logfeeder/src/main/scripts/logfeeder.sh
@@ -80,7 +80,7 @@ else
   LOGFEEDER_GC_LOGFILE="$LOG_PATH_WITHOUT_SLASH/$LOGFEEDER_GC_LOGFILE"
 fi
 
-java_version=$($JVM -version 2>&1 | grep 'java version' | cut -d'"' -f2 | cut 
-d'.' -f2)
+java_version=$($JVM -version 2>&1 | grep 'version' | cut -d'"' -f2 | cut -d'.' 
-f2)
 if [ $java_version == "8" ]; then
   LOGFEEDER_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$LOGFEEDER_GC_LOGFILE"
 else
diff --git a/ambari-logsearch-server/src/main/scripts/logsearch.sh 
b/ambari-logsearch-server/src/main/scripts/logsearch.sh
index acd183b..b941e25 100755
--- a/ambari-logsearch-server/src/main/scripts/logsearch.sh
+++ b/ambari-logsearch-server/src/main/scripts/logsearch.sh
@@ -78,7 +78,7 @@ else
   LOGSEARCH_GC_LOGFILE="$LOG_PATH_WITHOUT_SLASH/$LOGSEARCH_GC_LOGFILE"
 fi
 
-java_version=$($JVM -version 2>&1 | grep 'java version' | cut -d'"' -f2 | cut 
-d'.' -f2)
+java_version=$($JVM -version 2>&1 | grep 'version' | cut -d'"' -f2 | cut -d'.' 
-f2)
 if [ $java_version == "8" ]; then
   LOGSEARCH_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$LOGSEARCH_GC_LOGFILE"
 else

Reply via email to