[ 
https://issues.apache.org/jira/browse/HIVE-20967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832627#comment-16832627
 ] 

Ashutosh Bapat commented on HIVE-20967:
---------------------------------------

[~maheshk114]
 # if I remember correctly, it was decided that the location change should be 
blocked for both type of cluster. Cluster with strict managed set  true and 
false. 
 ## Done.
 # For change location check, no need to set isChangingLocation ..just check if 
the table is external and throw error.
 ## I didn't get this. If you are suggesting that a table which isn't a managed 
table is always going to be external and vice versa, that may not be valid 
going forward. So, we can't rely on that.
 # Add test code for strict managed true cases also.
 ## Done.
 # Redundant declaration can be removed. (public String ALTERLOCATION = 
"ALTERLOCATION")
 ## This declaration is being used, but it doesn't require to be explicitly 
"public" declaration. Removed "public" from there. Once you clarify the second 
comment, it may become redundant. In that case I will remove it from there.
 # Extra parameter is passed to alterTableOrSinglePartition method can be 
removed.
 ## Thanks for catching this. Removed.

> Handle alter events when replicate to cluster with hive.strict.managed.tables 
> enabled.
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-20967
>                 URL: https://issues.apache.org/jira/browse/HIVE-20967
>             Project: Hive
>          Issue Type: Sub-task
>          Components: repl
>    Affects Versions: 4.0.0
>            Reporter: mahesh kumar behera
>            Assignee: Ashutosh Bapat
>            Priority: Minor
>              Labels: DR, pull-request-available
>         Attachments: HIVE-20967.01.patch, HIVE-21678.02.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Some of the events from Hive2 may cause conflicts in Hive3 
> (hive.strict.managed.tables=true) when applied. So, need to handle them 
> properly.
>  1. Alter table to convert non-acid to acid.
>  - Do not allow this conversion on source of replication if strict.managed is 
> false.
> 2. Alter table or partition that changes the location.
>  - For managed tables at source, the table location shouldn't be changed for 
> the given non-partitioned table and partition location shouldn't be changed 
> for partitioned table as alter event doesn't capture the new files list. So, 
> it may cause data inconsistsency. So, if database is enabled for replication 
> at source, then alter location on managed tables should be blocked.
>  - For external partitioned tables, if location is changed at source, the the 
> location should be changed for the table and any partitions which reside 
> within the table location, but not for the partitions which are not within 
> the table location. (may be we just need the test).



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

Reply via email to