mirror of
https://github.com/apache/impala.git
synced 2026-01-05 12:01:11 -05:00
The original error reporting relied on $0 being accessible from the current working dir, which failed if a script changed the working dir and $0 was relative. This updates the error reporting command to cd back to the original dir before accessing $0. Change-Id: I2185af66e35e29b41dbe1bb08de24200bacea8a1 Reviewed-on: http://gerrit.cloudera.org:8080/1666 Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Internal Jenkins
18 lines
581 B
Bash
Executable File
18 lines
581 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
|
|
|
|
set -euo pipefail
|
|
trap 'echo Error in $0 at line $LINENO: $(cd "'$PWD'" && awk "NR == $LINENO" $0)' ERR
|
|
|
|
# Kill HBase, then MiniLlama (which includes a MiniDfs, a Yarn RM several NMs).
|
|
$IMPALA_HOME/testdata/bin/kill-sentry-service.sh
|
|
$IMPALA_HOME/testdata/bin/kill-hive-server.sh
|
|
$IMPALA_HOME/testdata/bin/kill-hbase.sh
|
|
$IMPALA_HOME/testdata/bin/kill-mini-dfs.sh
|
|
|
|
for BINARY in impalad statestored catalogd mini-impalad-cluster; do
|
|
if pgrep -U $USER $BINARY; then
|
|
killall -9 -u $USER -q $BINARY
|
|
fi
|
|
done
|