Files
impala/testdata/bin/run-kudu.sh
zhangyifan27 23a14a249c IMPALA-12852: Make Kudu service start and stop independent
This patch decouples run-kudu.sh and kill-kudu.sh from run-mini-dfs.sh
and kill-mini-dfs.sh. These scripts can be useful for setting up test
environments that require no or only Kudu service.

Testing:
  - Ran the modified and new scripts and checked they worked as expected.

Change-Id: I9624aaa61353bb4520e879570e5688d5e3493201
Reviewed-on: http://gerrit.cloudera.org:8080/21090
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2024-04-02 08:26:59 +00:00

43 lines
1.3 KiB
Bash
Executable File

#!/bin/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.
set -euo pipefail
. $IMPALA_HOME/bin/report_build_error.sh
setup_report_build_error
if [[ $# -eq 1 && "$1" == -format ]]; then
SHOULD_FORMAT=true
elif [[ $# -ne 0 ]]; then
echo "Usage: $0 [-format]"
echo "[-format] : Format the kudu cluster before starting"
exit 1
else
SHOULD_FORMAT=false
fi
# Kill and clean data for a clean start.
$IMPALA_HOME/testdata/bin/kill-kudu.sh
if $SHOULD_FORMAT; then
$IMPALA_HOME/testdata/cluster/admin delete_kudu_data
fi
set +e
$IMPALA_HOME/testdata/cluster/admin start_kudu_cluster