Hi Valentine, 

Hive has been enhanced to include a MANAGEDLOCATION clause to specify the 
location of managed tables as shown in the following syntax:

CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name
  [LOCATION external_table_path]
  [MANAGEDLOCATION managed_table_directory_path]
  [WITH DBPROPERTIES (property_name=property_value, ...)];

Hive assigns a default location in the warehouse for managed 
tables—`hive.metastore.warehouse.dir`. In the MANAGEDLOCATION clause, you can 
specify a top-level directory for managed tables when creating a Hive database.

! Important: 
Do not use the LOCATION clause to specify the location of managed tables. This 
clause is only used to specify the location of external tables. Use the 
MANAGEDLOCATION clause if you are creating managed tables. You must also ensure 
that you do not set LOCATION and MANAGEDLOCATION to the same HDFS path.

For more details and context see:
https://issues.apache.org/jira/secure/attachment/12995898/Hive%20Metastore%20Support%20for%20Tenant-based%20storage%20heirarchy.pdf

Regards,
Denys

Reply via email to