Skip to content

Conversation

@elek
Copy link
Member

@elek elek commented Jun 11, 2019

network-topology-default.xml can be loaded from file or classpath. But the NodeSchemaLoader assumes that the files on the classpath can be opened as a file. It's true if the file is in etc/hadoop (which is part of the classpath) but not true if the file is packaged to a jajr file:

{code}
scm_1 | 2019-06-11 13:18:03 INFO NodeSchemaLoader:118 - Loading file from jar:file:/opt/hadoop/share/ozone/lib/hadoop-hdds-common-0.5.0-SNAPSHOT.jar!/network-topology-default.xml
scm_1 | 2019-06-11 13:18:03 ERROR NodeSchemaManager:74 - Failed to load schema file:network-topology-default.xml, error:
scm_1 | java.lang.IllegalArgumentException: URI is not hierarchical
scm_1 | at java.io.File.(File.java:418)
scm_1 | at org.apache.hadoop.hdds.scm.net.NodeSchemaLoader.loadSchemaFromFile(NodeSchemaLoader.java:119)
scm_1 | at org.apache.hadoop.hdds.scm.net.NodeSchemaManager.init(NodeSchemaManager.java:67)
scm_1 | at org.apache.hadoop.hdds.scm.net.NetworkTopologyImpl.(NetworkTopologyImpl.java:63)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManager.initializeSystemManagers(StorageContainerManager.java:382)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManager.(StorageContainerManager.java:275)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManager.(StorageContainerManager.java:208)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManager.createSCM(StorageContainerManager.java:586)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter$SCMStarterHelper.start(StorageContainerManagerStarter.java:139)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.startScm(StorageContainerManagerStarter.java:115)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.call(StorageContainerManagerStarter.java:67)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.call(StorageContainerManagerStarter.java:42)
scm_1 | at picocli.CommandLine.execute(CommandLine.java:1173)
scm_1 | at picocli.CommandLine.access$800(CommandLine.java:141)
scm_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
scm_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
scm_1 | at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
scm_1 | at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
scm_1 | at picocli.CommandLine.parseWithHandler(CommandLine.java:1465)
scm_1 | at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:65)
scm_1 | at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:56)
scm_1 | at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.main(StorageContainerManagerStarter.java:56)
scm_1 | Failed to load schema file:network-topology-default.xml, error:
{code}

The quick fix is to keep the current behaviour but read the file from classloader.getResourceAsStream() instead of classloader.getResource().toURI()

See: https://issues.apache.org/jira/browse/HDDS-1669

Copy link
Contributor

@arp7 arp7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@elek
Copy link
Member Author

elek commented Jun 11, 2019

/retest

@elek
Copy link
Member Author

elek commented Jun 11, 2019

Thanks @arp7 the review. I will commit it after a clean jenkins build. I would like to be sure that the issues is fixed on the jenkins side. The last run is failed because a wrong path in the Jenkinsfile. I fixed it and I am waiting for the next build...

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 32 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 63 Maven dependency ordering for branch
+1 mvninstall 507 trunk passed
+1 compile 295 trunk passed
+1 checkstyle 88 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 903 branch has no errors when building and testing our client artifacts.
+1 javadoc 180 trunk passed
0 spotbugs 340 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 526 trunk passed
_ Patch Compile Tests _
0 mvndep 34 Maven dependency ordering for patch
+1 mvninstall 464 the patch passed
+1 compile 305 the patch passed
+1 javac 305 the patch passed
+1 checkstyle 95 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 2 The patch has no ill-formed XML file.
+1 shadedclient 681 patch has no errors when building and testing our client artifacts.
+1 javadoc 180 the patch passed
+1 findbugs 537 the patch passed
_ Other Tests _
-1 unit 153 hadoop-hdds in the patch failed.
-1 unit 1074 hadoop-ozone in the patch failed.
+1 asflicense 58 The patch does not generate ASF License warnings.
6413
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestFailureHandlingByClient
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.hdds.scm.safemode.TestSCMSafeModeWithPipelineRules
hadoop.hdds.scm.pipeline.TestSCMPipelineManager
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-946/1/artifact/out/Dockerfile
GITHUB PR #946
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml
uname Linux 4f1a92852b74 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / b057479
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-946/1/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-946/1/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-946/1/testReport/
Max. process+thread count 4486 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-ozone/integration-test U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-946/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@elek
Copy link
Member Author

elek commented Jun 11, 2019

Ok, it looks good to me.

Finally the acceptance test shows real results:

https://ci.anzix.net/job/ozone/17099/RobotTests/log.html

  1. audit parser will be fixed by HDDS-1630
  2. acl failure in mapreduce test is also a known issue

4 unit tests are independent, none of them are related to the network-topology error.

Will merge it soon.

@elek elek closed this in f918e3f Jun 11, 2019
bshashikant pushed a commit to bshashikant/hadoop that referenced this pull request Jul 10, 2019
shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
Author: Ray Matharu <[email protected]>

Reviewers: Jagadish<[email protected]>

Closes apache#946 from rmatharu/removing-standby-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants