mirror of
https://github.com/apache/impala.git
synced 2026-02-02 15:00:38 -05:00
The fix for IMPALA-9150 changed kill-hbase.sh to use HBase's stop-hbase.sh script. Around this time, the GVO timeout issues started. GVO can reuse machines, so we don't know what state they may be in. If something failed to kill HBase processes, the next job would need to be able to kill them even without access to the last run's files / logs. This restores the original kill logic to kill-hbase.sh, after trying a graceful shutdown using HBase's stop-hbase.sh script. The original kill logic doesn't rely on anything from the filesystem to know about the existence of processes, so it would handle machine reuse. This also changes our Jenkins test scripts to shut down the minicluster at the end. Testing: - Started with a running minicluster, ran bin/clean.sh, then ran testdata/bin/kill-all.sh and verified that the java processes were gone Change-Id: Ie2f0b342bcd1d8abea8ef923adbb54a14518a7a6 Reviewed-on: http://gerrit.cloudera.org:8080/14789 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
42 lines
1.7 KiB
Bash
Executable File
42 lines
1.7 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
|
|
|
|
DIR=$(dirname "$0")
|
|
echo Stopping Hbase
|
|
# First, use the stop-hbase.sh script provided by HBase. This does a more graceful
|
|
# shutdown than using our kill-java-service.sh script.
|
|
${HBASE_HOME}/bin/stop-hbase.sh
|
|
|
|
# Second, also do a harder shutdown in case there is anything that is not covered
|
|
# by the stop-hbase.sh script. Kill region server first, then hmaster, and zookeeper.
|
|
"$DIR"/kill-java-service.sh -c HRegionServer -c HMaster -c HQuorumPeer -s 2
|
|
|
|
# Clear up data so that zookeeper/hbase won't do recovery when it starts.
|
|
# TODO: is this still needed when using bin/stop-hbase.sh?
|
|
rm -rf /tmp/hbase-*
|
|
|
|
# HACK: Some jobs have seen the HBase master fail to initialize with mesages like:
|
|
# "Master startup cannot progress, in holding-pattern until region onlined."
|
|
# Anecdotally, removing the MasterProcWALs directory avoids the issue.
|
|
hdfs dfs -rm /hbase/MasterProcWALs/* || true
|