Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
08b8c57
SOLR-14660 - Moving HDFS to a Contrib module
warperwolf Jul 21, 2020
edf037f
HDFS contrib module: moved the hdfs block directory implementation to…
warperwolf Mar 19, 2021
7d4903c
HDFS contrib module: removed HDFS direct reference from UpdateHandler
warperwolf Jul 27, 2020
ee32935
HDFS contrib module: moved shared core test classes to fixtures
warperwolf Jun 22, 2021
b640954
HDFS contrib module: separated HDFS vs Hadoop Test Classes
warperwolf Jun 25, 2021
a298d2b
HDFS contrib module: removed HDFS class dependencies from TestBackupR…
warperwolf Jun 25, 2021
7857f19
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 5, 2021
73b1fd8
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 5, 2021
7c209ae
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
bca9de1
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
7567da7
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
508e053
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
77f7be8
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
e90b3a5
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
b1128b7
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
1bbfcbd
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
1a19808
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
dfbb0e7
HDFS contrib module: separate HDFS test classes from Core test classe…
warperwolf Jul 6, 2021
1d5ee1f
HDFS contrib module: moved Fake Group Mapping to test fixtures so it …
warperwolf Jul 7, 2021
f60f7a1
HDFS contrib module: added missing dependencies to gradle build, adde…
warperwolf Jul 8, 2021
cee1e28
HDFS contrib module: fix renderJavaDoc errors
warperwolf Jul 9, 2021
c0be894
HDFS contrib module: removed deprecated flags
warperwolf Jul 12, 2021
e12f5b1
HDFS contrib module: added AwaitsFix annotation to HdfsRecoveryZKTest
warperwolf Aug 5, 2021
99302c8
HDFS Contrib module: Cleaned unused imports, added missing package-in…
warperwolf Aug 23, 2021
b21c9be
HDFS contrib module: moved test fixtures to the test framework.
warperwolf Sep 13, 2021
cfe474f
HDFS Contrib module: fixed build to not include hadoop transitive dep…
warperwolf Sep 20, 2021
383b456
HDFS Contrib Module: documentation updates
warperwolf Sep 21, 2021
bbc5442
Merged main branch to the hdfs module feature branch.
warperwolf Jan 21, 2022
2e2005b
HDFS Contrib Module: fixes after merging main to feature branch.
warperwolf Jan 23, 2022
3fea3f6
HDFS Contrib module: set a system parameter to ensure that all HDFS t…
warperwolf Jan 23, 2022
6d3a55b
HDFS Contrib module: some dependencies cleaned up, versions.lock upda…
warperwolf Jan 23, 2022
e0a4b5b
HDFS Contrib Module: PR fixes
warperwolf Jan 24, 2022
b3c2a99
Merge branch 'main' into ifarkas_HDFS_on_upstream_main
risdenk Jan 26, 2022
3053261
Fix a few contrib -> modules issues
risdenk Jan 26, 2022
2a5bf95
Fix AbstractBasicDistributedZkTestBase to match BasicDistributedZkTes…
risdenk Jan 26, 2022
90daa46
Fix versions.lock hash change
risdenk Jan 26, 2022
207f10c
Fix compilation errors due to annotations missing
risdenk Jan 26, 2022
6f764a0
Fix another config -> modules issue
risdenk Jan 26, 2022
2ec7d59
HDFS Contrib module: test resource files are now copied from core upo…
warperwolf Jan 26, 2022
9ae46ef
HDFS Contrib module: updateHandler will use the update log instance r…
warperwolf Jan 26, 2022
afedd2d
Simplify test-framework
risdenk Jan 27, 2022
9703b1f
Remove DirectoryFactory.LOCK_TYPE_HDFS
risdenk Jan 27, 2022
13d9dfc
Fix HdfsRestartWhileUpdatingTest
risdenk Jan 27, 2022
96322a6
Undo changes to HdfsTlogReplayBufferedWhileIndexingTest
risdenk Jan 27, 2022
3a9abc6
Ensure hdfs module is packaged
risdenk Jan 27, 2022
c34e6a9
Fix o.a.hadoop source patterns
risdenk Jan 28, 2022
13d07a6
Merge branch 'main' into ifarkas_HDFS_on_upstream_main
risdenk Jan 28, 2022
9675773
Remove HDFS contrib in docs
risdenk Jan 28, 2022
32aaf75
Make sure to consume the confDir in HdfsDirectoryFactory
risdenk Jan 28, 2022
856ca1c
Add comment about render-javadoc
risdenk Jan 28, 2022
bb216a7
Minor edits to documentation
risdenk Jan 28, 2022
e75d6ac
Undo some test file changes to make diff smaller
risdenk Jan 28, 2022
843fc71
HDFS module: use gradle variables to specify core test resources loca…
warperwolf Jan 28, 2022
ae67b14
Cleanup more dependencies
risdenk Jan 28, 2022
2a414d2
HDFS module: updated changelog and solr on hdfs documentation
warperwolf Jan 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions gradle/documentation/render-javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,25 @@ configure(project(":solr:test-framework")) {
"org.apache.solr.analysis",
"org.apache.solr.cloud",
"org.apache.solr.core",
"org.apache.solr.handler",
"org.apache.solr.handler.component",
"org.apache.solr.update.processor",
"org.apache.solr.util",
"org.apache.solr.search.similarities",
"org.apache.solr.search.function",
"org.apache.solr.search.facet",
"org.apache.solr.schema"
]
}
}

