kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [kudu] 03/03: KUDU-2099: drop Java 7 support
Date Tue, 26 Mar 2019 05:09:57 GMT
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 603c8845354fe8d22a103f66adae27a237785e06
Author: Adar Dembo <adar@cloudera.com>
AuthorDate: Wed Mar 20 12:12:52 2019 -0700

    KUDU-2099: drop Java 7 support
    
    Two commits merged since 1.9 yield compilation errors when building with
    JDK 10 or later:
    
      .../client/AuthzTokenCache.java:230: error: cannot find symbol
          List<RpcAndException> pendingRetries = retriesForTable.putIfAbsent(
                                                                ^
      symbol:   method putIfAbsent(String,List<RpcAndException>)
      location: variable retriesForTable of type Map<String,List<RpcAndException>>
      .../client/KuduScannerIterator.java:34: error: KuduScannerIterator is not abstract and
does not override abstract method remove() in Iterator
      public class KuduScannerIterator implements Iterator<RowResult> {
             ^
    
    The root cause is that with JDK 10, these two methods have been lifted out
    of their respective classes and are now defined via default interface
    implementations, but the compiler can't emit those implementations into
    Java 7-compatible bytecode[1].
    
    So we can either work around those two issues, or we can drop support for
    Java 7. Let's see if there are any objections to the latter.
    
    1. https://stackoverflow.com/a/23757061
    
    Change-Id: I05fcea8bbc7b773f95429b324acd0b9d18a6e9f8
    Reviewed-on: http://gerrit.cloudera.org:8080/12816
    Tested-by: Kudu Jenkins
    Reviewed-by: Andrew Wong <awong@cloudera.com>
    Reviewed-by: Grant Henke <granthenke@apache.org>
    Reviewed-by: Todd Lipcon <todd@apache.org>
---
 java/README.adoc                | 5 +----
 java/gradle.properties          | 2 +-
 java/gradle/dependencies.gradle | 4 +---
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/README.adoc b/java/README.adoc
index caccea8..cb4deb7 100644
--- a/java/README.adoc
+++ b/java/README.adoc
@@ -20,16 +20,13 @@
 == System Requirements
 
 - Runtime
-    * Java 7+
+    * Java 8+
 - Build time
     * Java 8+
 - Test time
     * Built Kudu Binaries
     * MIT Kerberos (krb5)
 
-WARNING: Support for Java 7 is deprecated as of Kudu 1.5.0 and may be removed in
-the next major release.
-
 == Building Everything
 
 [source,bash]
diff --git a/java/gradle.properties b/java/gradle.properties
index 9f77dde..739cb00 100755
--- a/java/gradle.properties
+++ b/java/gradle.properties
@@ -34,7 +34,7 @@ mavenPublishUrl = https://repository.apache.org/service/local/staging/deploy/mav
 # --release (Java 9+) Configures the compiler to produce class files that will
 #                     link against an implementation of the given platform version.
 #                     (See http://openjdk.java.net/jeps/247)
-javaCompatibility = 7
+javaCompatibility = 8
 
 encoding = UTF-8
 # Used by the scalafmt plugin because the encoding property can't be passed.
diff --git a/java/gradle/dependencies.gradle b/java/gradle/dependencies.gradle
index 9e8bd42..d8114f0 100755
--- a/java/gradle/dependencies.gradle
+++ b/java/gradle/dependencies.gradle
@@ -35,9 +35,7 @@ versions += [
     errorprone     : "2.3.1",
     flume          : "1.9.0",
     gradle         : "5.1.1",
-    // We use the android version instead of the jre version
-    // to maintain Java 1.7 compatibility.
-    guava          : "27.0.1-android",
+    guava          : "27.0.1-jre",
     hadoop         : "3.2.0",
     hamcrest       : "1.3",
     hdrhistogram   : "2.1.11",


Mime
View raw message