lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [02/10] lucene-solr:feature/autoscaling: SOLR-11261, SOLR-10966: Upgrade to Hadoop 2.7.4 to fix incompatibility with Java 9. This also reverts commit 85a27a231fdddb118ee178baac170da0097a02c0.
Date Mon, 21 Aug 2017 06:47:31 GMT
SOLR-11261, SOLR-10966: Upgrade to Hadoop 2.7.4 to fix incompatibility with Java 9.
This also reverts commit 85a27a231fdddb118ee178baac170da0097a02c0.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c68e668d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c68e668d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c68e668d

Branch: refs/heads/feature/autoscaling
Commit: c68e668dd7b2522f1f6c7785f256882f0fd8875d
Parents: a4374e8
Author: Uwe Schindler <uschindler@apache.org>
Authored: Sun Aug 20 13:28:18 2017 +0200
Committer: Uwe Schindler <uschindler@apache.org>
Committed: Sun Aug 20 13:28:18 2017 +0200

----------------------------------------------------------------------
 lucene/ivy-versions.properties                  |  2 +-
 solr/CHANGES.txt                                |  2 +-
 .../org/apache/solr/servlet/BaseSolrFilter.java |  3 -
 .../apache/solr/servlet/BaseSolrServlet.java    |  3 -
 .../org/apache/solr/util/Java9InitHack.java     | 78 --------------------
 solr/licenses/hadoop-annotations-2.7.2.jar.sha1 |  1 -
 solr/licenses/hadoop-annotations-2.7.4.jar.sha1 |  1 +
 solr/licenses/hadoop-auth-2.7.2.jar.sha1        |  1 -
 solr/licenses/hadoop-auth-2.7.4.jar.sha1        |  1 +
 .../licenses/hadoop-common-2.7.2-tests.jar.sha1 |  1 -
 solr/licenses/hadoop-common-2.7.2.jar.sha1      |  1 -
 .../licenses/hadoop-common-2.7.4-tests.jar.sha1 |  1 +
 solr/licenses/hadoop-common-2.7.4.jar.sha1      |  1 +
 solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1  |  1 -
 solr/licenses/hadoop-hdfs-2.7.2.jar.sha1        |  1 -
 solr/licenses/hadoop-hdfs-2.7.4-tests.jar.sha1  |  1 +
 solr/licenses/hadoop-hdfs-2.7.4.jar.sha1        |  1 +
 solr/licenses/hadoop-minikdc-2.7.2.jar.sha1     |  1 -
 solr/licenses/hadoop-minikdc-2.7.4.jar.sha1     |  1 +
 .../java/org/apache/solr/SolrTestCaseJ4.java    |  6 --
 20 files changed, 9 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/lucene/ivy-versions.properties
----------------------------------------------------------------------
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 1e273b2..0a674a2 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -136,7 +136,7 @@ org.apache.directory.server.version = 2.0.0-M15
 /org.apache.directory.server/apacheds-protocol-shared = ${org.apache.directory.server.version}
 /org.apache.directory.server/apacheds-xdbm-partition = ${org.apache.directory.server.version}
 
-org.apache.hadoop.version = 2.7.2
+org.apache.hadoop.version = 2.7.4
 /org.apache.hadoop/hadoop-annotations = ${org.apache.hadoop.version}
 /org.apache.hadoop/hadoop-auth = ${org.apache.hadoop.version}
 /org.apache.hadoop/hadoop-common = ${org.apache.hadoop.version}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a8694d4..d07b085 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -863,7 +863,7 @@ Other Changes
   with point fields and provides control over dynamic fields used for the raw amount and
currency
   code sub-fields.  (hossman, Steve Rowe)
 
-* SOLR-10966: Add workaround for Hadoop-Common 2.7.2 incompatibility with Java 9.
+* SOLR-11261, SOLR-10966: Upgrade to Hadoop 2.7.4 to fix incompatibility with Java 9.
   (Uwe Schindler)
 
 ==================  6.6.1 ==================

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/core/src/java/org/apache/solr/servlet/BaseSolrFilter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/BaseSolrFilter.java b/solr/core/src/java/org/apache/solr/servlet/BaseSolrFilter.java
index 40a2df2..6f9bbe6 100644
--- a/solr/core/src/java/org/apache/solr/servlet/BaseSolrFilter.java
+++ b/solr/core/src/java/org/apache/solr/servlet/BaseSolrFilter.java
@@ -18,8 +18,6 @@ package org.apache.solr.servlet;
 
 import javax.servlet.Filter;
 
