mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
This patch add graceful and force shutdown support for impala.sh. This patch also keep the stdout and stderr log when startup. This patch also fix some bugs in the impala.sh, including: - empty service name check. - restart command cannot work. Testing: - Manually deploy package on Ubuntu22.04 and verify it. Change-Id: Ib7743234952ba6b12694ecc68a920d59fea0d4ba Reviewed-on: http://gerrit.cloudera.org:8080/21297 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
56 lines
2.0 KiB
Bash
56 lines
2.0 KiB
Bash
#!/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.
|
|
#
|
|
# Specify default value for user-specific environment variables.
|
|
# It's recommended to use a form that can be overridden from the command line, like
|
|
# ': ${FOO:="bar"}', or 'export FOO=${FOO:-"bar"}' when the variable need to be exported.
|
|
|
|
# Uncomment and modify next line to specify a valid JDK location.
|
|
# : ${JAVA_HOME:="/usr/lib/jvm/java"}
|
|
|
|
# Specify extra CLASSPATH.
|
|
: ${CLASSPATH:=}
|
|
|
|
# Specify extra LD_LIBRARY_PATH.
|
|
: ${LD_LIBRARY_PATH:=}
|
|
|
|
# Uncomment next line to enable coredump.
|
|
# ulimit -c unlimited
|
|
|
|
# Specify JVM options.
|
|
export JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS:-}
|
|
|
|
# Specify default pidfile.
|
|
: ${IMPALAD_PIDFILE:="/tmp/impalad.pid"}
|
|
: ${CATALOGD_PIDFILE:="/tmp/catalogd.pid"}
|
|
: ${ADMISSIOND_PIDFILE:="/tmp/admissiond.pid"}
|
|
: ${STATESTORED_PIDFILE:="/tmp/statestored.pid"}
|
|
|
|
# Specify default stdout file.
|
|
: ${IMPALAD_OUTFILE:="/tmp/impalad.out"}
|
|
: ${CATALOGD_OUTFILE:="/tmp/catalogd.out"}
|
|
: ${ADMISSIOND_OUTFILE:="/tmp/admissiond.out"}
|
|
: ${STATESTORED_OUTFILE:="/tmp/statestored.out"}
|
|
|
|
# Specify default stderr file.
|
|
: ${IMPALAD_ERRFILE:="/tmp/impalad.err"}
|
|
: ${CATALOGD_ERRFILE:="/tmp/catalogd.err"}
|
|
: ${ADMISSIOND_ERRFILE:="/tmp/admissiond.err"}
|
|
: ${STATESTORED_ERRFILE:="/tmp/statestored.err"}
|