Reputation: 3305
I have a HIVE table called testdata and the columns are as follows
From hive prompt when i am issuing the command "select * from testdata", it is showing me the whole dataset. But when i am issuing the command select name from testdata, it is showing me the error
java.net.NoRouteToHostException: No Route to Host from [NAMENODE_IP] to [CLUSTER_IP]:35946 failed on socket timeout exception: java.net.NoRouteToHostException: No route to host; For more details see: http://wiki.apache.org/hadoop/NoRouteToHost.
Can anybody please help me to find out what exactly i am doing wrong.
My Hadoop Version is 2.2.0 and Hive version is 0.11.0
Upvotes: 0
Views: 1494
Reputation: 272
I ran into the same trouble so I thought I would tell you guys what I did to fix this very issue.
1) Disable your firewall on the name node and see if it works
2) If it does then your firewall is blocking the network discussions between nodes. You will have to manually add rules to allow connections between your name node IPs
You can find how to do so with this very detailed answer on iptables here https://serverfault.com/questions/30026/whitelist-allowed-ips-in-out-using-iptables/30031#30031
Upvotes: 1
Reputation: 11
Check for your 'hosts' file, system's current IP should have to be first entry in your hosts file.
Upvotes: 1
Reputation: 1881
You need correct related hadoop configuration. It seems that hive cannot connect jobtracker.
When you query select * from testdata
, hive have not use mapreduce to get result.
While you query select name from testdata
, hive will call hadoop to start a mapreduce job.
So, make your hadoop configuration correct.
Upvotes: 0