Created 08-16-2018 04:56 AM
Created 08-16-2018 05:40 AM
You could find the location with below queries:
1. describe formatted <table_name>;
2. show create table <table_name>;
Created on 08-16-2018 05:44 AM - edited 08-17-2019 07:15 PM
Created 08-16-2018 05:56 AM
You need to run it under beeline / hive cli as below:
[root@xxx ~]# su - hive [hive@xxx ~]$ hive Logging initialized using configuration in file:/etc/hive/2.5.3.0-37/0/hive-log4j.properties hive> show create table flight_orc; OK CREATE TABLE `flight_orc`( `flightnum` string, `arrtime` int, `deptime` int, `crsarrtime` int, `crsdeptime` int, `arrdelay` int, `depdelay` int, `airtime` int) ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' LOCATION 'hdfs://xxx.com:8020/apps/hive/warehouse/flight_orc' TBLPROPERTIES ( 'numFiles'='3', 'numRows'='1000000', 'rawDataSize'='110912400', 'totalSize'='397173299', 'transient_lastDdlTime'='1516645288') Time taken: 4.901 seconds, Fetched: 23 row(s) hive>
Created 08-16-2018 11:02 AM
You are not seeing anything because you are running the command as root user ! You will have to switch to the hive user and use hive or beeline
# su - hive $ hive
Then at the prompt run the create statement
hive> CREATE TABLE IF NOT EXISTS emp ( eid int, name String, salary String, destination String) COMMENT ‘Employee details’ ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘\t’ LINES TERMINATED BY ‘\n’ STORED AS TEXTFILE;
And then run
hive> show table emp;
HTH