hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-21500) Disable conversion of managed table to external and vice versa at source.
Date Thu, 11 Apr 2019 16:59:01 GMT

     [ https://issues.apache.org/jira/browse/HIVE-21500?focusedWorklogId=226155&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226155
]

ASF GitHub Bot logged work on HIVE-21500:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Apr/19 16:58
            Start Date: 11/Apr/19 16:58
    Worklog Time Spent: 10m 
      Work Description: ashutosh-bapat commented on pull request #591: HIVE-21500: Disable
conversion of managed table to external and vice versa at source.
URL: https://github.com/apache/hive/pull/591#discussion_r274518311
 
 

 ##########
 File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
 ##########
 @@ -803,6 +805,22 @@ public Partition alterPartition(RawStore msdb, Warehouse wh, String
catName, Str
     return oldParts;
   }
 
+  private void checkTableTypeConversion(Database db, Table oldTbl, Table newTbl)
 
 Review comment:
   Although the comment talks about external and managed the condition below just checks whether
the table type has changed - an apparent disconnect between comment and code. The code is
correct since we support only these two as table types right now. But either comment should
explain this OR we should explicitly check tables type to be future proof.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 226155)
    Time Spent: 1h  (was: 50m)

> Disable conversion of managed table to external and vice versa at source.
> -------------------------------------------------------------------------
>
>                 Key: HIVE-21500
>                 URL: https://issues.apache.org/jira/browse/HIVE-21500
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 4.0.0
>            Reporter: Sankar Hariappan
>            Assignee: Sankar Hariappan
>            Priority: Major
>              Labels: DR, Replication, pull-request-available
>         Attachments: HIVE-21500.01.patch, HIVE-21500.02.patch
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Couple of scenarios for Hive2 to Hive3(strict managed tables enabled) replication where
managed table is converted to external at source. 
> *Scenario-1: (ACID/MM table converted to external at target)*
> 1. Create non-ACID ORC format table.
> 2. Insert some rows
> 3. Replicate this create event which creates ACID table at target (due to migration rule).
Each insert event adds transactional metadata in HMS corresponding to the current table.
> 4. Convert table to external table using ALTER command at source.
> *Scenario-2: (External table at target changes table location)*
> 1. Create non-ACID avro format table.
> 2. Insert some rows
> 3. Replicate this create event which creates external table at target (due to migration
rule). The data path is chosen under default external warehouse directory.
> 4. Convert table to external table using ALTER command at source.
> It is unable to convert an ACID table to external table at target. Also, it is hard to
detect what would be the table type at target when perform this ALTER table operation at source.
> So, it is decided to disable conversion of managed table at source (Hive2) to EXTERNAL
or vice-versa if the DB is enabled for replication and strict managed is disabled.



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

Mime
View raw message