You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2015/03/07 17:15:07 UTC

[2/4] hbase git commit: HBASE-12969 Parameter Validation is not there for shell script, local-master-backup.sh and local-regionservers.sh

HBASE-12969 Parameter Validation is not there for shell script, local-master-backup.sh and local-regionservers.sh

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1
Commit: f7c35f8b53ef57113fb3048e7cf26c0576b174b5
Parents: 668ab35
Author: Y. SREENIVASULU REDDY <sr...@huawei.com>
Authored: Wed Feb 4 16:31:53 2015 +0530
Committer: Andrew Purtell <ap...@apache.org>
Committed: Sat Mar 7 08:14:07 2015 -0800

----------------------------------------------------------------------
 bin/local-master-backup.sh | 6 +++++-
 bin/local-regionservers.sh | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f7c35f8b/bin/local-master-backup.sh
----------------------------------------------------------------------
diff --git a/bin/local-master-backup.sh b/bin/local-master-backup.sh
index 36a70fa..f368e4a 100755
--- a/bin/local-master-backup.sh
+++ b/bin/local-master-backup.sh
@@ -54,5 +54,9 @@ shift;
 
 for i in $*
 do
-  run_master  $cmd $i
+  if [[ "$i" =~ ^[0-9]+$ ]]; then
+   run_master $cmd $i
+  else
+   echo "Invalid argument"
+  fi
 done

http://git-wip-us.apache.org/repos/asf/hbase/blob/f7c35f8b/bin/local-regionservers.sh
----------------------------------------------------------------------
diff --git a/bin/local-regionservers.sh b/bin/local-regionservers.sh
index e2cea6d..38d9ffc 100755
--- a/bin/local-regionservers.sh
+++ b/bin/local-regionservers.sh
@@ -52,5 +52,9 @@ shift;
 
 for i in $*
 do
-  run_regionserver  $cmd $i
+  if [[ "$i" =~ ^[0-9]+$ ]]; then
+   run_regionserver $cmd $i
+  else
+   echo "Invalid argument"
+  fi
 done