[ 
https://issues.apache.org/jira/browse/HIVE-20708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Bapat updated HIVE-20708:
----------------------------------
    Attachment: HIVE-20708.03
        Status: Patch Available  (was: Open)

When replicating a managed table with a partition created with a specific 
location, the location of partition on target is not retained i.e. the 
partition on target is located inside the managed table directory even if it's 
not located under the managed table directory on source. In fact, we do not 
include the partition's location when dumping it. I have used the same 
mechanism for a partition of an external table i.e. it's located under the 
external table's directory on target even if it's not located under the 
external table's directory on the source.

Even though we are not preserving the location of a partition of an external 
table, the external table's location is preserved and thus should serve the 
purpose of preserving locations stated above.

> Load (dumped) an external table as an external table on target with the same 
> location as on the source
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-20708
>                 URL: https://issues.apache.org/jira/browse/HIVE-20708
>             Project: Hive
>          Issue Type: Improvement
>          Components: repl
>            Reporter: Ashutosh Bapat
>            Assignee: Ashutosh Bapat
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-20708.01, HIVE-20708.02, HIVE-20708.03
>
>
> External tables are currently mapped to managed tables on target. A lot of 
> jobs in user environment are dependent upon locations specified in external 
> table definitions to run, hence, the path for external tables on the target 
> and on the source are expected to be the same. An external table being loaded 
> as a  managed table makes it difficult for failover (Controlled Failover) / 
> failback since there is no option of moving data from managed to external 
> table. So the external table replicated to target cluster needs to be kept as 
> external table with same location as on the source.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to