Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java.net.ConnectException when trying to overwrite a table in Hive?

Highlighted

java.net.ConnectException when trying to overwrite a table in Hive?

New Contributor

I'm already having a table(test) in hive, with a single column (logtype) which has around 5 rows.

And I created another table(hive_to_elastic) with ES properties as such:

CREATE EXTERNAL TABLE hive_to_elastic(logtype string) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource'='my_index/my_type','es.nodes'='10.2.2.47','es.port'='9200'); 

Now I'm simply trying to copy the data from test to hive_to_elastic by executing the below query:

INSERT OVERWRITE TABLE hive_to_elastic SELECT * FROM test;

But what I can see is this:

16589-mu6dj.png

And it's frozen after that point. I couldn't see the no of docs count increasing in my ES index.After a long time since I've started executed the query, I get this exception:

16590-sketch.png

Where am I going wrong? Any help could be appreciated. Thanks!

2 REPLIES 2

Re: java.net.ConnectException when trying to overwrite a table in Hive?

@Kulasangar Gowrisangar

Do you have Resource Manager HA? This should be connecting to rm1 first (whichever is configured as rm1 in yarn->configs), and that is in standby state. But it will go to the active rm, after this exception. Does this query complete?

Re: java.net.ConnectException when trying to overwrite a table in Hive?

New Contributor

@Mugdha Thank you so much for the reply.

Do you have Resource Manager HA?

Umm you mean, whether Resource Manager is up and running? If so yes it's up. and I can see it when I type in jps.

Does this query complete?

Nop it doesn't get executed. It ends up with the exception (Caused by: java.net.ConnectException: Connection refused) itself.

I tried disabling the firewall, but no luck yet.