You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/09/03 06:37:38 UTC

[31/50] [abbrv] kylin git commit: KYLIN-1986 CubeMigrationCLI: make global dictionary unique

KYLIN-1986 CubeMigrationCLI: make global dictionary unique

Signed-off-by: shaofengshi <sh...@apache.org>


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

Branch: refs/heads/1.5.x-HBase1.x
Commit: a77fbc850178f9a730f2367add24ee1d71dc9046
Parents: a9ba1da
Author: kangkaisen <ka...@live.com>
Authored: Tue Aug 30 19:28:33 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Aug 31 13:25:28 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a77fbc85/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
index 0ecb6fb..3066fb5 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
@@ -20,8 +20,10 @@ package org.apache.kylin.storage.hbase.util;
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.hadoop.conf.Configuration;
@@ -213,7 +215,7 @@ public class CubeMigrationCLI {
     private static void copyFilesInMetaStore(CubeInstance cube, String overwriteIfExists) throws IOException {
 
         List<String> metaItems = new ArrayList<String>();
-        List<String> dictAndSnapshot = new ArrayList<String>();
+        Set<String> dictAndSnapshot = new HashSet<String>();
         listCubeRelatedResources(cube, metaItems, dictAndSnapshot);
 
         if (dstStore.exists(cube.getResourcePath()) && !overwriteIfExists.equalsIgnoreCase("true"))
@@ -239,7 +241,7 @@ public class CubeMigrationCLI {
         operations.add(new Opt(OptType.PURGE_AND_DISABLE, new Object[] { cubeName }));
     }
 
-    private static void listCubeRelatedResources(CubeInstance cube, List<String> metaResource, List<String> dictAndSnapshot) throws IOException {
+    private static void listCubeRelatedResources(CubeInstance cube, List<String> metaResource, Set<String> dictAndSnapshot) throws IOException {
 
         CubeDesc cubeDesc = cube.getDescriptor();
         metaResource.add(cube.getResourcePath());