-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDDS-1669. SCM startup is failing if network-topology-default.xml is part of a jar #946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
arp7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|
/retest |
|
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... |
|
💔 -1 overall
This message was automatically generated. |
|
Ok, it looks good to me. Finally the acceptance test shows real results: https://ci.anzix.net/job/ozone/17099/RobotTests/log.html
4 unit tests are independent, none of them are related to the network-topology error. Will merge it soon. |
…part of a jar Closes apache#946
Author: Ray Matharu <[email protected]> Reviewers: Jagadish<[email protected]> Closes apache#946 from rmatharu/removing-standby-config
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