configure(project(":solr:modules:hdfs")) {
project.tasks.withType(RenderJavadocTask) {
// TODO: clean up split packages
javadocMissingIgnore = [
"org.apache.solr.core",
"org.apache.solr.core.backup.repository",
"org.apache.solr.update",
"org.apache.solr.util"
]
}
Expand Down
7 changes: 6 additions & 1 deletion gradle/validation/forbidden-apis.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ allprojects { prj ->
forbiddenApisMain.exclude("**/jmh_generated/**")
}

// Disable checks on code copied from Hadoop
if (prj.path == ":solr:modules:hdfs") {
forbiddenApisTest.exclude("**/org/apache/hadoop/**")
}

// We rely on resolved configurations to compute the relevant set of rule
// files for forbiddenApis. Since we don't want to resolve these configurations until
// the task is executed, we can't really use them as task inputs properly. This is a
Expand All @@ -141,4 +146,4 @@ allprojects { prj ->
task.inputs.dir(file(resources))
}
})
}
}
6 changes: 6 additions & 0 deletions gradle/validation/rat-sources.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ allprojects {
exclude "src/test-files/META-INF/services/*"
break

case ":solr:modules:hdfs":
exclude "src/test-files/**/*.aff"
exclude "src/test-files/**/*.dic"
exclude "src/test-files/**/*.incl"
break

case ":solr:modules:langid":
exclude "**/langdetect-profiles/*"
break
Expand Down
1 change: 1 addition & 0 deletions gradle/validation/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ configure(project(":solr").subprojects) { prj ->
case ":solr:modules:clustering":
case ":solr:modules:extraction":
case ":solr:modules:gcs-repository":
case ":solr:modules:hdfs":
case ":solr:modules:langid":
case ":solr:modules:ltr":
case ":solr:modules:scripting":
Expand Down
1 change: 0 additions & 1 deletion gradle/validation/validate-source-patterns.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ allprojects {
configure(project(':solr:core')) {
project.tasks.withType(ValidateSourcePatternsTask) {
sourceFiles.exclude 'src/**/CheckLoggingConfiguration.java'
sourceFiles.exclude 'src/test/org/apache/hadoop/**'
}
}

Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ include "solr:modules:s3-repository"
include "solr:modules:scripting"
include "solr:modules:ltr"
include "solr:modules:gcs-repository"
include "solr:modules:hdfs"
include "solr:webapp"
include "solr:benchmark"
include "solr:test-framework"
Expand Down
29 changes: 9 additions & 20 deletions solr/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ dependencies {
implementation 'commons-io:commons-io'
implementation 'com.carrotsearch:hppc'
implementation 'org.apache.commons:commons-collections4'
runtimeOnly 'commons-collections:commons-collections' // for Hadoop and...?

implementation('com.github.ben-manes.caffeine:caffeine') { transitive = false }

Expand Down Expand Up @@ -136,27 +135,17 @@ dependencies {
implementation ('org.apache.calcite:calcite-linq4j') { transitive = false }
implementation ('org.apache.calcite.avatica:avatica-core') { transitive = false }

// Hadoop; general stuff
implementation ('org.apache.hadoop:hadoop-common') { transitive = false } // too many to ignore
implementation ('org.apache.hadoop:hadoop-annotations')
runtimeOnly 'org.apache.htrace:htrace-core4' // note: removed in Hadoop 3.3.2
runtimeOnly "org.apache.commons:commons-configuration2"
testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false }
// Hadoop Test hacks for Java Security Manager -- SOLR-14033
testImplementation 'org.apache.commons:commons-compress'
testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false }

// HDFS
implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false }
testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false }
testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false }
testImplementation 'org.apache.logging.log4j:log4j-1.2-api'

// Hadoop auth framework
implementation ('org.apache.hadoop:hadoop-annotations')
implementation ('org.apache.hadoop:hadoop-auth') { transitive = false }
runtimeOnly 'com.google.re2j:re2j' // transitive of hadoop-common; used by Kerberos auth
runtimeOnly ('org.apache.kerby:kerb-core')
runtimeOnly ('org.apache.kerby:kerb-util')
implementation ('org.apache.hadoop:hadoop-common') { transitive = false }
// transitive of hadoop-common; used by Kerberos auth
runtimeOnly 'commons-collections:commons-collections'
runtimeOnly 'com.google.re2j:re2j'
runtimeOnly 'org.apache.commons:commons-configuration2'
runtimeOnly 'org.apache.htrace:htrace-core4' // note: removed in Hadoop 3.3.2
runtimeOnly 'org.apache.kerby:kerb-core'
runtimeOnly 'org.apache.kerby:kerb-util'

// Hadoop MiniKdc Dependencies (for Kerberos auth tests)
testImplementation ('org.apache.hadoop:hadoop-minikdc', {
Expand Down
10 changes: 9 additions & 1 deletion solr/core/src/java/org/apache/solr/core/DirectoryFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.lucene.store.LockFactory;
import org.apache.solr.common.SolrException;
import org.apache.solr.core.CachingDirectoryFactory.CloseListener;
import org.apache.solr.update.UpdateLog;
import org.apache.solr.util.plugin.NamedListInitializedPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -67,7 +68,6 @@ public enum DirContext {DEFAULT, META_DATA}
public final static String LOCK_TYPE_NATIVE = "native";
public final static String LOCK_TYPE_SINGLE = "single";
public final static String LOCK_TYPE_NONE = "none";
public final static String LOCK_TYPE_HDFS = "hdfs";

protected volatile CoreContainer coreContainer;

Expand Down Expand Up @@ -430,4 +430,12 @@ static DirectoryFactory loadDirectoryFactory(SolrConfig config, CoreContainer cc
}
return dirFactory;
}

/**
* Returns a default Update Log instance. UpdateHandler will invoke this method if the
* solrconfig / plugin info does not specify any ulog class.
*/
public UpdateLog newDefaultUpdateLog() {
return new UpdateLog();
}
}
12 changes: 6 additions & 6 deletions solr/core/src/java/org/apache/solr/update/UpdateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public UpdateHandler(SolrCore core, UpdateLog updateLog) {
boolean skipUpdateLog = core.getCoreDescriptor().getCloudDescriptor() != null && !core.getCoreDescriptor().getCloudDescriptor().requiresTransactionLog();
if (updateLog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled() && !skipUpdateLog) {
DirectoryFactory dirFactory = core.getDirectoryFactory();
if (dirFactory instanceof HdfsDirectoryFactory) {
ulog = new HdfsUpdateLog(((HdfsDirectoryFactory)dirFactory).getConfDir());
} else {
ulog = ulogPluginInfo.className == null ? new UpdateLog():
core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true);
}

// if the update log class is not defined in the plugin info / solrconfig.xml
// (like <updateLog class="${solr.ulog:solr.UpdateLog}"> )
// we fall back use the one which is the default for the given directory factory
ulog = ulogPluginInfo.className == null ? dirFactory.newDefaultUpdateLog() :
core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true);

if (!core.isReloaded() && !dirFactory.isPersistent()) {
ulog.clearLog(core, ulogPluginInfo);
Expand Down
2 changes: 1 addition & 1 deletion solr/core/src/test-files/core-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
<configuration>
<property>
<name>hadoop.security.group.mapping</name>
<value>org.apache.solr.cloud.hdfs.FakeGroupMapping</value>
<value>org.apache.solr.security.hadoop.HadoopAuthFakeGroupMapping</value>
</property>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void beforeTest() throws Exception {

Properties nodeProperties = new Properties();
// this sets the property for jetty starting SolrDispatchFilter
if (System.getProperty("solr.data.dir") == null && System.getProperty("solr.hdfs.home") == null) {
if (System.getProperty("solr.data.dir") == null) {
nodeProperties.setProperty("solr.data.dir", createTempDir().toFile().getCanonicalPath());
}
jetty = new JettySolrRunner(homeDir.getAbsolutePath(), nodeProperties, buildJettyConfig("/solr"));
Expand Down
Loading