我在Windows 10上使用apache-drill-1.12.0。我得到了#34;没有当前连接"发送任何查询时出错。此外,应该在localhost:8047上工作的钻取Web控制台不起作用。
我在StackOverflow上搜索了许多关于正确设置JAVA_HOME环境变量以避免错误的答案。
我已正确设置了JAVA_HOME系统变量,这就是证据。
C:\Users\Dinesh>java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
C:\Users\Dinesh>javac -version
javac 1.8.0_171
C:\Users\Dinesh>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_171
现在这里有以下一组错误,我正面临着在Windows 10上进行apache钻取。
C:\Users\Dinesh\Desktop\Drill\apache-drill-1.12.0\bin>sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Error: Failure in starting embedded Drillbit: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill" (state=,code=0)
java.sql.SQLException: Failure in starting embedded Drillbit: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill"
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:142)
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:144)
at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
at sqlline.Commands.connect(Commands.java:1083)
at sqlline.Commands.connect(Commands.java:1015)
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 sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:742)
at sqlline.SqlLine.initArgs(SqlLine.java:528)
at sqlline.SqlLine.begin(SqlLine.java:596)
at sqlline.SqlLine.start(SqlLine.java:375)
at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill"
at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:203)
at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:182)
at org.apache.drill.exec.store.sys.store.LocalPersistentStore$2.apply(LocalPersistentStore.java:142)
at org.apache.drill.exec.store.sys.store.LocalPersistentStore$2.apply(LocalPersistentStore.java:138)
at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at com.google.common.collect.Iterators.addAll(Iterators.java:362)
at com.google.common.collect.Lists.newArrayList(Lists.java:160)
at org.apache.drill.exec.store.StoragePluginRegistryImpl.createPlugins(StoragePluginRegistryImpl.java:164)
at org.apache.drill.exec.store.StoragePluginRegistryImpl.init(StoragePluginRegistryImpl.java:129)
at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:188)
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:133)
... 18 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Could not resolve type id 'openTSDB' into a subtype of [simple type, class org.apache.drill.common.logical.StoragePluginConfig]: known type ids = [InfoSchemaConfig, StoragePluginConfig, SystemTablePluginConfig, file, hbase, hive, jdbc, kafka, kudu, mock, mongo, named]
at [Source: [B@519e7396; line: 2, column: 12]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:256)
at com.fasterxml.jackson.databind.DeserializationContext.unknownTypeException(DeserializationContext.java:1083)
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:281)
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:163)
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:106)
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:63)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1579)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1217)
at org.apache.drill.exec.serialization.JacksonSerializer.deserialize(JacksonSerializer.java:38)
at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:201)
... 29 more
apache drill 1.12.0
"a drill in the hand is better than two in the bush"
0: jdbc:drill:zk=local> SELECT version FROM sys.version;
No current connection
0: jdbc:drill:zk=local>
这里我从命令行得到的主要错误是启动嵌入式Drillbit失败:java.lang.RuntimeException:无法反序列化&#34; /tmp/drill/sys.storage_plugins/openTSDB.sys.drill& #34; (状态=,代码= 0)
答案 0 :(得分:3)
看起来您之前使用过较旧(或较新)版本的Drill,并且该版本在/tmp/drill/sys.storage_plugins/文件夹中创建了插件配置。 如果更改了任何插件配置,则用户应删除该目录以使用其他版本的Drill。
我建议您使用最新的Drill 1.13版本的Drill并清理/ tmp / drill /目录。