kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luke...@apache.org
Subject [08/50] [abbrv] incubator-kylin git commit: minor, correct message in ResourceTool
Date Sun, 06 Sep 2015 07:39:14 GMT
minor, correct message in ResourceTool


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

Branch: refs/heads/master
Commit: 0a9d41e40f173cdab5dba9c452c862bb00b3596e
Parents: 3b275ca
Author: Li, Yang <yangli9@ebay.com>
Authored: Wed Aug 12 08:55:42 2015 +0800
Committer: Li, Yang <yangli9@ebay.com>
Committed: Wed Aug 12 08:55:42 2015 +0800

----------------------------------------------------------------------
 .../kylin/common/persistence/ResourceTool.java  | 27 ++++----------------
 1 file changed, 5 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0a9d41e4/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java b/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
index e5c135a..ad1c0ba 100644
--- a/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
+++ b/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
@@ -33,9 +33,10 @@ public class ResourceTool {
         args = StringUtil.filterSystemArgs(args);
 
         if (args.length == 0) {
-            System.out.println("Usage: MetadataTool reset METADATA_URI");
-            System.out.println("Usage: MetadataTool copy  METADATA_URI_SRC  METADATA_URI_DST");
-            System.out.println("Usage: MetadataTool list  METADATA_URI      PATH");
+            System.out.println("Usage: MetadataTool reset");
+            System.out.println("Usage: MetadataTool list  RESOURCE_PATH");
+            System.out.println("Usage: MetadataTool download  LOCAL_DIR");
+            System.out.println("Usage: MetadataTool upload    LOCAL_DIR");
             return;
         }
 
@@ -49,11 +50,8 @@ public class ResourceTool {
         case "reset":
             reset(args.length == 1 ? KylinConfig.getInstanceFromEnv() : KylinConfig.createInstanceFromUri(args[1]));
             break;
-        case "copy":
-            copy(args[1], args[2]);
-            break;
         case "list":
-            list(args[1], args[2]);
+            list(KylinConfig.getInstanceFromEnv(), args[1]);
             break;
         case "download":
             copy(KylinConfig.getInstanceFromEnv(), KylinConfig.createInstanceFromUri(args[1]));
@@ -75,11 +73,6 @@ public class ResourceTool {
         System.out.println("" + result);
     }
 
-    private static void list(String metadataUri, String path) throws IOException {
-        KylinConfig config = KylinConfig.createInstanceFromUri(metadataUri);
-        list(config, path);
-    }
-
     public static void copy(KylinConfig srcConfig, KylinConfig dstConfig) throws IOException
{
 
         ResourceStore src = ResourceStore.getStore(srcConfig);
@@ -87,16 +80,6 @@ public class ResourceTool {
         copyR(src, dst, "/");
     }
 
-    private static void copy(String srcUri, String dstUri) throws IOException {
-
-        System.out.println("Copy from " + srcUri + " to " + dstUri);
-
-        KylinConfig srcConfig = KylinConfig.createInstanceFromUri(srcUri);
-        KylinConfig dstConfig = KylinConfig.createInstanceFromUri(dstUri);
-        copy(srcConfig, dstConfig);
-
-    }
-
     private static void copyR(ResourceStore src, ResourceStore dst, String path) throws IOException
{
         ArrayList<String> children = src.listResources(path);
 


Mime
View raw message