You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "xiao123 (JIRA)" <ji...@apache.org> on 2019/02/19 07:50:00 UTC

[jira] [Created] (HIVE-21285) hive 3.1.1 on druid create/insert/select bug summary

xiao123 created HIVE-21285:
------------------------------

             Summary: hive 3.1.1 on druid create/insert/select bug summary
                 Key: HIVE-21285
                 URL: https://issues.apache.org/jira/browse/HIVE-21285
             Project: Hive
          Issue Type: Bug
            Reporter: xiao123


hive on druid select query  NullPoinException

env:

hive 3.1.1

hadoop 3.0.0

imply 2.8.12

 

create database is ok.
{code:java}
CREATE TABLE asteria.hive_druid 
STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler'
TBLPROPERTIES (
"druid.segment.granularity" = "MONTH",
"druid.query.granularity" = "DAY")
AS
SELECT cast(day as timestamp with local time zone) as `__time`,cast(city as string) as city,cast(reply_num as float) as reply_num FROM druid_demo;{code}
i can query on imply ui,but i query by hive-cli , i will apear the NullPointException
{code:java}
hive> select * from asteria.hive_druid limit 10;
2019-02-19T15:46:26,845 DEBUG [HttpClient-Netty-Worker-20] client.NettyHttpClient: [POST http://localhost:8083/druid/v2/] messageReceived: org.apache.hive.druid.org.jboss.netty.handler.codec.http.HttpChunk$1@72450d69
2019-02-19T15:46:26,845 DEBUG [HttpClient-Netty-Worker-20] client.NettyHttpClient: [POST http://localhost:8083/druid/v2/] Got chunk: 0B, last=true
Failed with exception java.io.IOException:java.lang.NullPointerException
2019-02-19T15:46:26,861 ERROR [306cc70b-f347-4343-a3aa-a6a69b99306e main] CliDriver: Failed with exception java.io.IOException:java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:602)
at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:509)
at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:146)
at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:2691)
at org.apache.hadoop.hive.ql.reexec.ReExecDriver.getResults(ReExecDriver.java:229)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
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.apache.hadoop.util.RunJar.run(RunJar.java:313)
at org.apache.hadoop.util.RunJar.main(RunJar.java:227)
Caused by: java.lang.NullPointerException
at org.apache.hadoop.hive.druid.serde.DruidSelectQueryRecordReader.nextKeyValue(DruidSelectQueryRecordReader.java:62)
at org.apache.hadoop.hive.druid.serde.DruidSelectQueryRecordReader.next(DruidSelectQueryRecordReader.java:85)
at org.apache.hadoop.hive.druid.serde.DruidSelectQueryRecordReader.next(DruidSelectQueryRecordReader.java:38)
at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:569)
... 16 more

2019-02-19T15:46:26,863 DEBUG [306cc70b-f347-4343-a3aa-a6a69b99306e main] exec.TableScanOperator: close called for operator TS[0]
2019-02-19T15:46:26,863 INFO [306cc70b-f347-4343-a3aa-a6a69b99306e main] exec.TableScanOperator: Closing operator TS[0]
{code}
insert into select
{code:java}
hive> insert into asteria.hive_druid SELECT cast(day as timestamp with local time zone) as `__time`,cast(city as string) as city,cast(reply_num as float) as reply_num FROM druid_demo where day="2019-02-01";
FAILED: NullPointerException null
hive> 
{code}
create external druid table wrong
{code:java}
hive> CREATE TABLE wikipedia 
> STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler';
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException Druid data source not specified; use druid.datasource in table properties)
hive> CREATE TABLE asteria.hive_druid 
> STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler'
> TBLPROPERTIES (
> "druid.datasource" = "wikipedia"
> );
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Datasource name cannot be specified using [druid.datasource] for managed tables using Druid)
hive> 
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)