lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject [1/2] lucene-solr:master: SOLR-8876: change morphline test config files to work around 'importCommands' bug when using java9
Date Wed, 08 Mar 2017 17:13:00 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 2692d08fd -> 4bc0636c1
  refs/heads/master e35881a63 -> 8756be054


SOLR-8876: change morphline test config files to work around 'importCommands' bug when using
java9


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

Branch: refs/heads/master
Commit: 8756be05404758155b850748f807245fdaab6a8b
Parents: e35881a
Author: Chris Hostetter <hossman@apache.org>
Authored: Wed Mar 8 09:52:25 2017 -0700
Committer: Chris Hostetter <hossman@apache.org>
Committed: Wed Mar 8 09:52:46 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 ++
 .../test/org/apache/solr/hadoop/MRUnitBase.java |  2 --
 .../MapReduceIndexerToolArgumentParserTest.java |  1 -
 .../solr/hadoop/MorphlineBasicMiniMRTest.java   |  1 -
 .../morphlines/cell/SolrCellMorphlineTest.java  |  2 --
 .../test-morphlines/loadSolrBasic.conf          |  7 +++++-
 .../test-morphlines/solrCellDocumentTypes.conf  | 23 +++++++++++++++++++-
 .../test-morphlines/solrCellJPGCompressed.conf  | 17 ++++++++++++++-
 .../test-files/test-morphlines/solrCellXML.conf | 11 +++++++++-
 .../test-morphlines/tokenizeText.conf           |  6 ++++-
 .../tutorialReadAvroContainer.conf              | 11 +++++++---
 .../solr/AbstractSolrMorphlineTestBase.java     |  2 --
 .../solr/AbstractSolrMorphlineZkTestBase.java   |  4 ----
 13 files changed, 69 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0e78535..7285e4f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -310,6 +310,8 @@ Other Changes
   correct now if other drivers were installed before test execution (e.g., through IDE).
   (hossman, Uwe Schindler)
 
+* SOLR-8876: change morphline test config files to work around 'importCommands' bug when
using java9 (hossman)
+
 ==================  6.4.2 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
----------------------------------------------------------------------
diff --git a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
index 73323b9..558d662 100644
--- a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
+++ b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
@@ -23,7 +23,6 @@ import java.util.Locale;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.lucene.util.Constants;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.hadoop.morphline.MorphlineMapRunner;
 import org.apache.solr.morphlines.solr.AbstractSolrMorphlineTestBase;
@@ -38,7 +37,6 @@ public abstract class MRUnitBase extends SolrTestCaseJ4 {
 
   @BeforeClass
   public static void setupClass() throws Exception {
-    assumeFalse("This test fails on Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
Constants.JRE_IS_MINIMUM_JAVA9);
     assumeFalse("This test fails on UNIX with Turkish default locale (https://issues.apache.org/jira/browse/SOLR-6387)",
         new Locale("tr").getLanguage().equals(Locale.getDefault().getLanguage()));
     solrHomeZip = SolrOutputFormat.createSolrHomeZip(new File(RESOURCES_DIR + "/solr/mrunit"));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
index 5dfb5cc..1aebcf7 100644
--- a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
+++ b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
@@ -57,7 +57,6 @@ public class MapReduceIndexerToolArgumentParserTest extends SolrTestCaseJ4
{
   
   @BeforeClass
   public static void beforeClass() {
-    assumeFalse("This test fails on Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
Constants.JRE_IS_MINIMUM_JAVA9);
     assumeFalse("Does not work on Windows, because it uses UNIX shell commands or POSIX paths",
Constants.WINDOWS);
     assumeFalse("This test fails on UNIX with Turkish default locale (https://issues.apache.org/jira/browse/SOLR-6387)",
                 new Locale("tr").getLanguage().equals(Locale.getDefault().getLanguage()));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
index b32f112..6479a20 100644
--- a/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
+++ b/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
@@ -121,7 +121,6 @@ public class MorphlineBasicMiniMRTest extends SolrTestCaseJ4 {
     assumeFalse("HDFS tests were disabled by -Dtests.disableHdfs",
         Boolean.parseBoolean(System.getProperty("tests.disableHdfs", "false")));
     
-    assumeFalse("This test fails on Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
Constants.JRE_IS_MINIMUM_JAVA9);
     assumeFalse("FIXME: This test does not work with Windows because of native library requirements",
Constants.WINDOWS);
     
     AbstractZkTestCase.SOLRHOME = solrHomeDirectory;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-cell/src/test/org/apache/solr/morphlines/cell/SolrCellMorphlineTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-cell/src/test/org/apache/solr/morphlines/cell/SolrCellMorphlineTest.java
b/solr/contrib/morphlines-cell/src/test/org/apache/solr/morphlines/cell/SolrCellMorphlineTest.java
index 3607252..e0872b6 100644
--- a/solr/contrib/morphlines-cell/src/test/org/apache/solr/morphlines/cell/SolrCellMorphlineTest.java
+++ b/solr/contrib/morphlines-cell/src/test/org/apache/solr/morphlines/cell/SolrCellMorphlineTest.java
@@ -42,8 +42,6 @@ public class SolrCellMorphlineTest extends AbstractSolrMorphlineTestBase
{
   @BeforeClass
   public static void beforeClass2() {
     assumeFalse("FIXME: Morphlines currently has issues with Windows paths", Constants.WINDOWS);
-    assumeFalse("This test fails with Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
-        Constants.JRE_IS_MINIMUM_JAVA9);
   }
 
   @Before

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/loadSolrBasic.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/loadSolrBasic.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/loadSolrBasic.conf
index 190d0e4..1c02a9a 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/loadSolrBasic.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/loadSolrBasic.conf
@@ -39,7 +39,12 @@ SOLR_LOCATOR : ${?ENV_SOLR_LOCATOR}
 morphlines : [
   {
     id : morphline1
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+    
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder",
+		      "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
     
     commands : [                    
       { 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellDocumentTypes.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellDocumentTypes.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellDocumentTypes.conf
index 7d232dd..4d38256 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellDocumentTypes.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellDocumentTypes.conf
@@ -22,7 +22,28 @@
 morphlines : [
   {
     id : morphline1
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.kitesdk.morphline.stdlib.SetValuesBuilder",
+                      "org.kitesdk.morphline.stdlib.CallParentPipeBuilder",
+                      "org.kitesdk.morphline.stdlib.GenerateUUIDBuilder",
+                      "org.kitesdk.morphline.stdlib.JavaBuilder",
+                      "org.kitesdk.morphline.stdlib.TryRulesBuilder",
+                      "org.kitesdk.morphline.stdlib.SeparateAttachmentsBuilder",
+                      "org.kitesdk.morphline.stdio.ReadCSVBuilder",
+                      "org.kitesdk.morphline.avro.ReadAvroContainerBuilder",
+                      "org.kitesdk.morphline.avro.ExtractAvroPathsBuilder",
+                      "org.kitesdk.morphline.avro.ExtractAvroTreeBuilder",
+                      "org.kitesdk.morphline.tika.DetectMimeTypeBuilder",
+                      "org.kitesdk.morphline.tika.decompress.DecompressBuilder",
+                      "org.kitesdk.morphline.tika.decompress.UnpackBuilder",
+                      "org.kitesdk.morphline.twitter.ReadJsonTestTweetsBuilder",
+                      "org.apache.solr.morphlines.cell.SolrCellBuilder",
+		      "org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder",
+                      "org.apache.solr.morphlines.solr.GenerateSolrSequenceKeyBuilder",
+		      "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
     
     commands : [
       { separateAttachments {} }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellJPGCompressed.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellJPGCompressed.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellJPGCompressed.conf
index 66e7d40..85cb2a7 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellJPGCompressed.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellJPGCompressed.conf
@@ -25,7 +25,22 @@
 morphlines : [
   {
     id : morphline1
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.kitesdk.morphline.stdlib.CallParentPipeBuilder",
+                      "org.kitesdk.morphline.stdlib.GenerateUUIDBuilder",
+                      "org.kitesdk.morphline.stdlib.JavaBuilder",
+                      "org.kitesdk.morphline.stdlib.TryRulesBuilder",
+                      "org.kitesdk.morphline.stdlib.SeparateAttachmentsBuilder",
+                      "org.kitesdk.morphline.tika.DetectMimeTypeBuilder",
+                      "org.kitesdk.morphline.tika.decompress.DecompressBuilder",
+                      "org.kitesdk.morphline.tika.decompress.UnpackBuilder",
+                      "org.apache.solr.morphlines.cell.SolrCellBuilder",
+                      "org.apache.solr.morphlines.solr.GenerateSolrSequenceKeyBuilder",
+		      "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
+
     
     commands : [
       { separateAttachments {} }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellXML.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellXML.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellXML.conf
index 43009bd..9e840a9 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellXML.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/solrCellXML.conf
@@ -25,7 +25,16 @@
 morphlines : [
   {
     id : morphline1
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.kitesdk.morphline.stdlib.AddValuesBuilder",
+                      "org.apache.solr.morphlines.cell.SolrCellBuilder",
+                      "org.apache.solr.morphlines.solr.GenerateSolrSequenceKeyBuilder",
+                      "org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder",
+		      "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
+    
     
     commands : [
       {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/tokenizeText.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/tokenizeText.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/tokenizeText.conf
index 9b62276..d9354c4 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/tokenizeText.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/tokenizeText.conf
@@ -16,7 +16,11 @@
 morphlines : [
   {
     id : morphline1
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+    
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.apache.solr.morphlines.solr.TokenizeTextBuilder"]
     
     commands : [                    
       { 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test-files/test-morphlines/tutorialReadAvroContainer.conf
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test-files/test-morphlines/tutorialReadAvroContainer.conf
b/solr/contrib/morphlines-core/src/test-files/test-morphlines/tutorialReadAvroContainer.conf
index 0c00686..eee4ba5 100644
--- a/solr/contrib/morphlines-core/src/test-files/test-morphlines/tutorialReadAvroContainer.conf
+++ b/solr/contrib/morphlines-core/src/test-files/test-morphlines/tutorialReadAvroContainer.conf
@@ -42,9 +42,14 @@ morphlines : [
     # morphline config file
     id : morphline1 
     
-    # Import all morphline commands in these java packages and their subpackages.
-    # Other commands that may be present on the classpath are not visible to this morphline.
-    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
+    # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning
limitations
+    # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876)
+    importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder",
+                      "org.kitesdk.morphline.avro.ReadAvroContainerBuilder",
+                      "org.kitesdk.morphline.avro.ExtractAvroPathsBuilder",
+                      "org.kitesdk.morphline.stdlib.ConvertTimestampBuilder",
+                      "org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder",
+		      "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
     
     commands : [                    
       { 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
b/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
index 9a5791e..c91f31b 100644
--- a/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
+++ b/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
@@ -20,7 +20,6 @@ import com.codahale.metrics.MetricRegistry;
 import com.google.common.io.Files;
 import com.typesafe.config.Config;
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.Constants;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -85,7 +84,6 @@ public class AbstractSolrMorphlineTestBase extends SolrTestCaseJ4 {
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    assumeFalse("This test fails on Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
Constants.JRE_IS_MINIMUM_JAVA9);
     
     // TODO: test doesn't work with some Locales, see SOLR-6458
     savedLocale = Locale.getDefault();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8756be05/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
----------------------------------------------------------------------
diff --git a/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
b/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
index 9aa27c4..31e7ebf 100644
--- a/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
+++ b/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
@@ -24,7 +24,6 @@ import java.util.Locale;
 import com.codahale.metrics.MetricRegistry;
 import com.google.common.collect.ListMultimap;
 import com.typesafe.config.Config;
-import org.apache.lucene.util.Constants;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.cloud.AbstractDistribZkTestBase;
@@ -79,9 +78,6 @@ public abstract class AbstractSolrMorphlineZkTestBase extends SolrCloudTestCase
   @BeforeClass
   public static void setupClass() throws Exception {
 
-    assumeFalse("This test fails on Java 9 (https://issues.apache.org/jira/browse/SOLR-8876)",
-        Constants.JRE_IS_MINIMUM_JAVA9);
-    
     assumeFalse("This test fails on UNIX with Turkish default locale (https://issues.apache.org/jira/browse/SOLR-6387)",
         new Locale("tr").getLanguage().equals(Locale.getDefault().getLanguage()));
 


Mime
View raw message