aasha commented on a change in pull request #1942:
URL: https://github.com/apache/hive/pull/1942#discussion_r576563534
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -245,7 +245,9 @@ a database ( directory )
scope.database = true;
}
dbTracker.debugLog("database");
- dbEventFound = true;
+ if (scope.database) {
Review comment:
Do you need a separate check? Can be done at the same place where
scope.database is set to true
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -485,6 +485,9 @@ private Task getReplLoadRootTask(String sourceDb, String
replicadb, boolean isIn
metricCollector = new BootstrapLoadMetricCollector(replicadb,
tuple.dumpLocation, 0,
confTemp);
}
+ /* When 'hive.repl.retain.custom.db.locations.on.target' is enabled, the
first iteration of repl load would
+ run only database creation task, and only in next iteration of Repl
Load Task execution, remaining tasks will be
+ executed. Hence disabling this to perform the test on task
optimization. */
Review comment:
its also because the locations would overwrite and things like that
right?
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/LoadDatabase.java
##########
@@ -96,6 +98,26 @@ Database readDbMetadata() throws SemanticException {
return event.dbInMetadata(dbNameToLoadIn);
}
+ String getDbLocation(Database dbInMetadata) {
+ if
(context.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_RETAIN_CUSTOM_LOCATIONS_FOR_DB_ON_TARGET)
+ &&
Boolean.parseBoolean(dbInMetadata.getParameters().get(ReplUtils.REPL_IS_CUSTOM_DB_LOC)))
{
+ String locOnTarget = new
Path(dbInMetadata.getLocationUri()).toUri().getPath().toString();
+ LOG.info("Using the custom location {} on the target", locOnTarget);
+ return locOnTarget;
+ }
+ return null;
+ }
+
+ String getDbManagedLocation(Database dbInMetadata) {
+ if
(context.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_RETAIN_CUSTOM_LOCATIONS_FOR_DB_ON_TARGET)
+ &&
Boolean.parseBoolean(dbInMetadata.getParameters().get(ReplUtils.REPL_IS_CUSTOM_DB_MANAGEDLOC)))
{
Review comment:
this might cause backward compatibility issue?
----------------------------------------------------------------
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]