You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by we...@apache.org on 2017/09/08 22:35:59 UTC
[6/7] hive git commit: HIVE-17480: repl dump sub dir should use UUID
instead of timestamp (Tao Li, reviewed by Daniel Dai)
HIVE-17480: repl dump sub dir should use UUID instead of timestamp (Tao Li, reviewed by Daniel Dai)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/5df15407
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/5df15407
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/5df15407
Branch: refs/heads/hive-14535
Commit: 5df15407f0cc0ca3dc01f1258f270f49b6ca6e4c
Parents: a74107e
Author: Daniel Dai <da...@hortonworks.com>
Authored: Fri Sep 8 14:31:56 2017 -0700
Committer: Daniel Dai <da...@hortonworks.com>
Committed: Fri Sep 8 14:31:56 2017 -0700
----------------------------------------------------------------------
.../java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/5df15407/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
index 7703f31..95eb2db 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
@@ -18,6 +18,7 @@
package org.apache.hadoop.hive.ql.exec.repl;
import com.google.common.primitives.Ints;
+
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
@@ -50,9 +51,9 @@ import org.apache.hadoop.hive.ql.parse.repl.dump.events.EventHandler;
import org.apache.hadoop.hive.ql.parse.repl.dump.events.EventHandlerFactory;
import org.apache.hadoop.hive.ql.parse.repl.dump.io.FunctionSerializer;
import org.apache.hadoop.hive.ql.parse.repl.dump.io.JsonWriter;
-import org.apache.hadoop.hive.ql.parse.repl.load.DumpMetaData;
import org.apache.hadoop.hive.ql.parse.repl.dump.log.BootstrapDumpLogger;
import org.apache.hadoop.hive.ql.parse.repl.dump.log.IncrementalDumpLogger;
+import org.apache.hadoop.hive.ql.parse.repl.load.DumpMetaData;
import org.apache.hadoop.hive.ql.plan.api.StageType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,6 +61,7 @@ import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
+import java.util.UUID;
public class ReplDumpTask extends Task<ReplDumpWork> implements Serializable {
private static final String dumpSchema = "dump_dir,last_repl_id#string,string";
@@ -274,7 +276,7 @@ public class ReplDumpTask extends Task<ReplDumpWork> implements Serializable {
return ReplDumpWork.testInjectDumpDir;
}
} else {
- return String.valueOf(System.currentTimeMillis());
+ return UUID.randomUUID().toString();
// TODO: time good enough for now - we'll likely improve this.
// We may also work in something the equivalent of pid, thrid and move to nanos to ensure
// uniqueness.