Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 360fb805d -> f2781d438


PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f2781d43
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f2781d43
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f2781d43

Branch: refs/heads/5.x-HBase-2.0
Commit: f2781d43852557fa3a7b571047d13ab6f1530a7f
Parents: 360fb80
Author: 492066199 <[email protected]>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Karan Mehta <[email protected]>
Committed: Wed Jul 25 10:17:16 2018 -0700

----------------------------------------------------------------------
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f2781d43/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index 984cb84..31746ce 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -65,7 +66,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
     this.scan = scan;
     this.scanMetricsHolder = scanMetricsHolder;
     this.scanIterator = UNINITIALIZED_SCANNER;
-    this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+    this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+        UUID.randomUUID().toString());
     this.snapshotName = configuration.get(
         PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
     this.rootDir = FSUtils.getRootDir(configuration);

Reply via email to