Transformed hive date to druid, Getting below error

Hi Team,

I am getting below error when i do below steps

CREATE EXTERNAL TABLE test.druid_table_test_001 (__time TIMESTAMP, dimension1 STRING)STORED BY ‘org.apache.hadoop.hive.druid.DruidStorageHandler’;

insert into test.druid_table_test_001 values (1541193508050,‘abc’);

able to create tables from hive client and insert records. When i do select * from test.druid_table_test_001; GETTING BELOW ERROR.

Error: java.io.IOException: java.io.IOException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.hive.druid.org.jboss.netty.channel.ChannelException: Faulty channel in resource pool

at org.apache.hive.druid.com.google.common.base.Throwables.propagate(Throwables.java:160)

at org.apache.hadoop.hive.druid.security.KerberosHttpClient.inner_go(KerberosHttpClient.java:137)

at org.apache.hadoop.hive.druid.security.KerberosHttpClient.go(KerberosHttpClient.java:64)

at org.apache.hive.druid.com.metamx.http.client.AbstractHttpClient.go(AbstractHttpClient.java:14)

at org.apache.hadoop.hive.druid.DruidStorageHandlerUtils.submitRequest(DruidStorageHandlerUtils.java:268)

at org.apache.hadoop.hive.druid.io.DruidQueryBasedInputFormat.fetchLocatedSegmentDescriptors(DruidQueryBasedInputFormat.java:252)

at org.apache.hadoop.hive.druid.io.DruidQueryBasedInputFormat.distributeScanQuery(DruidQueryBasedInputFormat.java:218)

at org.apache.hadoop.hive.druid.io.DruidQueryBasedInputFormat.getInputSplits(DruidQueryBasedInputFormat.java:159)

at org.apache.hadoop.hive.druid.io.DruidQueryBasedInputFormat.getSplits(DruidQueryBasedInputFormat.java:100)

at org.apache.hadoop.hive.ql.exec.FetchOperator.generateWrappedSplits(FetchOperator.java:425)

at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(FetchOperator.java:395)

at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:314)

at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:540)

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:2728)

at org.apache.hadoop.hive.ql.reexec.ReExecDriver.getResults(ReExecDriver.java:229)

at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:462)

at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:328)

at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:910)

at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:564)

at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:786)

at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1837)

at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1822)

at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)

at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)

at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:647)

at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.util.concurrent.ExecutionException: org.apache.hive.druid.org.jboss.netty.channel.ChannelException: Faulty channel in resource pool

at org.apache.hive.druid.com.google.common.util.concurrent.Futures$ImmediateFailedFuture.get(Futures.java:186)

at org.apache.hadoop.hive.druid.security.KerberosHttpClient.inner_go(KerberosHttpClient.java:120)

… 29 more

Caused by: org.apache.hive.druid.org.jboss.netty.channel.ChannelException: Faulty channel in resource pool

at org.apache.hive.druid.com.metamx.http.client.NettyHttpClient.go(NettyHttpClient.java:143)

at org.apache.hadoop.hive.druid.security.KerberosHttpClient.inner_go(KerberosHttpClient.java:115)

… 29 more

Caused by: java.nio.channels.UnresolvedAddressException

at sun.nio.ch.Net.checkAddress(Net.java:101)

at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)

at org.apache.hive.druid.org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:108)

at org.apache.hive.druid.org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70)

at org.apache.hive.druid.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)

at org.apache.hive.druid.org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)

at org.apache.hive.druid.org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:97)

at org.apache.hive.druid.org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)

at org.apache.hive.druid.org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)

at org.apache.hive.druid.org.jboss.netty.channel.Channels.connect(Channels.java:634)

at org.apache.hive.druid.org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:215)

at org.apache.hive.druid.org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)

at org.apache.hive.druid.org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)

at org.apache.hive.druid.com.metamx.http.client.pool.ChannelResourceFactory.generate(ChannelResourceFactory.java:84)

at org.apache.hive.druid.com.metamx.http.client.pool.ChannelResourceFactory.generate(ChannelResourceFactory.java:41)

at org.apache.hive.druid.com.metamx.http.client.pool.ResourcePool$ImmediateCreationResourceHolder.get(ResourcePool.java:188)

at org.apache.hive.druid.com.metamx.http.client.pool.ResourcePool.take(ResourcePool.java:76)

at org.apache.hive.druid.com.metamx.http.client.NettyHttpClient.go(NettyHttpClient.java:136)

… 30 more (state=,code=0)

Hi, this error is more like an error from Hive rather than from Druid.
Would you please post the same question on the Hive user group?

Here is the link: https://hive.apache.org/mailing_lists.html

Jihoon

As per J, Son this is a Hive storage handler config issue.
seems like you have issue with either configs of Druids in Hive it self (hive.druid.broker.address.default) or your DNS is not working properly.

run set ; will list all the config and check if the broker address is correct next step will be to try ping it for the same host…