sankarh commented on a change in pull request #628: HIVE-21731 : Hive import 
fails, post upgrade of source 3.0 cluster, to a target 4.0 cluster with strict 
managed table set to true.
URL: https://github.com/apache/hive/pull/628#discussion_r284758759
 
 

 ##########
 File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationWithTableMigration.java
 ##########
 @@ -504,4 +507,56 @@ public void dynamicallyConvertExternalToManagedTable() 
throws Throwable {
             .runFailure("alter table t1 set tblproperties('EXTERNAL'='false')")
             .runFailure("alter table t2 set 
tblproperties('EXTERNAL'='false')");
   }
+
+  @Test
+  public void testMigrationWithUpgrade() throws Throwable {
+    WarehouseInstance.Tuple tuple = primary.run("use " + primaryDbName)
+            .run("create table tacid (id int) clustered by(id) into 3 buckets 
stored as orc ")
+            .run("create table texternal (id int) ")
+            .run("insert into texternal values (1)")
+            .dump(primaryDbName, null);
+    replica.load(replicatedDbName, tuple.dumpLocation)
+            .run("use " + replicatedDbName)
+            .run("repl status " + replicatedDbName)
+            .verifyResult(tuple.lastReplicationId)
+            .run("select count(*) from tacid")
+            .verifyResult("0")
+            .run("select id from texternal")
+            .verifyResult("1");
+
+    assertTrue(isFullAcidTable(replica.getTable(replicatedDbName, "tacid")));
+    
assertFalse(MetaStoreUtils.isExternalTable(replica.getTable(replicatedDbName, 
"texternal")));
+
+    // forcefully (setting db property) alter the table type. For acid table, 
set the bootstrap acid table to true. For
 
 Review comment:
   Shall explicitly mention that this is a mock up for 
HiveStrictManagedMigration tool which is used during upgrade to migrate the 
tables based on migration rules.
   We simulate the scenario by explicitly allowing alter commands to change 
table types.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to