busbey commented on a change in pull request #47: HBASE-23180 hbck2 testing tool
URL: 
https://github.com/apache/hbase-operator-tools/pull/47#discussion_r370797217
 
 

 ##########
 File path: dev-support/testingtool/hbck2_test.sh
 ##########
 @@ -0,0 +1,354 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This the main control script that takes care of following things:
+#     1. Sets up a hadoop minicluster
+#     2. Installs HBase on the minicluster
+#     3. Creates a table & region data using LTT
+#     4. Invokes all the action scripts present in 
dev-support/testingtool/scripts/
+
+set -e
+function usage {
+  echo "Usage: ${0} [options] /path/to/component/bin-install 
/path/to/hadoop/executable /path/to/hadoop/hadoop-yarn-server-tests-tests.jar 
/path/to/hadoop/hadoop-mapreduce-client-jobclient-tests.jar 
/path/to/mapred/executable"
+  echo ""
+  echo "    --zookeeper-data /path/to/use                                     
Where the embedded zookeeper instance should write its data."
+  echo "                                                                      
defaults to 'zk-data' in the working-dir."
+  echo "    --working-dir /path/to/use                                        
Path for writing configs and logs. must exist."
+  echo "                                                                      
defaults to making a directory via mktemp."
+  echo "    --hadoop-client-classpath /path/to/some.jar:/path/to/another.jar  
classpath for hadoop jars."
+  echo "                                                                      
defaults to 'hadoop classpath'"
+  echo "    --hbase-client-install /path/to/unpacked/client/tarball           
if given we'll look here for hbase client jars instead of the bin-install"
+  echo "    --force-data-clean                                                
Delete all data in HDFS and ZK prior to starting up hbase"
+  echo "    --single-process                                                  
Run as single process instead of pseudo-distributed"
+  echo "    --hbck2 /path/to/use                                              
Path for the hbck2 jar"
+  echo ""
+  exit 1
+}
+# if no args specified, show usage
+if [ $# -lt 5 ]; then
+  usage
+fi
+
+# Get arguments
+declare component_install
+declare hadoop_exec
+declare working_dir
+declare zk_data_dir
+declare clean
+declare distributed="true"
+declare hadoop_jars
+declare hbase_client
+while [ $# -gt 0 ]
+do
+  case "$1" in
+    --working-dir) shift; working_dir=$1; shift;;
+    --force-data-clean) shift; clean="true";;
+    --zookeeper-data) shift; zk_data_dir=$1; shift;;
+    --single-process) shift; distributed="false";;
+    --hadoop-client-classpath) shift; hadoop_jars="$1"; shift;;
+    --hbase-client-install) shift; hbase_client="$1"; shift;;
+    --hbck2) shift; hbck2_jar_path="$1"; shift;;
 
 Review comment:
   this needs to be declared above before we write to it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to