This is an automated email from the ASF dual-hosted git repository.
jdere pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new b60398c HIVE-22034: HiveStrictManagedMigration updates DB location
even with --dryRun setting on (Jason Dere, reviewed by Ashutosh Chauhan)
b60398c is described below
commit b60398cab8f1f198c066d5e53126815076254b4f
Author: Jason Dere <[email protected]>
AuthorDate: Wed Jul 24 10:57:24 2019 -0700
HIVE-22034: HiveStrictManagedMigration updates DB location even with
--dryRun setting on (Jason Dere, reviewed by Ashutosh Chauhan)
---
.../apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java
b/ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java
index 42c4158..9d23c13 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java
@@ -606,10 +606,12 @@ public class HiveStrictManagedMigration {
LOG.error("Not updating database location for {} since an error was
encountered. " +
"The migration must be run again for this
database.", dbObj.getName());
} else {
- Path newDefaultDbLocation = wh.get().getDefaultDatabasePath(dbName);
- // dbObj after this call would have the new DB location.
- // Keep that in mind if anything below this requires the old DB path.
- hiveUpdater.get().updateDbLocation(dbObj, newDefaultDbLocation);
+ if (!runOptions.dryRun) {
+ Path newDefaultDbLocation =
wh.get().getDefaultDatabasePath(dbName);
+ // dbObj after this call would have the new DB location.
+ // Keep that in mind if anything below this requires the old DB
path.
+ hiveUpdater.get().updateDbLocation(dbObj, newDefaultDbLocation);
+ }
}
}
} catch (InterruptedException e) {