Skip to content

Commit d3506c4

Browse files
committed
Fix silently failing hdfs fixture
1 parent 39fc7aa commit d3506c4

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

gradle/verification-metadata.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,11 @@
14791479
<sha256 value="fd63b583fd3e8baeae22efacbd5a4f91c1fd97f56248e62e2615efa7b81daeaa" origin="Generated by Gradle"/>
14801480
</artifact>
14811481
</component>
1482+
<component group="commons-daemon" name="commons-daemon" version="1.0.15">
1483+
<artifact name="commons-daemon-1.0.15.jar">
1484+
<sha256 value="61a8f2b067b3ae8b3684669509250faffedbcfabd50f055bbe60c3fd5f0eb01e" origin="Generated by Gradle"/>
1485+
</artifact>
1486+
</component>
14821487
<component group="commons-daemon" name="commons-daemon" version="1.4.0">
14831488
<artifact name="commons-daemon-1.4.0.jar">
14841489
<sha256 value="6b8e35b13f27f265fed0caa7c4ce9d13b790662af5f48cb7d41df394de759dbd" origin="Generated by Gradle"/>

plugins/repository-hdfs/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ tasks.register("javaRestTestHdfs2", RestIntegTestTask) {
137137
}
138138

139139
tasks.named('yamlRestTest').configure {
140-
classpath = sourceSets.yamlRestTest.runtimeClasspath + configurations.hdfsFixture2
140+
classpath = sourceSets.yamlRestTest.runtimeClasspath + configurations.hdfsFixture3
141141
}
142142

143143
tasks.register("yamlRestTestHdfs2", RestIntegTestTask) {

test/fixtures/hdfs-fixture/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ dependencies {
156156
hdfs2("org.apache.hadoop:hadoop-annotations:2.8.5")
157157
hdfs2("org.apache.hadoop:hadoop-hdfs-client:2.8.5")
158158
hdfs2("org.apache.hadoop:hadoop-minicluster:2.8.5")
159+
hdfs2("commons-daemon:commons-daemon:1.0.15")
159160

160161
hdfs3("org.apache.hadoop:hadoop-minicluster:3.3.1")
161162
hdfs3("org.apache.hadoop:hadoop-common:3.3.1")

test/fixtures/hdfs-fixture/src/main/java/org/elasticsearch/test/fixtures/hdfs/HdfsFixture.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ private void tryStartingHdfs(Path hdfsHome) throws ClassNotFoundException, NoSuc
224224
cfg = new Configuration();
225225
cfg.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, hdfsHome.toAbsolutePath().toString());
226226
cfg.set("hadoop.security.group.mapping", "org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback");
227+
// Disable HTTP server to avoid webapp issues with Hadoop 2.x
228+
cfg.set(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY, "0.0.0.0:0");
229+
cfg.set(DFSConfigKeys.DFS_DATANODE_HTTP_ADDRESS_KEY, "0.0.0.0:0");
227230

228231
// optionally configure security
229232
if (isSecure()) {

0 commit comments

Comments
 (0)