Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to fine the Hive location folder

avatar
Explorer

I installed Hive and create table.When i check the table properties using "describe extended recharge", then i found the table was created in below location

location:hdfs://localhost:9000/user/hive/warehouse/telecom.db/recharge

I try to find the location inside user folder, but i can't find the hive/warehouse folder ?

12 REPLIES 12

avatar
Explorer

@Sindhu below are the results

1) hive> describe formatted telecom.recharge;

hive> describe formatted telecom.recharge;
OK
# col_name                data_type               comment             
          
cell_no                 int                                         
city                    string                                      
name                    string                                      
          
# Detailed Table Information          
Database:               telecom                  
Owner:                  aruna                    
CreateTime:             Wed Feb 22 12:40:21 SGT 2017     
LastAccessTime:         UNKNOWN                  
Protect Mode:           None                     
Retention:              0                        
Location:               hdfs://localhost:9000/user/hive/warehouse/telecom.db/recharge     
Table Type:             MANAGED_TABLE            
Table Parameters:          
    COLUMN_STATS_ACCURATE    true                
    numFiles                2                   
    totalSize               93                  
    transient_lastDdlTime    1487773869          
          
# Storage Information          
SerDe Library:          org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe     
InputFormat:            org.apache.hadoop.mapred.TextInputFormat     
OutputFormat:           org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat     
Compressed:             No                       
Num Buckets:            -1                       
Bucket Columns:         []                       
Sort Columns:           []                       
Storage Desc Params:          
    field.delim             ,                   
    serialization.format    ,                   
Time taken: 0.141 seconds, Fetched: 32 row(s)

2) hadoop fs -ls /user/hive/warehouse

aruna@aruna:~/hadoop-2.7.3/sbin$ hadoop fs -ls /user/hive/warehouse
Found 4 items
drwxrwxr-x   - aruna supergroup          0 2017-02-23 12:00 /user/hive/warehouse/myreatail.db
drwxrwxr-x   - aruna supergroup          0 2017-02-22 19:45 /user/hive/warehouse/telecom.db
drwxrwxr-x   - aruna supergroup          0 2017-02-22 12:23 /user/hive/warehouse/telecome_bkp.db
drwxrwxr-x   - aruna supergroup          0 2017-02-22 12:26 /user/hive/warehouse/telecome_bkp_extend.db

3) hadoop fs -ls /user/hive/warehouse/telecom.db

aruna@aruna:~/hadoop-2.7.3/sbin$ hadoop fs -ls /user/hive/warehouse/telecom.db
Found 3 items
drwxrwxr-x   - aruna supergroup          0 2017-02-22 22:31 /user/hive/warehouse/telecom.db/recharge
drwxrwxr-x   - aruna supergroup          0 2017-02-22 17:48 /user/hive/warehouse/telecom.db/recharged
drwxrwxr-x   - aruna supergroup          0 2017-02-22 19:45 /user/hive/warehouse/telecom.db/recharged2

avatar
@Aruna Sameera

I am suspecting the issue to be with the difference in the hdfs URI table using and the actual URI. Compare the output of below commands:

metatool -listFSRoot

hdfs getconf -nnRpcAddresses

avatar
Explorer

1) metatool -listFSRoot

email.input  employee.input  extrnl  recharge.input  txns1.txt
aruna@aruna:~/hive_demo$ metatool -listFSRoot
Initializing HiveMetaTool..
17/02/28 14:07:46 INFO metastore.ObjectStore: ObjectStore, initialize called
17/02/28 14:07:46 INFO DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored
17/02/28 14:07:46 INFO DataNucleus.Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored
17/02/28 14:07:58 INFO metastore.ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
17/02/28 14:08:00 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
17/02/28 14:08:00 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
17/02/28 14:08:08 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
17/02/28 14:08:08 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
17/02/28 14:08:10 INFO metastore.MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY
17/02/28 14:08:10 INFO metastore.ObjectStore: Initialized ObjectStore
Listing FS Roots..

2) hdfs getconf -nnRpcAddresses

aruna@aruna:~/hive_demo$ hdfs getconf -nnRpcAddresses
localhost:9000