maheshk114 commented on a change in pull request #679: HIVE-21764 : REPL DUMP
should detect and bootstrap any rename table events where old table was
excluded but renamed table is included.
URL: https://github.com/apache/hive/pull/679#discussion_r296166878
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/Utils.java
##########
@@ -214,29 +215,35 @@ public static boolean shouldReplicate(ReplicationSpec
replicationSpec, Table tab
return false;
}
- // Skip dumping events related to ACID tables if bootstrap is enabled
on it.
- // Also, skip if current table is included only in new policy but not
in old policy.
- if (isEventDump) {
- return
!hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)
- && ReplUtils.tableIncludedInReplScope(oldReplScope,
tableHandle.getTableName());
+ // Skip dumping events related to ACID tables if bootstrap is enabled
for ACID tables.
+ if (isEventDump &&
hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)) {
+ return false;
}
}
- // If replication policy is replaced with new included/excluded tables
list, then events
- // corresponding to tables which are not included in old policy but
included in new policy
- // should be skipped. Those tables would be bootstrapped along with the
current incremental
- // replication dump.
- // Note: If any event dump reaches here, it means, table is included in
new replication policy.
- if (isEventDump && !ReplUtils.tableIncludedInReplScope(oldReplScope,
tableHandle.getTableName())) {
- return false;
+ // Tables which are selected for bootstrap should be skipped. Those
tables would be bootstrapped
+ // along with the current incremental replication dump and thus no need
to dump events for them.
+ // Note: If any event (other than alter table with table level
replication) dump reaches here, it means, table is
+ // included in new replication policy.
+ if (isEventDump) {
+ // If replication policy is replaced with new included/excluded tables
list, then events
+ // corresponding to tables which are not included in old policy but
included in new policy
+ // should be skipped.
+ if (!ReplUtils.tableIncludedInReplScope(oldReplScope,
tableHandle.getTableName())) {
+ return false;
+ }
+
+ // Tables in the list of tables to be bootstrapped should be skipped.
Review comment:
its already there ."Tables which are selected for bootstrap should be
skipped."
----------------------------------------------------------------
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]