Unable to write on hive on HDP2.4.0.0-169 sandbox when running scala application job from eclipse

53 views Asked by At

I am facing a weird issue which working with HDP2.4.0.0-169 sandbox. I have HDP with host name - sandbox.hortonworks.com and ip 192.168.159.129, I have all default hadoop and other services up and running on that.

I have written a spark code for creating a table in hive and reading the content any existing table of hive present on HDP. I also have a code for writing data/inserting data into newly created hive table.

As soon as I run this code from my Eclipse using run as Scala Application option, it creates the table. It also reads the table but it is not able to write anything in any new or existing table created. This seems to be very weird to me as I can create table but can not write anything in it. It gives me following error

Exception while executing hive query.java.net.UnknownHostException: sandbox.hortonworks.com

I have an entry for sandbox.hortonworks.com in my windows hosts file as well but unable to figure out why it is not allowing me to write any data in hive table when I can create a table?

Is there any user's read/write permission issue? If yes, then why it is allowing me to create and read data from hive using same user from eclipse? It is only not allowing me to insert data into those hive tables.

Any quick pointer/reference would be appreciated.

Regards, Bhupesh

1

There are 1 answers

0
Chauhan B On

Got it.

By mistake the entry made in C:\Windows\System32\drivers\etc\hosts file was wrong.

It should be 192.168.159.129 sandbox.hortonworks.com