sankarh 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_r294606868
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadWork.java
##########
@@ -61,12 +63,19 @@
*/
final LineageState sessionStateLineageState;
- public ReplLoadWork(HiveConf hiveConf, String dumpDirectory, String
dbNameToLoadIn,
- LineageState lineageState, boolean isIncrementalDump, Long eventTo,
- List<DirCopyWork> pathsToCopyIterator) throws IOException {
+ public ReplLoadWork(HiveConf hiveConf, String dumpDirectory,
+ String dbNameToLoadIn, ReplScope changedReplScope,
+ LineageState lineageState, boolean isIncrementalDump,
Long eventTo,
+ List<DirCopyWork> pathsToCopyIterator) throws
IOException {
sessionStateLineageState = lineageState;
this.dumpDirectory = dumpDirectory;
this.dbNameToLoadIn = dbNameToLoadIn;
+ this.changedReplScope = changedReplScope;
+
+ // If DB name is changed during REPL LOAD, then set it instead of
referring to source DB name.
+ if ((changedReplScope != null) && StringUtils.isNotBlank(dbNameToLoadIn)) {
Review comment:
Yes, dump metadata will always have DB name at source. If user explicitly
mentioned db name in REPL LOAD, then dbNameToLoadIn will not be blank. Also, we
don't pass real policy in dump metadata always. Only if the policy changes,
then only passed. This is an optimization to avoid traversing all tables. So,
changedReplScope can be null and also dbNameToLoadIn can be blank or not blank.
----------------------------------------------------------------
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]