pkumarsinha commented on a change in pull request #1804:
URL: https://github.com/apache/hive/pull/1804#discussion_r554672844
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -410,12 +413,16 @@ private boolean shouldDump(Path previousDumpPath) throws
IOException {
* @return true if need to examine tables for dump and false if not.
*/
private boolean shouldExamineTablesToDump() {
- return (work.oldReplScope != null)
+ return (previousReplScopeModified())
|| !tablesForBootstrap.isEmpty()
|| conf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)
|| conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES);
}
+ private boolean previousReplScopeModified() {
Review comment:
dmd.setDump(DumpType.BOOTSTRAP, bootDumpBeginReplId, bootDumpEndReplId,
cmRoot, executorId,
work.oldReplScope != null);
Shouldn't this line also also previousReplScopeModified() otherwise load
will always assume that there is change in expession.
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/repl/ReplScope.java
##########
@@ -116,4 +117,27 @@ private boolean inTableExcludedList(final String
tableName) {
}
return excludedTableNamePattern.matcher(tableName).matches();
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (! (o instanceof ReplScope)) {
+ return false;
+ }
+
+ ReplScope replScope = (ReplScope)o;
+ return ((replScope.getExcludedTableNames() == null ?
(this.excludedTableNames == null) :
+ replScope.getExcludedTableNames().equals(this.excludedTableNames))
Review comment:
nit: getExcludedTableNames() /getIncludedTableNames() methods can be
replaced by replScope.excludedTableNamePattern and
replScope.includedTableNamePattern respectively.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]