hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/4] hbase git commit: HBASE-12969 Parameter Validation is not there for shell script, local-master-backup.sh and local-regionservers.sh
Date Sat, 07 Mar 2015 16:15:06 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 2eda262df -> 9f6c02d6b
  refs/heads/branch-1 668ab3564 -> f7c35f8b5
  refs/heads/branch-1.0 d72bb2f6a -> 8724ef6c9
  refs/heads/master 95fc53f10 -> b6da97890


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

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


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

Branch: refs/heads/master
Commit: b6da97890bed4a6f4808c6d03c30904e5d306be2
Parents: 95fc53f
Author: Y. SREENIVASULU REDDY <sreenivasulu.y@huawei.com>
Authored: Wed Feb 4 16:31:53 2015 +0530
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Sat Mar 7 08:13:51 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/b6da9789/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/b6da9789/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


Mime
View raw message