-import org.apache.solr.util.Java9InitHack;
-
 /**
  * All Solr filters available to the user's webapp should
  * extend this class and not just implement {@link Filter}.
@@ -30,7 +28,6 @@ abstract class BaseSolrFilter implements Filter {
   
   static {
     CheckLoggingConfiguration.check();
-    Java9InitHack.initJava9();
   }
   
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/core/src/java/org/apache/solr/servlet/BaseSolrServlet.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/BaseSolrServlet.java b/solr/core/src/java/org/apache/solr/servlet/BaseSolrServlet.java
index e175f8e..5042e93 100644
--- a/solr/core/src/java/org/apache/solr/servlet/BaseSolrServlet.java
+++ b/solr/core/src/java/org/apache/solr/servlet/BaseSolrServlet.java
@@ -18,8 +18,6 @@ package org.apache.solr.servlet;
 
 import javax.servlet.http.HttpServlet;
 
-import org.apache.solr.util.Java9InitHack;
-
 /**
  * All Solr servlets available to the user's webapp should
  * extend this class and not {@link HttpServlet}.
@@ -31,7 +29,6 @@ abstract class BaseSolrServlet extends HttpServlet {
   
   static {
     CheckLoggingConfiguration.check();
-    Java9InitHack.initJava9();
   }
   
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/core/src/java/org/apache/solr/util/Java9InitHack.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/Java9InitHack.java b/solr/core/src/java/org/apache/solr/util/Java9InitHack.java
deleted file mode 100644
index 0565207..0000000
--- a/solr/core/src/java/org/apache/solr/util/Java9InitHack.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.util;
-
-import java.lang.invoke.MethodHandles;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Objects;
-
-import org.apache.lucene.util.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class works around a bug in hadoop-common-2.7.2 where the Hadoop Shell class cannot
- * initialize on Java 9 (due to a bug while parsing Java's version number).
- * This class does some early checks and fakes the java version for a very short time
- * during class loading of Solr's web application or Solr's test framework.
- * <p>
- * Be sure to run this only in static initializers, as soon as possible after JVM startup!
- * <p>
- * Related issues: HADOOP-14586, SOLR-10966
- * <p>
- * TODO: <b>Remove this ASAP, once we have upgraded Hadoop (SOLR-10951)!</b>
- * 
- * @lucene.internal
- */
-public final class Java9InitHack {
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  
-  private static final String JAVA_VERSION_PROP = "java.version";
-  private static boolean done = false;
-
-  /**
-   * Runs the hack. Should be done as early as possible on JVM startup, from a static initializer
-   * to prevent concurrency issues - because we change temporarily some 'important' system
properties.
-   */
-  public static synchronized void initJava9() {
-    if (Constants.JRE_IS_MINIMUM_JAVA9 && done == false) {
-      AccessController.doPrivileged((PrivilegedAction<Void>) Java9InitHack::initPrivileged);
-      done = true;
-    }
-  }
-     
-  private static Void initPrivileged() {
-    log.info("Adding temporary workaround for Hadoop's Shell class to allow running on Java
9 (please ignore any warnings/failures).");
-    String oldVersion = System.getProperty(JAVA_VERSION_PROP);
-    try {
-      System.setProperty(JAVA_VERSION_PROP, "1.9");
-      Class.forName("org.apache.hadoop.util.Shell");
-    } catch (Throwable t) {
-      log.warn("Cannot initialize Hadoop's Shell class on Java 9.", t);
-    } finally {
-      if (!Objects.equals(System.getProperty(JAVA_VERSION_PROP), oldVersion)) {
-        System.setProperty(JAVA_VERSION_PROP, oldVersion);
-      }
-    }
-    return null;
-  }
-  
-  private Java9InitHack() {}
-    
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-annotations-2.7.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-annotations-2.7.2.jar.sha1 b/solr/licenses/hadoop-annotations-2.7.2.jar.sha1
deleted file mode 100644
index 86490ab..0000000
--- a/solr/licenses/hadoop-annotations-2.7.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-80693ef2884927ee3c5464a7539fcfa4af382e14

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-annotations-2.7.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-annotations-2.7.4.jar.sha1 b/solr/licenses/hadoop-annotations-2.7.4.jar.sha1
new file mode 100644
index 0000000..7add0f3
--- /dev/null
+++ b/solr/licenses/hadoop-annotations-2.7.4.jar.sha1
@@ -0,0 +1 @@
+d8e0a3abcc3fb46e1418b99d6d1328a95d9bd7b1

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-auth-2.7.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-auth-2.7.2.jar.sha1 b/solr/licenses/hadoop-auth-2.7.2.jar.sha1
deleted file mode 100644
index 7d334a4..0000000
--- a/solr/licenses/hadoop-auth-2.7.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-bf613cfec06a1f3d3a91d7f82f9e4af75bc01f72

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-auth-2.7.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-auth-2.7.4.jar.sha1 b/solr/licenses/hadoop-auth-2.7.4.jar.sha1
new file mode 100644
index 0000000..3c8ccea
--- /dev/null
+++ b/solr/licenses/hadoop-auth-2.7.4.jar.sha1
@@ -0,0 +1 @@
+a2d5d89a6acfb11dd1a125e86b84fcef549483ae

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-common-2.7.2-tests.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-common-2.7.2-tests.jar.sha1 b/solr/licenses/hadoop-common-2.7.2-tests.jar.sha1
deleted file mode 100644
index 0619f74..0000000
--- a/solr/licenses/hadoop-common-2.7.2-tests.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-482b3051dc384c1e15182a6ad1402649ef24be02

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-common-2.7.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-common-2.7.2.jar.sha1 b/solr/licenses/hadoop-common-2.7.2.jar.sha1
deleted file mode 100644
index a0fdaea..0000000
--- a/solr/licenses/hadoop-common-2.7.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-422eb48913fa6f81835b3192c97a576505b6c192

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-common-2.7.4-tests.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-common-2.7.4-tests.jar.sha1 b/solr/licenses/hadoop-common-2.7.4-tests.jar.sha1
new file mode 100644
index 0000000..d5852c6
--- /dev/null
+++ b/solr/licenses/hadoop-common-2.7.4-tests.jar.sha1
@@ -0,0 +1 @@
+a2aa0905c8f980d36f4e861283dccfcad6dd3dec

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-common-2.7.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-common-2.7.4.jar.sha1 b/solr/licenses/hadoop-common-2.7.4.jar.sha1
new file mode 100644
index 0000000..4ef5f58
--- /dev/null
+++ b/solr/licenses/hadoop-common-2.7.4.jar.sha1
@@ -0,0 +1 @@
+9afa8d2004a0bbd930d1ac10d221d927917067be

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1 b/solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1
deleted file mode 100644
index 0ae9dfb..0000000
--- a/solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-dfb6840b97211044e87a0345f7edad51b942fd2a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-hdfs-2.7.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-hdfs-2.7.2.jar.sha1 b/solr/licenses/hadoop-hdfs-2.7.2.jar.sha1
deleted file mode 100644
index d557702..0000000
--- a/solr/licenses/hadoop-hdfs-2.7.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-3c304b3d9227fbf8af8bc1cab013271538c3cf0a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-hdfs-2.7.4-tests.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-hdfs-2.7.4-tests.jar.sha1 b/solr/licenses/hadoop-hdfs-2.7.4-tests.jar.sha1
new file mode 100644
index 0000000..9107cf7
--- /dev/null
+++ b/solr/licenses/hadoop-hdfs-2.7.4-tests.jar.sha1
@@ -0,0 +1 @@
+3e5dbc6eb1d4d5d4c19a06c0a443f5bdc3740a35

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-hdfs-2.7.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-hdfs-2.7.4.jar.sha1 b/solr/licenses/hadoop-hdfs-2.7.4.jar.sha1
new file mode 100644
index 0000000..ed49c83
--- /dev/null
+++ b/solr/licenses/hadoop-hdfs-2.7.4.jar.sha1
@@ -0,0 +1 @@
+3e1414e3ae47e97f66b2eb904d3ec6c50a3e29d0

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-minikdc-2.7.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-minikdc-2.7.2.jar.sha1 b/solr/licenses/hadoop-minikdc-2.7.2.jar.sha1
deleted file mode 100644
index e049864..0000000
--- a/solr/licenses/hadoop-minikdc-2.7.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-59d112c8683f563f7aaf05fde7bc4022b90b44a7

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/licenses/hadoop-minikdc-2.7.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/hadoop-minikdc-2.7.4.jar.sha1 b/solr/licenses/hadoop-minikdc-2.7.4.jar.sha1
new file mode 100644
index 0000000..c15bf24
--- /dev/null
+++ b/solr/licenses/hadoop-minikdc-2.7.4.jar.sha1
@@ -0,0 +1 @@
+3964a7984a19e553e090a2279569ec0060b87d5b

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c68e668d/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index 1858b16..2f2f9cc 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -116,7 +116,6 @@ import org.apache.solr.schema.SchemaField;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.servlet.DirectSolrConnection;
 import org.apache.solr.util.AbstractSolrTestCase;
-import org.apache.solr.util.Java9InitHack;
 import org.apache.solr.util.LogLevel;
 import org.apache.solr.util.RandomizeSSL;
 import org.apache.solr.util.RandomizeSSL.SSLRandomizer;
@@ -162,11 +161,6 @@ import static java.util.Objects.requireNonNull;
 public abstract class SolrTestCaseJ4 extends LuceneTestCase {
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  
-  // this must be a static init block to be safe!
-  static {
-    Java9InitHack.initJava9();
-  }
 
   private static final List<String> DEFAULT_STACK_FILTERS = Arrays.asList(new String
[] {
       "org.junit.",


Mime
View raw message