我正在尝试在windows下使用嵌入式模式下的钻取。但是我遇到以下错误:
> sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
Calculating HADOOP_CLASSPATH ...
HBASE_HOME not detected...
Calculating Drill classpath...
java.lang.NullPointerException
apache drill 1.13.0
"a drill is a terrible thing to waste"
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local>
0: jdbc:drill:zk=local> show tables;
No current connection
0: jdbc:drill:zk=local>
您可以看到没有当前连接,并且Web控制台也不起作用。感谢
编辑:添加日志文件内容。
2018-05-31 03:44:27,981 [主要] INFO o.a.drill.common.config.DrillConfig - 配置和插件文件 在115ms确定。基础配置: - jar:file:/ C:/apache-drill-1.13.0/jars/drill-common-1.13.0.jar!/drill-default.conf
中间配置和插件文件,按优先顺序排列: - jar:file:/ C:/apache-drill-1.13.0/jars/drill-storage-kafka-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-opentsdb-storage-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-hive-exec-shaded-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-java-exec-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-storage-hbase-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-kudu-storage-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-logical-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-jdbc-storage-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-mongo-storage-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-gis-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-memory-base-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-common-1.13.0.jar!/drill-module.conf - jar:file:/ C:/apache-drill-1.13.0/jars/drill-storage-hive-core-1.13.0.jar!/drill-module.conf
覆盖文件:file:/ C:/apache-drill-1.13.0/conf/drill-override.conf 重写属性:-user = -password = -zk = local
2018-05-31 03:44:28,278 [main] WARN o.a.drill.exec.util.GuavaPatcher - 无法修补番石榴类。 javassist.CannotCompileException:by java.lang.LinkageError:loader(instance of sun / misc / Launcher $ AppClassLoader):尝试重复的类 名称定义:" com / google / common / base / Stopwatch"在 javassist.ClassPool.toClass(ClassPool.java:1099) 〜[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1042) 〜[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1000) 〜[javassist-3.16.1-GA.jar:na] at javassist.CtClass.toClass(CtClass.java:1140) 〜[javassist-3.16.1-GA.jar:na] at org.apache.drill.exec.util.GuavaPatcher.patchStopwatch(GuavaPatcher.java:66) 〜[drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.exec.util.GuavaPatcher.patch(GuavaPatcher.java:36) 〜[drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.exec.server.Drillbit。(Drillbit.java:69) [drill-java-exec-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillConnectionImpl。(DrillConnectionImpl.java:134) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:73) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) [drill-jdbc-1.13.0.jar:1.13.0] at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138) [avatica-1.10.0.jar:1.10.0] at org.apache.drill.jdbc.Driver.connect(Driver.java:72) [drill-jdbc-1.13.0.jar:1.13.0] at sqlline.DatabaseConnection.connect(DatabaseConnection.java:168) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:214) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.Commands.connect(Commands.java:1083) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.Commands.connect(Commands.java:1015) [sqlline-1.1.9-drill-r7.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法) 〜[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 〜[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 〜[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) 〜[na:1.8.0_171] at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.dispatch(SqlLine.java:742) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.initArgs(SqlLine.java:528) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.begin(SqlLine.java:596) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.start(SqlLine.java:375) [sqlline-1.1.9-drill-r7.jar:na] at sqlline.SqlLine.main(SqlLine.java:268)[sqlline-1.1.9-drill-r7.jar:na] 引起:java.lang.LinkageError:loader(实例 sun / misc / Launcher $ AppClassLoader):尝试重复的类 名称定义:" com / google / common / base / Stopwatch"在 java.lang.ClassLoader.defineClass1(Native Method)〜[na:1.8.0_171] at at 需要java.lang.ClassLoader.defineClass(ClassLoader.java:763) 〜[na:1.8.0_171] at 需要java.lang.ClassLoader.defineClass(ClassLoader.java:642) 〜[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法) 〜[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 〜[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 〜[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) 〜[na:1.8.0_171] at javassist.ClassPool.toClass2(ClassPool.java:1112) 〜[javassist-3.16.1-GA.jar:na] at javassist.ClassPool.toClass(ClassPool.java:1093) 〜[Javassist进行-3.16.1-GA.jar:NA]
答案 0 :(得分:3)
你的HADOOP_CLASSPATH中有一个不兼容的Guava版本和Drill的版本。 你可以在这里找到类似的问题:DRILL-4931, DRILL-4928
尝试从HADOOP_CLASSPATH中排除番石榴罐,或者只是通过以下方式取消它:
~$unset HADOOP_CLASSPATH