Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2BC44200AC8 for ; Tue, 7 Jun 2016 17:00:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2A97F160A36; Tue, 7 Jun 2016 15:00:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6EFCD160968 for ; Tue, 7 Jun 2016 17:00:52 +0200 (CEST) Received: (qmail 65620 invoked by uid 500); 7 Jun 2016 15:00:51 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 65608 invoked by uid 99); 7 Jun 2016 15:00:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2016 15:00:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0EC3ADFF32; Tue, 7 Jun 2016 15:00:51 +0000 (UTC) From: keith-turner To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #110: ACCUMULO-4328: Run multiple tablet servers per h... Content-Type: text/plain Message-Id: <20160607150051.0EC3ADFF32@git1-us-west.apache.org> Date: Tue, 7 Jun 2016 15:00:51 +0000 (UTC) archived-at: Tue, 07 Jun 2016 15:00:53 -0000 Github user keith-turner commented on a diff in the pull request: https://github.com/apache/accumulo/pull/110#discussion_r66087817 --- Diff: assemble/bin/start-daemon.sh --- @@ -103,9 +90,61 @@ ERRFILE="${ACCUMULO_LOG_DIR}/${SERVICE}_${LOGHOST}.err" rotate_log "$OUTFILE" ${ACCUMULO_NUM_OUT_FILES} rotate_log "$ERRFILE" ${ACCUMULO_NUM_OUT_FILES} -# Fork the process, store the pid -nohup ${NUMA_CMD} "$COMMAND" "${SERVICE}" --address "${ADDRESS}" >"$OUTFILE" 2>"$ERRFILE" < /dev/null & -echo $! > ${PID_FILE} +if [[ "$SERVICE" != "tserver" || $NUM_TSERVERS -eq 1 ]]; then + # Check the pid file to figure out if its already running. + PID_FILE="${ACCUMULO_PID_DIR}/accumulo-${ACCUMULO_IDENT_STRING}-${SERVICE}.pid" + if [ -f ${PID_FILE} ]; then + PID=`cat ${PID_FILE}` + if kill -0 $PID 2>/dev/null; then + # Starting an already-started service shouldn't be an error per LSB + echo "$HOST : $SERVICE already running (${PID})" + exit 0 + fi + fi + echo "Starting $SERVICE on $HOST" + + # Fork the process, store the pid + nohup ${NUMA_CMD} "$COMMAND" "${SERVICE}" --address "${ADDRESS}" >"$OUTFILE" 2>"$ERRFILE" < /dev/null & + echo $! > ${PID_FILE} + +else + --- End diff -- Could have a sanity check on `TSERVER_NUMA_OPTIONS` to check that if it exists its length is equal to `NUM_TSERVERS` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---