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/03/10 08:50:37 UTC

[34/50] [abbrv] kylin git commit: KYLIN-1474 expose list, remove and cat in metastore.sh

KYLIN-1474 expose list, remove and cat in metastore.sh

Signed-off-by: Hongbin Ma <ma...@apache.org>


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

Branch: refs/heads/master
Commit: 17c33dc4929121cdb48c3904dc337cd456af845d
Parents: 11dc04b
Author: John Zhao <yu...@ebay.com>
Authored: Mon Mar 7 14:05:59 2016 -0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Tue Mar 8 10:31:12 2016 +0800

----------------------------------------------------------------------
 build/bin/metastore.sh                          | 24 ++++++++++++++++++++
 .../kylin/common/persistence/ResourceTool.java  |  3 +++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/17c33dc4/build/bin/metastore.sh
----------------------------------------------------------------------
diff --git a/build/bin/metastore.sh b/build/bin/metastore.sh
index 05041f9..8908351 100755
--- a/build/bin/metastore.sh
+++ b/build/bin/metastore.sh
@@ -47,6 +47,27 @@ then
     echo "Starting restoring $_file"
     ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool upload $_file
 
+elif [ "$1" == "list" ]
+then
+
+    _file=$2
+    echo "Starting list $_file"
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool list $_file
+
+elif [ "$1" == "remove" ]
+then
+
+    _file=$2
+    echo "Starting remove $_file"
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool remove $_file
+
+elif [ "$1" == "cat" ]
+then
+
+    _file=$2
+    echo "Starting cat $_file"
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool cat $_file
+
 elif [ "$1" == "reset" ]
 then
 
@@ -61,6 +82,9 @@ else
     echo "usage: metastore.sh backup"
     echo "       metastore.sh reset"
     echo "       metastore.sh restore PATH_TO_LOCAL_META"
+    echo "       metastore.sh list RESOURCE_PATH"
+    echo "       metastore.sh cat RESOURCE_PATH"
+    echo "       metastore.sh remove RESOURCE_PATH"
     echo "       metastore.sh clean [--delete true]"
     exit 1
 fi

http://git-wip-us.apache.org/repos/asf/kylin/blob/17c33dc4/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
----------------------------------------------------------------------
diff --git a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
index 489e45a..2e1d527 100644
--- a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
+++ b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
@@ -41,6 +41,9 @@ public class ResourceTool {
             System.out.println("Usage: ResourceTool list  RESOURCE_PATH");
             System.out.println("Usage: ResourceTool download  LOCAL_DIR");
             System.out.println("Usage: ResourceTool upload    LOCAL_DIR");
+            System.out.println("Usage: ResourceTool reset");
+            System.out.println("Usage: ResourceTool remove RESOURCE_PATH");
+            System.out.println("Usage: ResourceTool cat RESOURCE_PATH");
             return;
         }