maheshk114 commented on a change in pull request #673: HIVE-21763: Incremental 
replication to allow changing include/exclude tables list in replication policy.
URL: https://github.com/apache/hive/pull/673#discussion_r294588902
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
 ##########
 @@ -259,8 +263,10 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData 
dmd, Path cmRoot, Hive
             Table table = hiveDb.getTable(dbName, tableName);
 
             // Dump external table locations if required.
-            if (shouldDumpExternalTableLocation() &&
-                    TableType.EXTERNAL_TABLE.equals(table.getTableType())) {
+            // Note: If repl policy is replaced, then need to dump external 
tables if table is getting replicated
+            // for the first time in current dump. So, need to check if table 
is included in old policy.
+            if ((shouldDumpExternalTableLocation() || 
!ReplUtils.tableIncludedInReplScope(work.oldReplScope, tableName))
 
 Review comment:
   it should dump external table only if external table dump is enabled 

----------------------------------------------------------------
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