From 9db5afd90f531056e45895665c2ef457b2d72905 Mon Sep 17 00:00:00 2001 From: kangkaisen Date: Tue, 30 Aug 2016 19:28:33 +0800 Subject: [PATCH] KYLIN-1986 CubeMigrationCLI: make global dictionary unique --- .../java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 c4cf579..2440117 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 metaItems = new ArrayList(); - List dictAndSnapshot = new ArrayList(); + Set dictAndSnapshot = new HashSet(); listCubeRelatedResources(cube, metaItems, dictAndSnapshot); if (dstStore.exists(cube.getResourcePath()) && !overwriteIfExists.equalsIgnoreCase("true")) @@ -240,7 +242,7 @@ public class CubeMigrationCLI { operations.add(new Opt(OptType.PURGE_AND_DISABLE, new Object[] { cubeName })); } - private static void listCubeRelatedResources(CubeInstance cube, List metaResource, List dictAndSnapshot) throws IOException { + private static void listCubeRelatedResources(CubeInstance cube, List metaResource, Set dictAndSnapshot) throws IOException { CubeDesc cubeDesc = cube.getDescriptor(); metaResource.add(cube.getResourcePath()); -- 2.5.4 (Apple Git-61)