Skip to content

Commit

Permalink
DRILL-1491: Support for JDK 8
Browse files Browse the repository at this point in the history
Changed jdk version from 7 to 8 in pom.xml travis and drill-config.sh

This closes apache#1143
  • Loading branch information
vladimirtkach authored and parthchandra committed Mar 11, 2018
1 parent d09efb9 commit dbc95a6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ before_install: git fetch --unshallow
sudo: required
language: java
jdk:
- openjdk7
- openjdk8
cache:
directories:
- "$HOME/.m2"
Expand Down
28 changes: 11 additions & 17 deletions distribution/src/resources/drill-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ else
JAVA_BIN="java"
fi

# Standardize error messages

fatal_error() {
echo "ERROR: $@" 1>&2
exit 1
}


# Test for or find JAVA_HOME

if [ -z "$JAVA_HOME" ]; then
Expand Down Expand Up @@ -116,9 +124,9 @@ if [ ! -e "$JAVA" ]; then
fi

# Ensure that Java version is at least 1.7
"$JAVA" -version 2>&1 | grep "version" | egrep -e "1\.4|1\.5|1\.6" > /dev/null
"$JAVA" -version 2>&1 | grep "version" | egrep -e "1\.4|1\.5|1\.6|1\.7" > /dev/null
if [ $? -eq 0 ]; then
fatal_error "Java 1.7 or later is required to run Apache Drill."
fatal_error "Java 1.8 or later is required to run Apache Drill."
fi

# Check if a file exists and has relevant lines for execution
Expand All @@ -144,12 +152,6 @@ this="$home/bin/$script"
# the root of the drill installation
DRILL_HOME=${DRILL_HOME:-$home}

# Standardize error messages

fatal_error() {
echo "ERROR: $@" 1>&2
exit 1
}

# Check to see if the conf dir or drill home are given as an optional arguments
# Arguments may appear anywhere on the command line. --site is an alias, better
Expand Down Expand Up @@ -210,7 +212,7 @@ fi

# The SQLline client does not need the code cache.

export SQLLINE_JAVA_OPTS=${SQLLINE_JAVA_OPTS:-"-XX:MaxPermSize=512M"}
export SQLLINE_JAVA_OPTS=${SQLLINE_JAVA_OPTS:-""}

# Class unloading is disabled by default in Java 7
# http://hg.openjdk.java.net/jdk7u/jdk7u60/hotspot/file/tip/src/share/vm/runtime/globals.hpp#l1622
Expand Down Expand Up @@ -294,18 +296,10 @@ fi
export DRILL_MAX_DIRECT_MEMORY=${DRILL_MAX_DIRECT_MEMORY:-"8G"}
export DRILL_HEAP=${DRILL_HEAP:-"4G"}
export DRILLBIT_CODE_CACHE_SIZE=${DRILLBIT_CODE_CACHE_SIZE:-"1G"}
export DRILLBIT_MAX_PERM=${DRILLBIT_MAX_PERM:-"512M"}

export DRILLBIT_OPTS="-Xms$DRILL_HEAP -Xmx$DRILL_HEAP -XX:MaxDirectMemorySize=$DRILL_MAX_DIRECT_MEMORY"
export DRILLBIT_OPTS="$DRILLBIT_OPTS -XX:ReservedCodeCacheSize=$DRILLBIT_CODE_CACHE_SIZE -Ddrill.exec.enable-epoll=false"

# Remove MaxPermSize for JVM version >= 1.8.0
jvmVersion=`"$JAVA" -version 2>&1 | grep "version" | tr '"_' '\n' | grep '[0-9].[0.9]'`
if [[ $jvmVersion < "1.8.0" ]]; then
export DRILLBIT_OPTS="$DRILLBIT_OPTS -XX:MaxPermSize=$DRILLBIT_MAX_PERM"
else
unset DRILLBIT_MAX_PERM
fi

# Under YARN, the log directory is usually YARN-provided. Replace any
# value that may have been set in drill-env.sh.
Expand Down
10 changes: 3 additions & 7 deletions distribution/src/resources/drill-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@

#export DRILL_MAX_DIRECT_MEMORY=${DRILL_MAX_DIRECT_MEMORY:-"8G"}

# Value for the JVM -XX:MaxPermSize option for the Drillbit. Default is 512M.

#export DRILLBIT_MAX_PERM=${DRILLBIT_MAX_PERM:-"512M"}

# Native library path passed to Java. Note: use this form instead
# of the old form of DRILLBIT_JAVA_OPTS="-Djava.library.path=<dir>"
# The old form is not compatible with Drill-on-YARN.
Expand Down Expand Up @@ -141,12 +137,12 @@

#export SERVER_LOG_GC=${SERVER_LOG_GC:-1}

# JVM options when running the sqlline Drill client. For example, adjust the
# JVM heap memory here. These are used ONLY in non-embedded mode; these
# JVM options when running the sqlline Drill client.
# These are used ONLY in non-embedded mode; these
# are client-only settings. (The Drillbit settings are used when Drill
# is embedded.)

#export SQLLINE_JAVA_OPTS="-XX:MaxPermSize=512M"
#export SQLLINE_JAVA_OPTS=""

# Arguments passed to sqlline (the Drill shell) at all times: whether
# Drill is embedded in Sqlline or not.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ public void queryIdArrived(final QueryId queryId) {

@Test // DRILL-2383: Cancellation TC 2: cancel in the middle of fetching result set
@Repeat(count = NUM_RUNS)
@Ignore("DRILL-6228")
public void cancelInMiddleOfFetchingResults() {
final long before = countAllocatedMemory();

Expand Down Expand Up @@ -650,6 +651,7 @@ public void dataArrived(final QueryDataBatch result, final ConnectionThrottle th

@Test // DRILL-2383: Cancellation TC 3: cancel after all result set are produced but not all are fetched
@Repeat(count = NUM_RUNS)
@Ignore("DRILL-6228")
public void cancelAfterAllResultsProduced() {
final long before = countAllocatedMemory();

Expand Down
2 changes: 1 addition & 1 deletion exec/jdbc-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
<argLine>-Xms512m -Xmx3g -Ddrill.exec.http.enabled=false -Djava.net.preferIPv4Stack=true
-Ddrill.exec.sys.store.provider.local.write=false
-Dorg.apache.drill.exec.server.Drillbit.system_options="org.apache.drill.exec.compile.ClassTransformer.scalar_replacement=on"
-XX:MaxPermSize=256M -XX:MaxDirectMemorySize=3072M
-XX:MaxDirectMemorySize=3072M
-XX:+CMSClassUnloadingEnabled -ea</argLine>
<additionalClasspathElements>
<additionalClasspathElements>${settings.localRepository}/junit/junit/${junit.version}/junit-${junit.version}.jar</additionalClasspathElements>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<maxmem>2048m</maxmem>
<useIncrementalCompilation>false</useIncrementalCompilation>
<fork>true</fork>
Expand Down Expand Up @@ -469,7 +469,7 @@
-Dorg.apache.drill.exec.server.Drillbit.system_options="org.apache.drill.exec.compile.ClassTransformer.scalar_replacement=on"
-Ddrill.test.query.printing.silent=true
-Ddrill.catastrophic_to_standard_out=true
-XX:MaxPermSize=512M -XX:MaxDirectMemorySize=${directMemoryMb}M
-XX:MaxDirectMemorySize=${directMemoryMb}M
-Djava.net.preferIPv4Stack=true
-Djava.awt.headless=true
-XX:+CMSClassUnloadingEnabled -ea
Expand Down

0 comments on commit dbc95a6

Please sign in to comment.