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

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

                Author: ASF GitHub Bot
            Created on: 22/Mar/19 16:37
            Start Date: 22/Mar/19 16:37
    Worklog Time Spent: 10m 
      Work Description: maheshk114 commented on pull request #578: HIVE-21471: 
Replicating conversion of managed to external table leaks HDFS files at target.
URL: https://github.com/apache/hive/pull/578#discussion_r268127478
 
 

 ##########
 File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosExternalTables.java
 ##########
 @@ -673,6 +674,59 @@ public void 
retryIncBootstrapExternalTablesFromDifferentDumpWithoutCleanTablesCo
             ErrorMsg.REPL_BOOTSTRAP_LOAD_PATH_NOT_VALID.getErrorCode());
   }
 
+  @Test
+  public void dynamicallyConvertManagedToExternalTable() throws Throwable {
+    List<String> dumpWithClause = Collections.singletonList(
+            "'" + HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES.varname + 
"'='true'"
+    );
+    List<String> loadWithClause = externalTableBasePathWithClause();
+
+    WarehouseInstance.Tuple tupleBootstrapManagedTable = primary.run("use " + 
primaryDbName)
+            .run("create table t1 (id int)")
+            .run("insert into table t1 values (1)")
+            .run("create table t2 (id int) partitioned by (key int)")
 
 Review comment:
   The case is for migration, so the test should be there for migration case. 
Alter of acid table to external table should be avoided 
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 217322)
    Time Spent: 40m  (was: 0.5h)

> Replicating conversion of managed to external table leaks HDFS files at 
> target.
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-21471
>                 URL: https://issues.apache.org/jira/browse/HIVE-21471
>             Project: Hive
>          Issue Type: Bug
>          Components: repl
>    Affects Versions: 4.0.0
>            Reporter: Sankar Hariappan
>            Assignee: Sankar Hariappan
>            Priority: Major
>              Labels: DR, pull-request-available, replication
>         Attachments: HIVE-21471.01.patch, HIVE-21471.02.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> While replicating the ALTER event to convert managed table to external table, 
> the data location for the table is changed under input base directory for 
> external tables replication. But, the old location remains there and would be 
> leaked for ever.
> ALTER TABLE T1 SET TBLPROPERTIES('EXTERNAL'='true');



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

Reply via email to