kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject [1/2] kylin git commit: KYLIN-1474 expose list, remove and cat in metastore.sh
Date Tue, 08 Mar 2016 07:36:12 GMT
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 85e9c30d7 -> 1fed301db


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

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


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

Branch: refs/heads/2.0-rc
Commit: 278893cd66e2a0325325880e027a63d927cfc4b3
Parents: 85e9c30
Author: John Zhao <yunjzhao@ebay.com>
Authored: Mon Mar 7 14:05:59 2016 -0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Tue Mar 8 15:35:47 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/278893cd/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/278893cd/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 8faeadf..0975d57 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
@@ -39,6 +39,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;
         }
 


Mime
View raw message