kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject kylin git commit: KYLIN-1986 CubeMigrationCLI: make global dictionary unique
Date Wed, 31 Aug 2016 05:25:43 GMT
Repository: kylin
Updated Branches:
  refs/heads/master a9ba1da13 -> a77fbc850


KYLIN-1986 CubeMigrationCLI: make global dictionary unique

Signed-off-by: shaofengshi <shaofengshi@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/master
Commit: a77fbc850178f9a730f2367add24ee1d71dc9046
Parents: a9ba1da
Author: kangkaisen <kangkaisen@live.com>
Authored: Tue Aug 30 19:28:33 2016 +0800
Committer: shaofengshi <shaofengshi@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());


Mime
View raw message