deniskuzZ commented on code in PR #3346:
URL: https://github.com/apache/hive/pull/3346#discussion_r892526196
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java:
##########
@@ -739,6 +741,23 @@ private int executeIncrementalLoad(long loadStartTime)
throws Exception {
LOG.info("Dropping table {} for optimised bootstarap",
work.dbNameToLoadIn + "." + table);
db.dropTable(work.dbNameToLoadIn + "." + table, true);
}
+ Database sourceDb = getSourceDbMetadata(); //This sourceDb was the
actual target prior to failover.
+ Map<String, String> sourceDbProps = sourceDb.getParameters();
+ List<String> replicationProps = MetaStoreUtils.getReplicationDbProps();
//Replication Props will be handled separately as part of preAckTask.
+ for (Map.Entry<String, String> currProp :
targetDb.getParameters().entrySet()) {
+ String actualVal = sourceDbProps.get(currProp.getKey());
+ if (!replicationProps.contains(currProp.getKey()) &&
!currProp.getValue().equals(actualVal)) {
Review Comment:
can't we filter the map (targetDb.getParameters()) with replicationProps
first to avoid the lookups?
````
replicationProps.stream()
.map(targetDb.getParameters()::get)
.filter(Objects::isNull)
....
````
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]