- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
getting issue after run the command in Hive
- Labels:
-
Apache Hive
Created ‎09-01-2016 06:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using HDP 2.4.2-258.
I ran the command on hive terminal but getting following error:-
hive> show create table hive_table;
FAILED: SemanticException Unable to fetch table hive_table. java.io.IOException: Incomplete HDFS URI, no host: hdfs://hdptest:8020:8020/
hive> show create table hive_table;
FAILED: SemanticException Unable to fetch table hive_table. java.io.IOException: Incomplete HDFS URI, no host: hdfs://hdptest:8020:8020
Dont know from where this path is taking because I updated the path with following command:-
hive --service metatool -updateLocation hdfs://hdptest1:8020 hdfs://localhost:8020
It's urgent.
Thanks in advance.
Created ‎09-01-2016 07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You dont need to specify 8020 port when updating with metatool for updating nameservice ID
Try below command to set FS path
#hive --service metatool -updateLocation hdfs://hdptest1 hdfs://hdptest1:8020
Created ‎09-01-2016 07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You dont need to specify 8020 port when updating with metatool for updating nameservice ID
Try below command to set FS path
#hive --service metatool -updateLocation hdfs://hdptest1 hdfs://hdptest1:8020
Created ‎09-01-2016 07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Connect to db and verify if it has updated the location in tables SDS.
mysql> use hive;
mysql> select LOCATION from SDS;
Created ‎09-01-2016 08:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I truncate the SDS table now getting null exception.
hive> show create table hive_table;
FAILED: SemanticException Unable to fetch table hive_table. null
Created ‎09-01-2016 09:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply issue is resolved.
Created ‎09-01-2016 07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried this command and the command ran successfully. But still facing same issue:-
hive> select * from hive_table;
FAILED: SemanticException Unable to fetch table hive_table. java.io.IOException: Incomplete HDFS URI, no host: hdfs://hdptest1:8020:8020/
Created ‎09-01-2016 07:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue seems to be related to the incorrect HDFS URI at the time of table creation. Try creating new sample table and try.
Created ‎09-01-2016 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Sindhu
The issue is with location tables are created in corrrect way. As per the comment of @rguruvannagari issue with SDS table after truncate the table that issue is resolved now getting new error:
hive> show create table hive_table;
FAILED: SemanticException Unable to fetch table hive_table. null
Created ‎03-13-2018 04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue may happen when Hive Metastore's 'DBS' table contains a location which doesn't have port.
For example, 'hdfs://sandbox-hdp.hortonworks.com/apps/hive/warehouse/dummies.db'
I think above is a valid location path, but when HS2 is restarted from Ambari, Ambari replaces not only this 'DBS' location, but also all 'SDS' locations with, for example, like below:
old location: hdfs://sandbox-hdp.hortonworks.com:8020/apps/hive/warehouse/dummies.db/emp_part_bckt/department=A new location: hdfs://sandbox-hdp.hortonworks.com:8020:8020/apps/hive/warehouse/dummies.db/emp_part_bckt/department=A
So that next time hiveserver2 is restarted, you don't see this behaviour, but you still need to correct SDS location.
