Skip to content

[Issue #6967] NoClassDefFoundError when using druid-hdfs-storage#7015

Merged
jon-wei merged 3 commits intoapache:masterfrom
ankit0811:bugfix-extensions_corePOMDependency
Feb 9, 2019
Merged

[Issue #6967] NoClassDefFoundError when using druid-hdfs-storage#7015
jon-wei merged 3 commits intoapache:masterfrom
ankit0811:bugfix-extensions_corePOMDependency

Conversation

@ankit0811
Copy link
Copy Markdown
Contributor

Fix:

  1. hadoop-common dependency for druid-hdfs and druid-kerberos extensions
    Refactoring:
  2. HadoopDruidIndexerConfig.JSON_MAPPER call in the inner static class to avoid class path conflicts for stopGracefully kill

  1. hadoop-common dependency for druid-hdfs and druid-kerberos extensions
 Refactoring:
  2. Hadoop config call in the inner static class to avoid class path conflicts for stopGracefully kill
@jon-wei jon-wei self-requested a review February 6, 2019 01:29
@jon-wei
Copy link
Copy Markdown
Contributor

jon-wei commented Feb 6, 2019

There are some real UT failures:

org.apache.druid.segment.loading.HdfsDataSegmentFinderTest  Time elapsed: 2.25 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/apache/hadoop/net/StaticMapping
	at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:807)
	at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:485)
	at org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:444)
	at org.apache.druid.segment.loading.HdfsDataSegmentFinderTest.setupStatic(HdfsDataSegmentFinderTest.java:148)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.net.StaticMapping
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 21 more

Maybe some adjustment is needed for hadoop-common dependency in test scope

  1. hadoop-common test dependency
  1. Avoid issue of kill command once the job is actually completed
@jon-wei jon-wei added this to the 0.14.0 milestone Feb 9, 2019
@jon-wei jon-wei added the Bug label Feb 9, 2019
@jon-wei
Copy link
Copy Markdown
Contributor

jon-wei commented Feb 9, 2019

@ankit0811 thanks for the fix!

@jon-wei jon-wei merged commit 16a4a50 into apache:master Feb 9, 2019
jon-wei pushed a commit to jon-wei/druid that referenced this pull request Feb 9, 2019
apache#7015)

* Fix:
  1. hadoop-common dependency for druid-hdfs and druid-kerberos extensions
 Refactoring:
  2. Hadoop config call in the inner static class to avoid class path conflicts for stopGracefully kill

* Fix:
  1. hadoop-common test dependency

* Fix:
  1. Avoid issue of kill command once the job is actually completed
fjy pushed a commit that referenced this pull request Feb 9, 2019
…) (#7045)

* Fix:
  1. hadoop-common dependency for druid-hdfs and druid-kerberos extensions
 Refactoring:
  2. Hadoop config call in the inner static class to avoid class path conflicts for stopGracefully kill

* Fix:
  1. hadoop-common test dependency

* Fix:
  1. Avoid issue of kill command once the job is actually completed
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.

2 participants