You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/01/28 20:11:24 UTC

[GitHub] [solr] madrob commented on a change in pull request #324: SOLR-14660 - move HDFS to a module

madrob commented on a change in pull request #324:
URL: https://github.com/apache/solr/pull/324#discussion_r794727164



##########
File path: solr/modules/hdfs/build.gradle
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+apply plugin: 'java-library'
+
+description = 'HDFS Contrib Module'
+
+dependencies {
+  configurations.all {
+    exclude group: 'log4j', module: 'log4j'
+    exclude group: 'commons-logging', module: 'commons-logging'
+    exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+    exclude group: 'org.apache.yetus', module: 'audience-annotations'
+    exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
+   // be conservative on what's added here.  Affects *all* configs, including internal ones.
+  }
+
+  implementation project(':solr:core')
+
+  // Hadoop dependencies
+  implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false }
+  implementation ('org.apache.hadoop:hadoop-auth') { transitive = false }
+  implementation ('org.apache.hadoop:hadoop-common') { transitive = false }
+  implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false }
+  implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false }
+
+  // Guava implements the VisibleForTesting annotations
+  implementation ('com.google.guava:guava') { transitive = false }
+
+  // Caffeine cache to implement HDFS block caching  
+  implementation ('com.github.ben-manes.caffeine:caffeine')
+
+  // Many HDFS tests are using/subclassing test framework classes
+  testImplementation project(':solr:solrj')
+  testImplementation project(':solr:test-framework')
+
+  // hadoop dependencies for tests
+  testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false }
+  testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false }
+  testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false }
+  testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false }
+
+  testImplementation 'org.slf4j:jcl-over-slf4j'
+  testImplementation 'org.apache.logging.log4j:log4j-1.2-api'
+
+  // classes like solr.ICUCollationField, used by NNFailoverTest for example.
+  testImplementation project(':solr:modules:analysis-extras')
+
+  // required for instantiating a Zookeeper server in tests or embedded
+  runtimeOnly ('org.xerial.snappy:snappy-java')
+
+  // commons packages needed by test classes
+  testImplementation('commons-io:commons-io') { transitive = false }
+
+  // used by the hadoop-specific test framework classes
+  testImplementation ('org.apache.commons:commons-compress') { transitive = false }
+  testImplementation ('org.apache.commons:commons-collections4') { transitive = false }
+  testImplementation ('org.apache.commons:commons-lang3') { transitive = false }
+  testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false }
+
+  // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this
+  implementation ('org.apache.zookeeper:zookeeper')
+}
+
+
+// Copy all the test resource files from core to the build/resources/test directory
+// of the HDFS module so we can avoid duplication of the test resource files like
+// schemas and SolrConfigs. This can be improved later by making the test classes
+// load the resources from core directories directly.
+task copySolrCoreTestResources(type: Copy) {
+  from('../../core/src/test-files') {

Review comment:
       Can we do `from project(':solr:core').sourceSets.test.resources.srcDirs` here? Not sure if dependency resolution actually allows it or not.

##########
File path: solr/core/build.gradle
##########
@@ -146,11 +146,6 @@ dependencies {
   testImplementation 'org.apache.commons:commons-compress'
   testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false }
 
-  // HDFS

Review comment:
       Can we remove all of the Hadoop stuff above this paragraph as well?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org