impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonghyun Hwang <yongh...@cloudera.com>
Subject error while running "mvn -fae test" and how to resolve it
Date Thu, 20 Oct 2016 00:52:27 GMT
While running FE tests using "mvn -fae test", I observed an error saying
"NoClassDefFoundError". Below is the output.

$ source bin/impala-config.sh && cd fe && mvn -fae test
...
...
testDataSourceTables(org.apache.impala.planner.PlannerTest)  Time elapsed:
0.044 sec  <<< *ERROR*!
java.lang.NoClassDefFoundError*:
com/cloudera/impala/extdatasource/v1/ExternalDataSource*
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at
org.apache.impala.extdatasource.ExternalDataSourceExecutor.getDataSourceClass(ExternalDataSourceExecutor.java:150)
at
org.apache.impala.extdatasource.ExternalDataSourceExecutor.<init>(ExternalDataSourceExecutor.java:124)
at
org.apache.impala.planner.DataSourceScanNode.prepareDataSource(DataSourceScanNode.java:179)
at
org.apache.impala.planner.DataSourceScanNode.init(DataSourceScanNode.java:99)
at
org.apache.impala.planner.SingleNodePlanner.createScanNode(SingleNodePlanner.java:1262)
at
org.apache.impala.planner.SingleNodePlanner.createTableRefNode(SingleNodePlanner.java:1482)
at
org.apache.impala.planner.SingleNodePlanner.createTableRefsPlan(SingleNodePlanner.java:757)
at
org.apache.impala.planner.SingleNodePlanner.createSelectPlan(SingleNodePlanner.java:597)
at
org.apache.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:248)
at
org.apache.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:145)
at org.apache.impala.planner.Planner.createPlan(Planner.java:84)
at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1029)
at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1160)
at
org.apache.impala.planner.PlannerTestBase.testPlan(PlannerTestBase.java:443)
at
org.apache.impala.planner.PlannerTestBase.runTestCase(PlannerTestBase.java:403)
at
org.apache.impala.planner.PlannerTestBase.runPlannerTestFile(PlannerTestBase.java:662)
at
org.apache.impala.planner.PlannerTestBase.runPlannerTestFile(PlannerTestBase.java:689)
at org.apache.impala.planner.
*PlannerTest.testDataSourceTables(PlannerTest.java:158*)


Apparently, FE test tries to access com.cloudera.* while ExternalDataSource
is available only under org.apache.*.
Please note that com.cloudera was replaced with org.apache since
IMPALA-3786 got introduced.

$ git log --oneline | grep 3786
b2c2fe7 IMPALA-3786: Replace "cloudera" with "apache" (part 2)
b544f01 IMPALA-3786: Replace "cloudera" with "apache" (part 1)

I've figured out that "hive_impala_dump_cdh5-1062.txt",
"hive_impala_dump_cdh5-1057.txt", ..., have a line as follows;

$ grep extdata hive_impala_dump_cdh5-1057.txt
1123    __IMPALA_DATA_SOURCE_CLASS  *com.cloudera*
.impala.extdatasource.AllTypesDataSource.

And, this seems to be the culprit for the error.

I think anyone who loaded snapshot w/ hive_*1062.txt, hive_*1057.txt, or
the older, would see the error if s/he has rebased a git repo w/ the latest
master and hasn't reload snapshot.
The resolution on the error is to simply reload snapshot with the latest
hive*.txt and test-warehouse-*.tar.gz.

Thank you,
Yonghyun

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message