http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/start-daemon.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/start-daemon.sh b/assemble/scripts/start-daemon.sh deleted file mode 100755 index 9d6404f..0000000 --- a/assemble/scripts/start-daemon.sh +++ /dev/null @@ -1,167 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -script=$( basename "$SOURCE" ) -# Stop: Resolve Script Directory - -usage="Usage: start-daemon.sh <host> <service>" - -rotate_log () { - logfile=$1; - max_retained=$2; - if [[ ! $max_retained =~ ^[0-9]+$ ]] || [[ $max_retained -lt 1 ]] ; then - echo "ACCUMULO_NUM_OUT_FILES should be a positive number, but was '$max_retained'" - exit 1 - fi - - if [ -f "$logfile" ]; then # rotate logs - while [ $max_retained -gt 1 ]; do - prev=`expr $max_retained - 1` - [ -f "$logfile.$prev" ] && mv -f "$logfile.$prev" "$logfile.$max_retained" - max_retained=$prev - done - mv -f "$logfile" "$logfile.$max_retained"; - fi -} - -if [[ $# -ne 2 ]]; then - echo $usage - exit 2 -fi - -. "$bin"/config.sh -. "$bin"/config-server.sh - -HOST="$1" -ADDRESS=$HOST -host "$1" >/dev/null 2>&1 -if [[ $? != 0 ]]; then - LOGHOST=$HOST -else - LOGHOST=$(host "$HOST" | head -1 | cut -d' ' -f1) -fi -SERVICE=$2 - -TSERVERS=$(wc -l < "${ACCUMULO_CONF_DIR}/tservers") - -# When the hostname provided is the alias/shortname, try to use the FQDN to make -# sure we send the right address to the Accumulo process. -if [[ "$HOST" = "$(hostname -s)" ]]; then - HOST="$(hostname -f)" - ADDRESS="$HOST" -fi - -# ACCUMULO-1985 Allow monitor to bind on all interfaces -if [[ ${SERVICE} == "monitor" && ${ACCUMULO_MONITOR_BIND_ALL} == "true" ]]; then - ADDRESS="0.0.0.0" -fi - -COMMAND="${bin}/accumulo" -if [ "${ACCUMULO_WATCHER}" = "true" ]; then - COMMAND="${bin}/accumulo_watcher.sh ${LOGHOST}" -fi - -OUTFILE="${ACCUMULO_LOG_DIR}/${SERVICE}_${LOGHOST}.out" -ERRFILE="${ACCUMULO_LOG_DIR}/${SERVICE}_${LOGHOST}.err" - -# Rotate the .out and .err files -rotate_log "$OUTFILE" ${ACCUMULO_NUM_OUT_FILES} -rotate_log "$ERRFILE" ${ACCUMULO_NUM_OUT_FILES} - -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 - - S="$SERVICE" - for (( t=1; t<=$NUM_TSERVERS; t++)); do - - SERVICE="$S-$t" - - # 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})" - continue - fi - fi - echo "Starting $SERVICE on $HOST" - - ACCUMULO_NUMACTL_OPTIONS=${ACCUMULO_NUMACTL_OPTIONS:-"--interleave=all"} - ACCUMULO_NUMACTL_OPTIONS=${TSERVER_NUMA_OPTIONS[$t]} - if [[ "$ACCUMULO_ENABLE_NUMACTL" == "true" ]]; then - NUMA=`which numactl 2>/dev/null` - NUMACTL_EXISTS=$? - if [[ ( ${NUMACTL_EXISTS} -eq 0 ) ]]; then - export NUMA_CMD="${NUMA} ${ACCUMULO_NUMACTL_OPTIONS}" - else - export NUMA_CMD="" - fi - fi - - # We want the files to be consistently named with the log files - # server_identifier_hostname.{out,err}, e.g. tserver_2_fqdn.out - OUTFILE="${ACCUMULO_LOG_DIR}/${S}_${t}_${LOGHOST}.out" - ERRFILE="${ACCUMULO_LOG_DIR}/${S}_${t}_${LOGHOST}.err" - - # Rotate the .out and .err files - 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} - - done - -fi - -# Check the max open files limit and selectively warn -MAX_FILES_OPEN=$(ulimit -n) - -if [[ -n $MAX_FILES_OPEN && -n $TSERVERS ]] ; then - MAX_FILES_RECOMMENDED=${MAX_FILES_RECOMMENDED:-32768} - if (( TSERVERS > 10 )) && (( MAX_FILES_OPEN < MAX_FILES_RECOMMENDED )) - then - echo "WARN : Max open files on $HOST is $MAX_FILES_OPEN, recommend $MAX_FILES_RECOMMENDED" >&2 - fi -fi
http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/start-here.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/start-here.sh b/assemble/scripts/start-here.sh deleted file mode 100755 index ccba80f..0000000 --- a/assemble/scripts/start-here.sh +++ /dev/null @@ -1,78 +0,0 @@ -#! /usr/bin/env 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. - -# -# This script starts all the accumulo services on this host -# - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Stop: Resolve Script Directory - -. "$bin"/config.sh -. "$bin"/config-server.sh - -IFCONFIG=/sbin/ifconfig -[[ ! -x $IFCONFIG ]] && IFCONFIG='/bin/netstat -ie' - -IP=$($IFCONFIG 2>/dev/null| grep "inet[^6]" | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1) -if [[ $? != 0 ]]; then - IP=$(python -c 'import socket as s; print s.gethostbyname(s.getfqdn())') -fi - -HOSTS="$(hostname -a 2> /dev/null) $(hostname) localhost 127.0.0.1 $IP" -for host in $HOSTS; do - if grep -q "^${host}\$" "$ACCUMULO_CONF_DIR/tservers"; then - "${bin}/start-server.sh" "$host" tserver - break - fi -done - -for host in $HOSTS; do - if grep -q "^${host}\$" "$ACCUMULO_CONF_DIR/masters"; then - "${bin}/accumulo" org.apache.accumulo.master.state.SetGoalState NORMAL - "${bin}/start-server.sh" "$host" master - break - fi -done - -for host in $HOSTS; do - if grep -q "^${host}\$" "$ACCUMULO_CONF_DIR/gc"; then - "${bin}/start-server.sh" "$host" gc - break - fi -done - -for host in $HOSTS; do - if [[ $host == "$MONITOR" ]]; then - "${bin}/start-server.sh" "$MONITOR" monitor - break - fi -done - -for host in $HOSTS; do - if grep -q "^${host}\$" "$ACCUMULO_CONF_DIR/tracers"; then - "${bin}/start-server.sh" "$host" tracer - break - fi -done http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/start-server.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/start-server.sh b/assemble/scripts/start-server.sh deleted file mode 100755 index d5b7594..0000000 --- a/assemble/scripts/start-server.sh +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -script=$( basename "$SOURCE" ) -# Stop: Resolve Script Directory - -# Really, we still support the third <long_name> argument, but let's not tell people that.. -usage="Usage: start-server.sh <host> <service>" - -# Support the 3-arg invocation for backwards-compat -if [[ $# -ne 2 ]] && [[ $# -ne 3 ]]; then - echo $usage - exit 2 -fi - -. "$bin"/config.sh -. "$bin"/config-server.sh - -HOST="$1" -SERVICE="$2" - -IFCONFIG=/sbin/ifconfig -[[ ! -x $IFCONFIG ]] && IFCONFIG='/bin/netstat -ie' - -IP=$($IFCONFIG 2>/dev/null| grep "inet[^6]" | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1) -if [[ $? != 0 ]] ; then - IP=$(python -c 'import socket as s; print s.gethostbyname(s.getfqdn())') -fi - -if [[ $HOST == "localhost" || $HOST == $(hostname -f) || $HOST == $(hostname -s) || $HOST == $IP ]]; then - "$bin/start-daemon.sh" "$HOST" "$SERVICE" -else - # Ensure that the provided configuration directory is sent with the command - echo $($SSH $HOST "bash -c 'ACCUMULO_CONF_DIR=${ACCUMULO_CONF_DIR} $bin/start-daemon.sh \"$HOST\" \"$SERVICE\"'") -fi http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/stop-all.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/stop-all.sh b/assemble/scripts/stop-all.sh deleted file mode 100755 index 2825ef6..0000000 --- a/assemble/scripts/stop-all.sh +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/env 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. - - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [[ -h $SOURCE ]]; do # resolve $SOURCE until the file is no longer a symlink - bin=$( cd -P "$( dirname "$SOURCE" )" && pwd ) - SOURCE=$(readlink "$SOURCE") - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin=$( cd -P "$( dirname "$SOURCE" )" && pwd ) -# Stop: Resolve Script Directory - -. "$bin"/config.sh -. "$bin"/config-server.sh - -echo "Stopping accumulo services..." -${bin}/accumulo admin "$@" stopAll - -if [[ $? != 0 ]]; then - echo "Invalid password or unable to connect to the master" - echo "Initiating forced shutdown in 15 seconds (Ctrl-C to abort)" - sleep 10 - echo "Initiating forced shutdown in 5 seconds (Ctrl-C to abort)" -else - echo "Accumulo shut down cleanly" - echo "Utilities and unresponsive servers will shut down in 5 seconds (Ctrl-C to abort)" -fi - -sleep 5 - -#look for master and gc processes not killed by 'admin stopAll' -for signal in TERM KILL ; do - for master in $(grep -v '^#' "$ACCUMULO_CONF_DIR/masters"); do - "${bin}/stop-server.sh" "$master" "$ACCUMULO_HOME/lib/accumulo-start.*.jar" master $signal - done - - for gc in $(grep -v '^#' "$ACCUMULO_CONF_DIR/gc"); do - "${bin}/stop-server.sh" "$gc" "$ACCUMULO_HOME/lib/accumulo-start.*.jar" gc $signal - done - - "${bin}/stop-server.sh" "$MONITOR" "$ACCUMULO_HOME/.*/accumulo-start.*.jar" monitor $signal - - for tracer in $(egrep -v '(^#|^\s*$)' "$ACCUMULO_CONF_DIR/tracers"); do - "${bin}/stop-server.sh" "$tracer" "$ACCUMULO_HOME/.*/accumulo-start.*.jar" tracer $signal - done -done - -# stop tserver still running -"${bin}/tdown.sh" - -echo "Cleaning all server entries in ZooKeeper" -"$ACCUMULO_HOME/bin/accumulo" org.apache.accumulo.server.util.ZooZap -master -tservers -tracers --site-file "$ACCUMULO_CONF_DIR/accumulo-site.xml" - http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/stop-here.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/stop-here.sh b/assemble/scripts/stop-here.sh deleted file mode 100755 index 1edfb5b..0000000 --- a/assemble/scripts/stop-here.sh +++ /dev/null @@ -1,53 +0,0 @@ -#! /usr/bin/env 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. - -# -# This script safely stops all the accumulo services on this host -# - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Stop: Resolve Script Directory - -. "$bin"/config.sh - -# Determine hostname without errors to user -HOSTS_TO_CHECK=($(hostname -a 2> /dev/null | head -1) $(hostname -f)) - -if egrep -q localhost\|127.0.0.1 "$ACCUMULO_CONF_DIR/tservers"; then - "$bin/accumulo" admin stop localhost -else - for host in "${HOSTS_TO_CHECK[@]}"; do - if grep -q "$host" "$ACCUMULO_CONF_DIR"/tservers; then - "${bin}/accumulo" admin stop "$host" - fi - done -fi - -for HOSTNAME in "${HOSTS_TO_CHECK[@]}"; do - for signal in TERM KILL; do - for svc in tserver gc master monitor tracer; do - "$ACCUMULO_HOME"/bin/stop-server.sh "$HOSTNAME" "$ACCUMULO_HOME/lib/accumulo-start.jar" $svc $signal - done - done -done http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/stop-server.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/stop-server.sh b/assemble/scripts/stop-server.sh deleted file mode 100755 index bba0f1e..0000000 --- a/assemble/scripts/stop-server.sh +++ /dev/null @@ -1,59 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - bin=$( cd -P "$( dirname "$SOURCE" )" && pwd ) - SOURCE=$(readlink "$SOURCE") - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin=$( cd -P "$( dirname "$SOURCE" )" && pwd ) -# Stop: Resolve Script Directory - -. "$bin"/config.sh -. "$bin"/config-server.sh - -HOST=$1 - -IFCONFIG=/sbin/ifconfig -[[ ! -x $IFCONFIG ]] && IFCONFIG='/bin/netstat -ie' - -IP=$($IFCONFIG 2>/dev/null| grep "inet[^6]" | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1) -if [[ $? != 0 ]] -then - IP=$(python -c 'import socket as s; print s.gethostbyname(s.getfqdn())') -fi - -# only stop if there's not one already running -if [[ $HOST == localhost || $HOST = "$(hostname -s)" || $HOST = "$(hostname -f)" || $HOST = "$IP" ]] ; then - for PID_FILE in ${ACCUMULO_PID_DIR}/accumulo-${ACCUMULO_IDENT_STRING}-${3}*.pid; do - if [[ -f ${PID_FILE} ]]; then - echo "Stopping $3 on $1"; - kill -s "$4" `cat ${PID_FILE}` 2>/dev/null - rm -f ${PID_FILE} 2>/dev/null - fi; - done -else - for PID_FILE in $(ssh -q -o 'ConnectTimeout 8' "$1" ls "${ACCUMULO_PID_DIR}/accumulo-${ACCUMULO_IDENT_STRING}-${3}*.pid" 2>/dev/null); do - PID=$(ssh -q -o 'ConnectTimeout 8' "$1" cat "${PID_FILE}" 2>/dev/null) - if [[ ! -z $PID ]]; then - echo "Stopping $3 on $1"; - ssh -q -o 'ConnectTimeout 8' "$1" "kill -s $4 $PID 2>/dev/null; rm -f ${PID_FILE} 2>/dev/null" - fi - done -fi http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/tdown.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/tdown.sh b/assemble/scripts/tdown.sh deleted file mode 100755 index dd81ddd..0000000 --- a/assemble/scripts/tdown.sh +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Stop: Resolve Script Directory - -. "$bin"/config.sh - -HADOOP_CMD=$HADOOP_PREFIX/bin/hadoop -TSERVERS=$ACCUMULO_CONF_DIR/tservers -TSERVER_HOSTS=$(egrep -v '(^#|^\s*$)' "${TSERVERS}") - -echo "Stopping unresponsive tablet servers (if any)..." -for server in ${TSERVER_HOSTS}; do - # only start if there's not one already running - $ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/lib/accumulo-start.jar" tserver TERM & -done - -sleep 10 - -echo "Stopping unresponsive tablet servers hard (if any)..." -for server in ${TSERVER_HOSTS}; do - # only start if there's not one already running - $ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/lib/accumulo-start.jar" tserver KILL & -done - -echo "Cleaning tablet server entries from zookeeper" -$ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.util.ZooZap -tservers http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/templates/accumulo-env.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/templates/accumulo-env.sh b/assemble/scripts/templates/accumulo-env.sh deleted file mode 100644 index a91b4b3..0000000 --- a/assemble/scripts/templates/accumulo-env.sh +++ /dev/null @@ -1,89 +0,0 @@ -#! /usr/bin/env 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. - -### -### Configure these environment variables to point to your local installations. -### -### The functional tests require conditional values, so keep this style: -### -### test -z "$JAVA_HOME" && export JAVA_HOME=/usr/lib/jvm/java -### -### -### Note that the -Xmx -Xms settings below require substantial free memory: -### you may want to use smaller values, especially when running everything -### on a single machine. -### -if [[ -z $HADOOP_HOME ]] ; then - test -z "$HADOOP_PREFIX" && export HADOOP_PREFIX=/path/to/hadoop -else - HADOOP_PREFIX="$HADOOP_HOME" - unset HADOOP_HOME -fi - -# hadoop-2.0: -test -z "$HADOOP_CONF_DIR" && export HADOOP_CONF_DIR="$HADOOP_PREFIX/etc/hadoop" - -test -z "$JAVA_HOME" && export JAVA_HOME=/path/to/java -test -z "$ZOOKEEPER_HOME" && export ZOOKEEPER_HOME=/path/to/zookeeper -test -z "$ACCUMULO_LOG_DIR" && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs -test -z "$ACCUMULO_TSERVER_OPTS" && export ACCUMULO_TSERVER_OPTS="${tServerHigh_tServerLow} " -test -z "$ACCUMULO_MASTER_OPTS" && export ACCUMULO_MASTER_OPTS="${masterHigh_masterLow}" -test -z "$ACCUMULO_MONITOR_OPTS" && export ACCUMULO_MONITOR_OPTS="${monitorHigh_monitorLow}" -test -z "$ACCUMULO_GC_OPTS" && export ACCUMULO_GC_OPTS="${gcHigh_gcLow}" -test -z "$ACCUMULO_SHELL_OPTS" && export ACCUMULO_SHELL_OPTS="${shellHigh_shellLow}" -test -z "$ACCUMULO_GENERAL_OPTS" && export ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true -XX:+CMSClassUnloadingEnabled" -test -z "$ACCUMULO_OTHER_OPTS" && export ACCUMULO_OTHER_OPTS="${otherHigh_otherLow}" -test -z "${ACCUMULO_PID_DIR}" && export ACCUMULO_PID_DIR="${ACCUMULO_HOME}/run" -# what do when the JVM runs out of heap memory -export ACCUMULO_KILL_CMD='kill -9 %p' - -### Optionally look for hadoop and accumulo native libraries for your -### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.) -### May not be necessary for Hadoop 2.x or using an RPM that installs to -### the correct system library directory. -# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH} - -# Should the monitor bind to all network interfaces -- default: false -# export ACCUMULO_MONITOR_BIND_ALL="true" - -# Should process be automatically restarted -# export ACCUMULO_WATCHER="true" - -# What settings should we use for the watcher, if enabled -export UNEXPECTED_TIMESPAN="3600" -export UNEXPECTED_RETRIES="2" - -export OOM_TIMESPAN="3600" -export OOM_RETRIES="5" - -export ZKLOCK_TIMESPAN="600" -export ZKLOCK_RETRIES="5" - -# The number of .out and .err files per process to retain -# export ACCUMULO_NUM_OUT_FILES=5 - -export NUM_TSERVERS=1 - -### Example for configuring multiple tservers per host. Note that the ACCUMULO_NUMACTL_OPTIONS -### environment variable is used when NUM_TSERVERS is 1 to preserve backwards compatibility. -### If NUM_TSERVERS is greater than 2, then the TSERVER_NUMA_OPTIONS array is used if defined. -### If TSERVER_NUMA_OPTIONS is declared but not the correct size, then the service will not start. -### -### export NUM_TSERVERS=2 -### declare -a TSERVER_NUMA_OPTIONS -### TSERVER_NUMA_OPTIONS[1]="--cpunodebind 0" -### TSERVER_NUMA_OPTIONS[2]="--cpunodebind 1" http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/templates/accumulo-site.xml ---------------------------------------------------------------------- diff --git a/assemble/scripts/templates/accumulo-site.xml b/assemble/scripts/templates/accumulo-site.xml deleted file mode 100644 index ff490b1..0000000 --- a/assemble/scripts/templates/accumulo-site.xml +++ /dev/null @@ -1,176 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> - -<configuration> - <!-- Put your site-specific accumulo configurations here. The available configuration values along with their defaults are documented in docs/config.html Unless - you are simply testing at your workstation, you will most definitely need to change the three entries below. --> - - <property> - <name>instance.volumes</name> - <value></value> - <description>comma separated list of URIs for volumes. example: hdfs://localhost:9000/accumulo</description> - </property> - - <property> - <name>instance.zookeeper.host</name> - <value>localhost:2181</value> - <description>comma separated list of zookeeper servers</description> - </property> - - <property> - <name>instance.secret</name> - <value>DEFAULT</value> - <description>A secret unique to a given instance that all servers must know in order to communicate with one another. - Change it before initialization. To - change it later use ./bin/accumulo org.apache.accumulo.server.util.ChangeSecret --old [oldpasswd] --new [newpasswd], - and then update this file. - </description> - </property> - - <property> - <name>tserver.memory.maps.max</name> - <value>${memMapMax}</value> - </property> - - <property> - <name>tserver.memory.maps.native.enabled</name> - <value>${nativeEnabled}</value> - </property> - - <property> - <name>tserver.cache.data.size</name> - <value>${cacheDataSize}</value> - </property> - - <property> - <name>tserver.cache.index.size</name> - <value>${cacheIndexSize}</value> - </property> - - <property> - <name>trace.token.property.password</name> - <!-- change this to the root user's password, and/or change the user below --> - <value>secret</value> - </property> - - <!-- Kerberos requirements --> - <property> - <name>instance.rpc.sasl.enabled</name> - <value>true</value> - </property> - - <property> - <name>general.kerberos.keytab</name> - <value>${keytab}</value> - </property> - - <property> - <name>general.kerberos.principal</name> - <value>${principal}</value> - </property> - - <property> - <name>trace.token.type</name> - <value>org.apache.accumulo.core.client.security.tokens.KerberosToken</value> - </property> - - <property> - <name>instance.security.authenticator</name> - <value>org.apache.accumulo.server.security.handler.KerberosAuthenticator</value> - </property> - - <property> - <name>instance.security.authorizor</name> - <value>org.apache.accumulo.server.security.handler.KerberosAuthorizor</value> - </property> - - <property> - <name>instance.security.permissionHandler</name> - <value>org.apache.accumulo.server.security.handler.KerberosPermissionHandler</value> - </property> - <!-- End Kerberos requirements --> - - <property> - <name>trace.user</name> - <value>${traceUser}</value> - </property> - - <property> - <name>tserver.sort.buffer.size</name> - <value>${sortBufferSize}</value> - </property> - - <property> - <name>tserver.walog.max.size</name> - <value>${waLogMaxSize}</value> - </property> -${mvnProjBaseDir} - <property> - <name>general.classpaths</name> - - <value> - <!-- Accumulo requirements --> - $ACCUMULO_HOME/lib/accumulo-server.jar, - $ACCUMULO_HOME/lib/accumulo-core.jar, - $ACCUMULO_HOME/lib/accumulo-start.jar, - $ACCUMULO_HOME/lib/accumulo-fate.jar, - $ACCUMULO_HOME/lib/accumulo-proxy.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - <!-- ZooKeeper requirements --> - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - <!-- Common Hadoop requirements --> - $HADOOP_CONF_DIR, - <!-- Hadoop 2 requirements --> - $HADOOP_PREFIX/share/hadoop/common/[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/common/lib/(?!slf4j)[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/hdfs/[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/mapreduce/[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/yarn/[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/yarn/lib/jersey.*.jar, - <!-- End Hadoop 2 requirements --> - <!-- HDP 2.0 requirements --> - /usr/lib/hadoop/[^.].*.jar, - /usr/lib/hadoop/lib/[^.].*.jar, - /usr/lib/hadoop-hdfs/[^.].*.jar, - /usr/lib/hadoop-mapreduce/[^.].*.jar, - /usr/lib/hadoop-yarn/[^.].*.jar, - /usr/lib/hadoop-yarn/lib/jersey.*.jar, - <!-- End HDP 2.0 requirements --> - <!-- HDP 2.2 requirements --> - /usr/hdp/current/hadoop-client/[^.].*.jar, - /usr/hdp/current/hadoop-client/lib/(?!slf4j)[^.].*.jar, - /usr/hdp/current/hadoop-hdfs-client/[^.].*.jar, - /usr/hdp/current/hadoop-mapreduce-client/[^.].*.jar, - /usr/hdp/current/hadoop-yarn-client/[^.].*.jar, - /usr/hdp/current/hadoop-yarn-client/lib/jersey.*.jar, - /usr/hdp/current/hive-client/lib/hive-accumulo-handler.jar - <!-- End HDP 2.2 requirements --> - <!-- IOP 4.1 requirements --> - /usr/iop/current/hadoop-client/[^.].*.jar, - /usr/iop/current/hadoop-client/lib/(?!slf4j)[^.].*.jar, - /usr/iop/current/hadoop-hdfs-client/[^.].*.jar, - /usr/iop/current/hadoop-mapreduce-client/[^.].*.jar, - /usr/iop/current/hadoop-yarn-client/[^.].*.jar, - /usr/iop/current/hadoop-yarn-client/lib/jersey.*.jar, - /usr/iop/current/hive-client/lib/hive-accumulo-handler.jar - <!-- End IOP 4.1 requirements --> - </value> - <description>Classpaths that accumulo checks for updates and class files.</description> - </property> -</configuration> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/tool.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/tool.sh b/assemble/scripts/tool.sh deleted file mode 100755 index 88387fa..0000000 --- a/assemble/scripts/tool.sh +++ /dev/null @@ -1,92 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Stop: Resolve Script Directory - -. "$bin"/config.sh - -if [[ -z "$HADOOP_PREFIX" ]] ; then - echo "HADOOP_PREFIX is not set. Please make sure it's set globally or in conf/accumulo-env.sh" - exit 1 -fi -if [[ -z "$ZOOKEEPER_HOME" ]] ; then - echo "ZOOKEEPER_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh" - exit 1 -fi - -ZOOKEEPER_CMD='ls -1 $ZOOKEEPER_HOME/zookeeper-[0-9]*[^csn].jar ' -if [[ $(eval $ZOOKEEPER_CMD | wc -l) -ne 1 ]] ; then - echo "Not exactly one zookeeper jar in $ZOOKEEPER_HOME" - exit 1 -fi -ZOOKEEPER_LIB=$(eval $ZOOKEEPER_CMD) - -LIB="$ACCUMULO_HOME/lib" -CORE_LIB="$LIB/accumulo-core.jar" -FATE_LIB="$LIB/accumulo-fate.jar" -THRIFT_LIB="$LIB/libthrift.jar" -JCOMMANDER_LIB="$LIB/jcommander.jar" -COMMONS_VFS_LIB="$LIB/commons-vfs2.jar" -GUAVA_LIB="$LIB/guava.jar" -HTRACE_LIB="$LIB/htrace-core.jar" - -USERJARS=" " -for arg in "$@"; do - if [ "$arg" != "-libjars" -a -z "$TOOLJAR" ]; then - TOOLJAR="$arg" - shift - elif [ "$arg" != "-libjars" -a -z "$CLASSNAME" ]; then - CLASSNAME="$arg" - shift - elif [ -z "$USERJARS" ]; then - USERJARS=$(echo "$arg" | tr "," " ") - shift - elif [ "$arg" = "-libjars" ]; then - USERJARS="" - shift - else - break - fi -done - -LIB_JARS="$THRIFT_LIB,$CORE_LIB,$FATE_LIB,$ZOOKEEPER_LIB,$JCOMMANDER_LIB,$COMMONS_VFS_LIB,$GUAVA_LIB,$HTRACE_LIB" -H_JARS="$THRIFT_LIB:$CORE_LIB:$FATE_LIB:$ZOOKEEPER_LIB:$JCOMMANDER_LIB:$COMMONS_VFS_LIB:$GUAVA_LIB:$HTRACE_LIB" - -for jar in $USERJARS; do - LIB_JARS="$LIB_JARS,$jar" - H_JARS="$H_JARS:$jar" -done -export HADOOP_CLASSPATH="$H_JARS:$HADOOP_CLASSPATH" - -if [[ -z "$CLASSNAME" || -z "$TOOLJAR" ]]; then - echo "Usage: tool.sh path/to/myTool.jar my.tool.class.Name [-libjars my1.jar,my2.jar]" 1>&2 - exit 1 -fi - -#echo USERJARS=$USERJARS -#echo CLASSNAME=$CLASSNAME -#echo HADOOP_CLASSPATH=$HADOOP_CLASSPATH -#echo exec "$HADOOP_PREFIX/bin/hadoop" jar "$TOOLJAR" $CLASSNAME -libjars \"$LIB_JARS\" $ARGS -exec "$HADOOP_PREFIX/bin/hadoop" jar "$TOOLJAR" $CLASSNAME -libjars \"$LIB_JARS\" "$@" http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/scripts/tup.sh ---------------------------------------------------------------------- diff --git a/assemble/scripts/tup.sh b/assemble/scripts/tup.sh deleted file mode 100755 index f9e8903..0000000 --- a/assemble/scripts/tup.sh +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env 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. - -# Start: Resolve Script Directory -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Stop: Resolve Script Directory - -. "$bin"/config.sh - -TSERVERS=$ACCUMULO_CONF_DIR/tservers - -echo -n "Starting tablet servers ..." - -count=1 -for server in $(egrep -v '(^#|^\s*$)' "${TSERVERS}"); do - echo -n "." - ${bin}/start-server.sh $server tserver & - if (( ++count % 72 == 0 )) ; - then - echo - wait - fi -done - -echo " done" http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/src/main/assemblies/component.xml ---------------------------------------------------------------------- diff --git a/assemble/src/main/assemblies/component.xml b/assemble/src/main/assemblies/component.xml index 2156e40..ac71fce 100644 --- a/assemble/src/main/assemblies/component.xml +++ b/assemble/src/main/assemblies/component.xml @@ -73,8 +73,26 @@ <fileMode>0755</fileMode> </fileSet> <fileSet> + <directory>libexec</directory> + <directoryMode>0755</directoryMode> + <fileMode>0755</fileMode> + <includes> + <include>**/*.sh</include> + <include>check-tservers</include> + </includes> + </fileSet> + <fileSet> + <directory>libexec/templates</directory> + <outputDirectory>libexec/templates</outputDirectory> + <directoryMode>0755</directoryMode> + <fileMode>0644</fileMode> + <includes> + <include>accumulo-site.xml</include> + </includes> + </fileSet> + <fileSet> <directory>../examples/simple</directory> - <outputDirectory>examples/simple</outputDirectory> + <outputDirectory>opt/examples/simple</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> <includes> @@ -153,6 +171,7 @@ </fileSet> <fileSet> <directory>../test</directory> + <outputDirectory>opt/test</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0755</fileMode> <includes> @@ -168,6 +187,7 @@ </fileSet> <fileSet> <directory>../test</directory> + <outputDirectory>opt/test</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> <excludes> @@ -190,9 +210,9 @@ <!-- Lift generated thrift proxy code into its own directory --> <fileSet> <directory>../proxy/target</directory> + <outputDirectory>opt/proxy/thrift</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> - <outputDirectory>proxy/thrift</outputDirectory> <includes> <include>gen-cpp/**</include> <include>gen-py/**</include> @@ -201,6 +221,7 @@ </fileSet> <fileSet> <directory>../proxy</directory> + <outputDirectory>opt/proxy</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> <includes> @@ -210,6 +231,7 @@ </fileSet> <fileSet> <directory>../proxy/examples</directory> + <outputDirectory>opt/proxy/examples</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0755</fileMode> <includes> @@ -219,6 +241,7 @@ </fileSet> <fileSet> <directory>../proxy/examples</directory> + <outputDirectory>opt/proxy/examples</outputDirectory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> <excludes> @@ -230,7 +253,7 @@ <directory>../proxy/src/main/thrift</directory> <directoryMode>0755</directoryMode> <fileMode>0644</fileMode> - <outputDirectory>proxy/thrift</outputDirectory> + <outputDirectory>/opt/proxy/thrift</outputDirectory> <includes> <include>*.thrift</include> </includes> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/assemble/src/main/scripts/generate-example-configs.sh ---------------------------------------------------------------------- diff --git a/assemble/src/main/scripts/generate-example-configs.sh b/assemble/src/main/scripts/generate-example-configs.sh index 9dfbfe1..c9073dd 100755 --- a/assemble/src/main/scripts/generate-example-configs.sh +++ b/assemble/src/main/scripts/generate-example-configs.sh @@ -17,12 +17,8 @@ # This script will regenerate the example configuration files for the tarball -out=target/bootstrap-config.out +out=target/config.out echo 'Generating example scripts...' > $out -for s in 1GB 2GB 3GB 512MB -do - bin/bootstrap_config.sh -o -d target/example-configs/$s/standalone -s $s -j -v 2 >> $out 2>&1 - bin/bootstrap_config.sh -o -d target/example-configs/$s/native-standalone -s $s -n -v 2 >> $out 2>&1 -done +libexec/config.sh -o -d target/example-configs -s 2GB -j -v 2 >> $out 2>&1 http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/Constants.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/Constants.java b/core/src/main/java/org/apache/accumulo/core/Constants.java index eebd81d..85a7238 100644 --- a/core/src/main/java/org/apache/accumulo/core/Constants.java +++ b/core/src/main/java/org/apache/accumulo/core/Constants.java @@ -126,7 +126,8 @@ public class Constants { public static final String EXPORT_INFO_FILE = "accumulo_export_info.txt"; // Variables that will be substituted with environment vars in PropertyType.PATH values - public static final Collection<String> PATH_PROPERTY_ENV_VARS = Collections.unmodifiableCollection(Arrays.asList("ACCUMULO_HOME", "ACCUMULO_CONF_DIR")); + public static final Collection<String> PATH_PROPERTY_ENV_VARS = Collections.unmodifiableCollection(Arrays.asList("ACCUMULO_HOME", + "ACCUMULO_CONF_DIR")); public static final String HDFS_TABLES_DIR = "/tables"; http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java index 1b9b380..c3dfb8b 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java @@ -200,8 +200,8 @@ public class ClientConfiguration extends CompositeConfiguration { /** * Attempts to load a configuration file from the system. Uses the "ACCUMULO_CLIENT_CONF_PATH" environment variable, split on File.pathSeparator, for a list - * of target files. If not set, uses the following in this order- ~/.accumulo/config $ACCUMULO_CONF_DIR/client.conf -OR- $ACCUMULO_HOME/conf/client.conf - * (depending on whether $ACCUMULO_CONF_DIR is set) /etc/accumulo/client.conf + * of target files. If not set, uses the following in this order- ~/.accumulo/config $ACCUMULO_CONF_DIR/client.conf -OR- /etc/accumulo/client.conf -OR- + * /etc/accumulo/conf/client.conf * * A client configuration will then be read from each location using PropertiesConfiguration to construct a configuration. That means the latest item will be * the one in the configuration. @@ -270,14 +270,13 @@ public class ClientConfiguration extends CompositeConfiguration { } else { // if $ACCUMULO_CLIENT_CONF_PATH env isn't set, priority from top to bottom is: // ~/.accumulo/config - // $ACCUMULO_CONF_DIR/client.conf -OR- $ACCUMULO_HOME/conf/client.conf (depending on whether $ACCUMULO_CONF_DIR is set) + // $ACCUMULO_CONF_DIR/client.conf // /etc/accumulo/client.conf + // /etc/accumulo/conf/client.conf clientConfPaths = new LinkedList<>(); clientConfPaths.add(System.getProperty("user.home") + File.separator + USER_ACCUMULO_DIR_NAME + File.separator + USER_CONF_FILENAME); if (System.getenv("ACCUMULO_CONF_DIR") != null) { clientConfPaths.add(System.getenv("ACCUMULO_CONF_DIR") + File.separator + GLOBAL_CONF_FILENAME); - } else if (System.getenv("ACCUMULO_HOME") != null) { - clientConfPaths.add(System.getenv("ACCUMULO_HOME") + File.separator + "conf" + File.separator + GLOBAL_CONF_FILENAME); } clientConfPaths.add("/etc/accumulo/" + GLOBAL_CONF_FILENAME); clientConfPaths.add("/etc/accumulo/conf/" + GLOBAL_CONF_FILENAME); http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java index cf0d046..029c86a 100644 --- a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java +++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java @@ -114,6 +114,11 @@ public class PrintInfo implements KeywordExecutable { } @Override + public String description() { + return "Print rfile info"; + } + + @Override public void execute(final String[] args) throws Exception { Opts opts = new Opts(); opts.parseArgs(PrintInfo.class.getName(), args); http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/util/Classpath.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/Classpath.java b/core/src/main/java/org/apache/accumulo/core/util/Classpath.java index b2a6248..855e53b 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/Classpath.java +++ b/core/src/main/java/org/apache/accumulo/core/util/Classpath.java @@ -29,6 +29,11 @@ public class Classpath implements KeywordExecutable { } @Override + public String description() { + return "Print Accumulo classpath"; + } + + @Override public void execute(final String[] args) throws Exception { Main.getVFSClassLoader().getMethod("printClassPath").invoke(Main.getVFSClassLoader()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java index b63cdfd..005b5ba 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java +++ b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java @@ -78,6 +78,11 @@ public class CreateToken implements KeywordExecutable { } @Override + public String description() { + return "Creates authentication token"; + } + + @Override public void execute(String[] args) { Opts opts = new Opts(); opts.parseArgs(CreateToken.class.getName(), args); http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/util/Help.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/Help.java b/core/src/main/java/org/apache/accumulo/core/util/Help.java index f090b18..2602ddc 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/Help.java +++ b/core/src/main/java/org/apache/accumulo/core/util/Help.java @@ -29,6 +29,11 @@ public class Help implements KeywordExecutable { } @Override + public String description() { + return "Prints usage"; + } + + @Override public void execute(final String[] args) throws Exception { Main.printUsage(); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/util/Jar.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/Jar.java b/core/src/main/java/org/apache/accumulo/core/util/Jar.java index e5c2d1c..bf05627 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/Jar.java +++ b/core/src/main/java/org/apache/accumulo/core/util/Jar.java @@ -26,11 +26,21 @@ import com.google.auto.service.AutoService; @AutoService(KeywordExecutable.class) public class Jar implements KeywordExecutable { + @Override public String keyword() { return "jar"; } + public String usage() { + return "jar <jar> [<main class>] args"; + } + + @Override + public String description() { + return "Run Java <main class> in <jar> using Accumulo classpath"; + } + @Override public void execute(final String[] args) throws Exception { // need at least one argument for the jar file, two arguments if the jar file manifest doesn't specify a main class http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/main/java/org/apache/accumulo/core/util/Version.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/Version.java b/core/src/main/java/org/apache/accumulo/core/util/Version.java index f3d8bfb..d491f1e 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/Version.java +++ b/core/src/main/java/org/apache/accumulo/core/util/Version.java @@ -35,6 +35,11 @@ public class Version implements KeywordExecutable { } @Override + public String description() { + return "Print Accumulo version"; + } + + @Override public void execute(final String[] args) throws Exception { Class<?> runTMP = Main.getClassLoader().loadClass("org.apache.accumulo.core.Constants"); System.out.println(runTMP.getField("VERSION").get(null)); http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/test/resources/crypto-off-accumulo-site.xml ---------------------------------------------------------------------- diff --git a/core/src/test/resources/crypto-off-accumulo-site.xml b/core/src/test/resources/crypto-off-accumulo-site.xml index ca4bef9..90efd68 100644 --- a/core/src/test/resources/crypto-off-accumulo-site.xml +++ b/core/src/test/resources/crypto-off-accumulo-site.xml @@ -80,26 +80,4 @@ <name>tserver.walog.max.size</name> <value>100M</value> </property> - - <property> - <name>general.classpaths</name> - <value> - $ACCUMULO_HOME/server/target/classes/, - $ACCUMULO_HOME/core/target/classes/, - $ACCUMULO_HOME/start/target/classes/, - $ACCUMULO_HOME/fate/target/classes/, - $ACCUMULO_HOME/proxy/target/classes/, - $ACCUMULO_HOME/examples/target/classes/, - $ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - $HADOOP_CONF_DIR, - $HADOOP_PREFIX/[^.].*.jar, - $HADOOP_PREFIX/lib/[^.].*.jar, - </value> - <description>Classpaths that accumulo checks for updates and class files. - When using the Security Manager, please remove the ".../target/classes/" values. - </description> - </property> - </configuration> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/test/resources/crypto-on-accumulo-site.xml ---------------------------------------------------------------------- diff --git a/core/src/test/resources/crypto-on-accumulo-site.xml b/core/src/test/resources/crypto-on-accumulo-site.xml index 61b64a9..6025824 100644 --- a/core/src/test/resources/crypto-on-accumulo-site.xml +++ b/core/src/test/resources/crypto-on-accumulo-site.xml @@ -80,28 +80,6 @@ <name>tserver.walog.max.size</name> <value>100M</value> </property> - - <property> - <name>general.classpaths</name> - <value> - $ACCUMULO_HOME/server/target/classes/, - $ACCUMULO_HOME/core/target/classes/, - $ACCUMULO_HOME/start/target/classes/, - $ACCUMULO_HOME/fate/target/classes/, - $ACCUMULO_HOME/proxy/target/classes/, - $ACCUMULO_HOME/examples/target/classes/, - $ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - $HADOOP_CONF_DIR, - $HADOOP_PREFIX/[^.].*.jar, - $HADOOP_PREFIX/lib/[^.].*.jar, - </value> - <description>Classpaths that accumulo checks for updates and class files. - When using the Security Manager, please remove the ".../target/classes/" values. - </description> - </property> - <property> <name>crypto.module.class</name> <value>org.apache.accumulo.core.security.crypto.DefaultCryptoModule</value> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml ---------------------------------------------------------------------- diff --git a/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml b/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml index 128a54f..888aa1d 100644 --- a/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml +++ b/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml @@ -80,28 +80,6 @@ <name>tserver.walog.max.size</name> <value>100M</value> </property> - - <property> - <name>general.classpaths</name> - <value> - $ACCUMULO_HOME/server/target/classes/, - $ACCUMULO_HOME/core/target/classes/, - $ACCUMULO_HOME/start/target/classes/, - $ACCUMULO_HOME/fate/target/classes/, - $ACCUMULO_HOME/proxy/target/classes/, - $ACCUMULO_HOME/examples/target/classes/, - $ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - $HADOOP_CONF_DIR, - $HADOOP_PREFIX/[^.].*.jar, - $HADOOP_PREFIX/lib/[^.].*.jar, - </value> - <description>Classpaths that accumulo checks for updates and class files. - When using the Security Manager, please remove the ".../target/classes/" values. - </description> - </property> - <property> <name>crypto.module.class</name> <value>org.apache.accumulo.core.security.crypto.DefaultCryptoModule</value> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/core/src/test/resources/disabled/conf/accumulo-site.xml ---------------------------------------------------------------------- diff --git a/core/src/test/resources/disabled/conf/accumulo-site.xml b/core/src/test/resources/disabled/conf/accumulo-site.xml deleted file mode 100644 index 6c9855d..0000000 --- a/core/src/test/resources/disabled/conf/accumulo-site.xml +++ /dev/null @@ -1,118 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> - -<configuration> - <!-- Put your site-specific accumulo configurations here. The available - configuration values along with their defaults are documented in docs/config.html - Unless you are simply testing at your workstation, you will most definitely - need to change the three entries below. --> - - <property> - <name>instance.zookeeper.host</name> - <value>localhost:2181</value> - <description>comma separated list of zookeeper servers</description> - </property> - - <property> - <name>instance.secret</name> - <value>DEFAULT</value> - <description>A secret unique to a given instance that all servers must - know in order to communicate with one another. - Change it before initialization. To - change it later use ./bin/accumulo - org.apache.accumulo.server.util.ChangeSecret [oldpasswd] [newpasswd], - and then update this file. - </description> - </property> - - <property> - <name>tserver.memory.maps.max</name> - <value>80M</value> - </property> - - <property> - <name>tserver.cache.data.size</name> - <value>7M</value> - </property> - - <property> - <name>tserver.cache.index.size</name> - <value>20M</value> - </property> - - <property> - <name>trace.password</name> - <!-- change this to the root user's password, and/or change the user below --> - <value>secret</value> - </property> - - <property> - <name>trace.user</name> - <value>root</value> - </property> - - <property> - <name>tserver.sort.buffer.size</name> - <value>50M</value> - </property> - - <property> - <name>tserver.walog.max.size</name> - <value>100M</value> - </property> - - <property> - <name>general.classpaths</name> - <!-- - Add the following for hadoop-2.0 - $HADOOP_PREFIX/share/hadoop/common/.*.jar, - $HADOOP_PREFIX/share/hadoop/common/lib/.*.jar, - $HADOOP_PREFIX/share/hadoop/hdfs/.*.jar, - $HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar, - $HADOOP_PREFIX/share/hadoop/yarn/.*.jar, - --> - <value> - $ACCUMULO_HOME/server/target/classes/, - $ACCUMULO_HOME/lib/accumulo-server.jar, - $ACCUMULO_HOME/core/target/classes/, - $ACCUMULO_HOME/lib/accumulo-core.jar, - $ACCUMULO_HOME/start/target/classes/, - $ACCUMULO_HOME/lib/accumulo-start.jar, - $ACCUMULO_HOME/fate/target/classes/, - $ACCUMULO_HOME/lib/accumulo-fate.jar, - $ACCUMULO_HOME/proxy/target/classes/, - $ACCUMULO_HOME/lib/accumulo-proxy.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - $HADOOP_CONF_DIR, - $HADOOP_PREFIX/[^.].*.jar, - $HADOOP_PREFIX/lib/[^.].*.jar, - </value> - <description>Classpaths that accumulo checks for updates and class files. - When using the Security Manager, please remove the ".../target/classes/" values. - </description> - </property> - - <!-- VFS ClassLoader Settings --> - <property> - <name>vfs.classloader.enabled</name> - <value>true</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/administration.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/administration.txt b/docs/src/main/asciidoc/chapters/administration.txt index 024dc52..5e7fb24 100644 --- a/docs/src/main/asciidoc/chapters/administration.txt +++ b/docs/src/main/asciidoc/chapters/administration.txt @@ -78,10 +78,28 @@ sufficient space: cd accumulo-X.Y.Z Repeat this step on each machine in your cluster. Typically, the same +<install directory>+ -is chosen for all machines in the cluster. When you configure Accumulo, the +$ACCUMULO_HOME+ -environment variable should be set to +/path/to/<install directory>/accumulo-X.Y.Z+. +is chosen for all machines in the cluster. + +There are three scripts in the the `bin/` directory that are used to manage Accumulo: + +1. `accumulo` - Runs Accumulo command-line tools and starts Accumulo processes +2. `accumulo-service` - Runs Accumulo processes as services +3. `accumulo-cluster` - Manages Accumulo cluster on a single node or several nodes + +These scripts will be used in the remaining instructions to configure and run Accumulo. + +Add the following to your `~/.bashrc` if you want to be able to execute these scripts +from any directory: + + export PATH=/path/to/accumulo-X.Y.Z/bin:$PATH + +Source your `~/.bashrc` for the changes to take effect and verify: + + source ~/.bashrc + which accumulo === Dependencies + Accumulo requires HDFS and ZooKeeper to be configured and running before starting. Password-less SSH should be configured between at least the Accumulo master and TabletServer machines. It is also a good idea to run Network @@ -91,7 +109,7 @@ sync, which can cause problems with automatically timestamped data. === Configuration Accumulo is configured by editing several Shell and XML files found in -+$ACCUMULO_HOME/conf+. The structure closely resembles Hadoop's configuration ++$ACCUMULO_CONF_DIR+. The structure closely resembles Hadoop's configuration files. Logging is primarily controlled using the log4j configuration files, @@ -107,7 +125,6 @@ rather than all the logs that it receives from other server types. Accumulo needs to know where to find the software it depends on. Edit accumulo-env.sh and specify the following: -. Enter the location of the installation directory of Accumulo for +$ACCUMULO_HOME+ . Enter your system's Java home for +$JAVA_HOME+ . Enter the location of Hadoop for +$HADOOP_PREFIX+ . Choose a location for Accumulo logs and enter it for +$ACCUMULO_LOG_DIR+ @@ -145,23 +162,22 @@ in the JVM by causing it to pause much less frequently. ===== Building 32-bit and 64-bit Linux and Mac OS X versions of the native map can be built -from the Accumulo bin package by executing -+$ACCUMULO_HOME/bin/build_native_library.sh+. If your system's +from the Accumulo bin package by executing +accumulo build-native+. If your system's default compiler options are insufficient, you can add additional compiler options to the command line, such as options for the architecture. These will be passed to the Makefile in the environment variable +USERFLAGS+. Examples: -. +$ACCUMULO_HOME/bin/build_native_library.sh+ -. +$ACCUMULO_HOME/bin/build_native_library.sh -m32+ + accumulo build-native + accumulo build-native -m32 After building the native map from the source, you will find the artifact in -+$ACCUMULO_HOME/lib/native+. Upon starting up, the tablet server will look ++lib/native+. Upon starting up, the tablet server will look in this directory for the map library. If the file is renamed or moved from its target directory, the tablet server may not be able to find it. The system can also locate the native maps shared library by setting +LD_LIBRARY_PATH+ -(or +DYLD_LIBRARY_PATH+ on Mac OS X) in +$ACCUMULO_HOME/conf/accumulo-env.sh+. +(or +DYLD_LIBRARY_PATH+ on Mac OS X) in +$ACCUMULO_CONF_DIR/accumulo-env.sh+. ===== Native Maps Configuration @@ -197,8 +213,8 @@ performance to the write-ahead log file which will slow ingest. On the machine that will serve as the Accumulo master: -. Write the IP address or domain name of the Accumulo Master to the +$ACCUMULO_HOME/conf/masters+ file. -. Write the IP addresses or domain name of the machines that will be TabletServers in +$ACCUMULO_HOME/conf/tservers+, one per line. +. Write the IP address or domain name of the Accumulo Master to the +$ACCUMULO_CONF_DIR/masters+ file. +. Write the IP addresses or domain name of the machines that will be TabletServers in +$ACCUMULO_CONF_DIR/tservers+, one per line. Note that if using domain names rather than IP addresses, DNS must be configured properly for all machines participating in the cluster. DNS can be a confusing source @@ -206,7 +222,7 @@ of errors. ==== Accumulo Settings Specify appropriate values for the following settings in -+$ACCUMULO_HOME/conf/accumulo-site.xml+ : ++$ACCUMULO_CONF_DIR/accumulo-site.xml+ : [source,xml] <property> @@ -265,7 +281,7 @@ Accumulo identifies +localhost:8020+ as a different HDFS instance than +127.0.0. ==== Deploy Configuration Copy the masters, tservers, accumulo-env.sh, and if necessary, accumulo-site.xml -from the +$ACCUMULO_HOME/conf/+ directory on the master to all the machines +from the +$ACCUMULO_CONF_DIR/+ directory on the master to all the machines specified in the tservers file. ==== Sensitive Configuration Values @@ -401,7 +417,7 @@ data across the cluster. HDFS is required to be configured and running before Accumulo can be initialized. Once HDFS is started, initialization can be performed by executing -+$ACCUMULO_HOME/bin/accumulo init+ . This script will prompt for a name ++accumulo init+ . This script will prompt for a name for this instance of Accumulo. The instance name is used to identify a set of tables and instance-specific settings. The script will then write some information into HDFS so Accumulo can start properly. @@ -417,7 +433,7 @@ Make sure Hadoop is configured on all of the machines in the cluster, including access to a shared HDFS instance. Make sure HDFS and ZooKeeper are running. Make sure ZooKeeper is configured and running on at least one machine in the cluster. -Start Accumulo using the +bin/start-all.sh+ script. +Start Accumulo using +accumulo-cluster start+. To verify that Accumulo is running, check the Status page as described in <<monitoring>>. In addition, the Shell can provide some information about the status of @@ -425,58 +441,49 @@ tables via reading the metadata tables. ==== Stopping Accumulo -To shutdown cleanly, run +bin/stop-all.sh+ and the master will orchestrate the +To shutdown cleanly, run +accumulo-cluster stop+ and the master will orchestrate the shutdown of all the tablet servers. Shutdown waits for all minor compactions to finish, so it may take some time for particular configurations. -==== Adding a Node +==== Adding a Tablet Server -Update your +$ACCUMULO_HOME/conf/tservers+ (or +$ACCUMULO_CONF_DIR/tservers+) file to account for the addition. +Update your +$ACCUMULO_CONF_DIR/tservers+ file to account for the addition. Next, ssh to each of the hosts you want to add and run: - $ACCUMULO_HOME/bin/start-here.sh + accumulo-service tserver start Make sure the host in question has the new configuration, or else the tablet server won't start; at a minimum this needs to be on the host(s) being added, but in practice it's good to ensure consistent configuration across all nodes. -==== Decomissioning a Node +==== Decomissioning a Tablet Server If you need to take a node out of operation, you can trigger a graceful shutdown of a tablet server. Accumulo will automatically rebalance the tablets across the available tablet servers. - $ACCUMULO_HOME/bin/accumulo admin stop <host(s)> {<host> ...} + accumulo admin stop <host(s)> {<host> ...} Alternatively, you can ssh to each of the hosts you want to remove and run: - $ACCUMULO_HOME/bin/stop-here.sh + accumulo-service tserver stop -Be sure to update your +$ACCUMULO_HOME/conf/tservers+ (or +$ACCUMULO_CONF_DIR/tservers+) file to +Be sure to update your +$ACCUMULO_CONF_DIR/tservers+ file to account for the removal of these hosts. Bear in mind that the monitor will not re-read the tservers file automatically, so it will report the decomissioned servers as down; it's recommended that you restart the monitor so that the node list is up to date. -==== Restarting process on a node - -Occasionally, it might be necessary to restart the processes on a specific node. In addition -to the +start-all.sh+ and +stop-all.sh+ scripts, Accumulo contains scripts to start/stop all processes -on a node and start/stop a given process on a node. - -+start-here.sh+ and +stop-here.sh+ will start/stop all Accumulo processes on the current node. The -necessary processes to start/stop are determined via the "hosts" files (e.g. tservers, masters, etc). -These scripts expect no arguments. - -+start-server.sh+ can also be useful in starting a given process on a host. -The first argument to the process is the hostname of the machine. Use the same host that -you specified in hosts file (if you specified FQDN in the masters file, use the FQDN, not -the shortname). The second argument is the name of the process to start (e.g. master, tserver). - The steps described to decomission a node can also be used (without removal of the host -from the +$ACCUMULO_HOME/conf/tservers+ file) to gracefully stop a node. This will +from the +$ACCUMULO_CONF_DIR/tservers+ file) to gracefully stop a node. This will ensure that the tabletserver is cleanly stopped and recovery will not need to be performed when the tablets are re-hosted. +==== Restarting process on a node + +Occasionally, it might be necessary to restart the processes on a specific node. In addition +to the +accumulo-cluster+ script, Accumulo has a +accumulo-service+ script that +can be use to start/stop processes on a node. + ===== A note on rolling restarts For sufficiently large Accumulo clusters, restarting multiple TabletServers within a short window can place significant @@ -559,9 +566,10 @@ SSL may be enabled for the monitor page by setting the following properties in t monitor.ssl.trustStore monitor.ssl.trustStorePassword -If the Accumulo conf directory has been configured (in particular the +accumulo-env.sh+ file must be set up), the +generate_monitor_certificate.sh+ script in the Accumulo +bin+ directory can be used to create the keystore and truststore files with random passwords. -The script will print out the properties that need to be added to the +accumulo-site.xml+ file. -The stores can also be generated manually with the Java +keytool+ command, whose usage can be seen in the +generate_monitor_certificate.sh+ script. +If the Accumulo conf directory has been configured (in particular the +accumulo-env.sh+ file must be set up), the +gen-monitor-cert.sh+ +script in the Accumulo +lib/scripts+ directory can be used to create the keystore and truststore files with random passwords. The script +will print out the properties that need to be added to the +accumulo-site.xml+ file. The stores can also be generated manually with the +Java +keytool+ command, whose usage can be seen in the +gen-monitor-cert.sh+ script. If desired, the SSL ciphers allowed for connections can be controlled via the following properties in +accumulo-site.xml+: @@ -625,7 +633,7 @@ http://research.google.com/pubs/pub36356.html[Google's Dapper]. ==== Tracers To collect traces, Accumulo needs at least one server listed in - +$ACCUMULO_HOME/conf/tracers+. The server collects traces + +$ACCUMULO_CONF_DIR/tracers+. The server collects traces from clients and writes them to the +trace+ table. The Accumulo user that the tracer connects to Accumulo with can be configured with the following properties @@ -713,11 +721,11 @@ in addition to the Accumulo's default ZooTraceClient, and they serve as a templa for adding any SpanReceiver to Accumulo: 1. Add the Jar containing the ZipkinSpanReceiver class file to the -+$ACCUMULO_HOME/lib/+. It is critical that the Jar is placed in ++lib/+ directory. It is critical that the Jar is placed in +lib/+ and NOT in +lib/ext/+ so that the new SpanReceiver class is visible to the same class loader of htrace-core. -2. Add the following to +$ACCUMULO_HOME/conf/accumulo-site.xml+: +2. Add the following to +$ACCUMULO_CONF_DIR/accumulo-site.xml+: <property> <name>trace.span.receivers</name> @@ -903,13 +911,11 @@ Start time entries take the following form: "start":startTime "id":traceId [] spanBinaryEncoding start:14f3828a351 id:63b318de80de96d1 [] %18;%09;... -The following classes may be run from $ACCUMULO_HOME while Accumulo is running -to provide insight into trace statistics. These require -accumulo-trace-VERSION.jar to be provided on the Accumulo classpath -(+$ACCUMULO_HOME/lib/ext+ is fine). +The following classes may be run while Accumulo is running to provide insight into trace statistics. These require +accumulo-trace-VERSION.jar to be provided on the Accumulo classpath (+lib/ext+ is fine). - $ bin/accumulo org.apache.accumulo.tracer.TraceTableStats -u username -p password -i instancename - $ bin/accumulo org.apache.accumulo.tracer.TraceDump -u username -p password -i instancename -r + $ accumulo org.apache.accumulo.tracer.TraceTableStats -u username -p password -i instancename + $ accumulo org.apache.accumulo.tracer.TraceDump -u username -p password -i instancename -r ==== Tracing from the Shell You can enable tracing for operations run from the shell by using the @@ -987,7 +993,7 @@ throwing an exception. The following steps will allow a non-HA instance to be migrated to an HA instance. Consider an HDFS URL +hdfs://namenode.example.com:8020+ which is going to be moved to +hdfs://nameservice1+. -Before moving HDFS over to the HA namenode, use +$ACCUMULO_HOME/bin/accumulo admin volumes+ to confirm +Before moving HDFS over to the HA namenode, use +accumulo admin volumes+ to confirm that the only volume displayed is the volume from the current namenode's HDFS URL. Listing volumes referenced in zookeeper @@ -1004,7 +1010,7 @@ that the only volume displayed is the volume from the current namenode's HDFS UR After verifying the current volume is correct, shut down the cluster and transition HDFS to the HA nameservice. -Edit +$ACCUMULO_HOME/conf/accumulo-site.xml+ to notify accumulo that a volume is being replaced. First, +Edit +$ACCUMULO_CONF_DIR/accumulo-site.xml+ to notify accumulo that a volume is being replaced. First, add the new nameservice volume to the +instance.volumes+ property. Next, add the +instance.volumes.replacements+ property in the form of +old new+. It's important to not include the volume that's being replaced in +instance.volumes+, otherwise it's possible accumulo could continue @@ -1021,8 +1027,8 @@ to write to the volume. <value>hdfs://namenode.example.com:8020/accumulo hdfs://nameservice1/accumulo</value> </property> -Run +$ACCUMULO_HOME/bin/accumulo init --add-volumes+ and start up the accumulo cluster. Verify that the -new nameservice volume shows up with +$ACCUMULO_HOME/bin/accumulo admin volumes+. +Run +accumulo init --add-volumes+ and start up the accumulo cluster. Verify that the +new nameservice volume shows up with +accumulo admin volumes+. Listing volumes referenced in zookeeper http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/clients.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/clients.txt b/docs/src/main/asciidoc/chapters/clients.txt index d142d66..3ac0d54 100644 --- a/docs/src/main/asciidoc/chapters/clients.txt +++ b/docs/src/main/asciidoc/chapters/clients.txt @@ -32,16 +32,16 @@ classpath. For recent Zookeeper versions, you only need to add the Zookeeper jar what is in the Zookeeper lib directory. You can run the following command on a configured Accumulo system to see what its using for its classpath. - $ACCUMULO_HOME/bin/accumulo classpath + accumulo classpath Another option for running your code is to put a jar file in -+$ACCUMULO_HOME/lib/ext+. After doing this you can use the accumulo ++lib/ext+. After doing this you can use the accumulo script to execute your code. For example if you create a jar containing the class +com.foo.Client+ and placed that in +lib/ext+, then you could use the command -+$ACCUMULO_HOME/bin/accumulo com.foo.Client+ to execute your code. ++accumulo com.foo.Client+ to execute your code. If you are writing map reduce job that access Accumulo, then you can use the -bin/tool.sh script to run those jobs. See the map reduce example. ++libexec/tool.sh+ script to run those jobs. See the map reduce example. === Connecting @@ -293,9 +293,7 @@ the very least, you need to supply the following properties: instance=test zookeepers=localhost:2181 -You can find a sample configuration file in your distribution: - - $ACCUMULO_HOME/proxy/proxy.properties. +You can find a sample configuration file in your distribution at +opt/proxy/proxy.properties+. This sample configuration file further demonstrates an ability to back the proxy server by MockAccumulo or the MiniAccumuloCluster. @@ -306,7 +304,7 @@ After the properties file holding the configuration is created, the proxy server can be started using the following command in the Accumulo distribution (assuming your properties file is named +config.properties+): - $ACCUMULO_HOME/bin/accumulo proxy -p config.properties + accumulo proxy -p config.properties ==== Creating a Proxy Client @@ -315,9 +313,7 @@ for Thrift installed to generate client code in that language. Typically, your o system's package manager will be able to automatically install these for you in an expected location such as +/usr/lib/python/site-packages/thrift+. -You can find the thrift file for generating the client: - - $ACCUMULO_HOME/proxy/proxy.thrift. +You can find the thrift file for generating the client at +opt/proxy/proxy.thrift+. After a client is generated, the port specified in the configuration properties above will be used to connect to the server. http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/development_clients.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/development_clients.txt b/docs/src/main/asciidoc/chapters/development_clients.txt index fe15c7b..83d8f40 100644 --- a/docs/src/main/asciidoc/chapters/development_clients.txt +++ b/docs/src/main/asciidoc/chapters/development_clients.txt @@ -42,7 +42,7 @@ In fact, you can use the +--fake+ option to the Accumulo shell and interact with MockAccumulo: ---- -$ ./bin/accumulo shell --fake -u root -p '' +$ accumulo shell --fake -u root -p '' Shell - Apache Accumulo Interactive Shell - http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/iterator_design.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/iterator_design.txt b/docs/src/main/asciidoc/chapters/iterator_design.txt index b9def10..4beaeb0 100644 --- a/docs/src/main/asciidoc/chapters/iterator_design.txt +++ b/docs/src/main/asciidoc/chapters/iterator_design.txt @@ -37,11 +37,11 @@ pitfalls. To invoke an Accumulo Iterator inside of the TabletServer, the Iterator class must be on the classpath of every TabletServer. For production environments, it is common to place a JAR file which contains the Iterator in -`$ACCUMULO_HOME/lib`. In development environments, it is convenient to instead place the JAR file in -`$ACCUMULO_HOME/lib/ext` as JAR files in this directory are dynamically reloaded by the TabletServers alleviating the -need to restart Accumulo while testing an Iterator. Advanced classloader features which enable other types of -filesystems and per-table classpath configurations (as opposed to process-wide classpaths). These features -are not covered here, but elsewhere in the user manual. +`lib/`. In development environments, it is convenient to instead place the JAR file in `lib/ext/` as JAR files +in this directory are dynamically reloaded by the TabletServers alleviating the need to restart Accumulo while +testing an Iterator. Advanced classloader features which enable other types of filesystems and per-table classpath +configurations (as opposed to process-wide classpaths). These features are not covered here, but elsewhere in the user +manual. Accumulo references the Iterator class by name and uses Java reflection to instantiate the Iterator. This means that Iterators must have a public no-args constructor. http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/kerberos.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/kerberos.txt b/docs/src/main/asciidoc/chapters/kerberos.txt index 43f7c2a..171cb7b 100644 --- a/docs/src/main/asciidoc/chapters/kerberos.txt +++ b/docs/src/main/asciidoc/chapters/kerberos.txt @@ -266,14 +266,14 @@ prompted for a password you can just hit return, since it won't be used. 3. Start the Accumulo cluster ---- -$ ${ACCUMULO_HOME}/bin/stop-all.sh +$ accumulo-cluster stop ... $ ACCUMULO_CONF_DIR=/path/to/server/conf/ accumulo init --reset-security Running against secured HDFS Principal (user) to grant administrative privileges to : acculumo_ad...@example.com Enter initial password for accumulo_ad...@example.com (this may not be applicable for your security setup): Confirm initial password for accumulo_ad...@example.com: -$ ${ACCUMULO_HOME}/bin/start-all.sh +$ accumulo-cluster start ... $ ---- @@ -402,7 +402,7 @@ Valid starting Expires Service principal The second thing clients need to do is to set up their client configuration file. By default, this file is stored in +~/.accumulo/config+, +$ACCUMULO_CONF_DIR/client.conf+ or -+$ACCUMULO_HOME/conf/client.conf+. Accumulo utilities also allow you to provide your own ++$ACCUMULO_CONF_DIR/client.conf+. Accumulo utilities also allow you to provide your own copy of this file in any location using the +--config-file+ command line option. Three items need to be set to enable access to Accumulo: http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/shell.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/shell.txt b/docs/src/main/asciidoc/chapters/shell.txt index a1cdd00..735b1df 100644 --- a/docs/src/main/asciidoc/chapters/shell.txt +++ b/docs/src/main/asciidoc/chapters/shell.txt @@ -20,7 +20,7 @@ configuration settings. The shell can be started by the following command: - $ACCUMULO_HOME/bin/accumulo shell -u [username] + accumulo shell -u [username] The shell will prompt for the corresponding password to the username specified and then display the following prompt: http://git-wip-us.apache.org/repos/asf/accumulo/blob/158cf16d/docs/src/main/asciidoc/chapters/table_configuration.txt ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/chapters/table_configuration.txt b/docs/src/main/asciidoc/chapters/table_configuration.txt index 28075e2..dd167ec 100644 --- a/docs/src/main/asciidoc/chapters/table_configuration.txt +++ b/docs/src/main/asciidoc/chapters/table_configuration.txt @@ -127,9 +127,8 @@ security and column fetching are implemented using Iterators. Some useful Iterators are provided with Accumulo and can be found in the *+org.apache.accumulo.core.iterators.user+* package. In each case, any custom Iterators must be included in Accumulo's classpath, -typically by including a jar in +$ACCUMULO_HOME/lib+ or -+$ACCUMULO_HOME/lib/ext+, although the VFS classloader allows for -classpath manipulation using a variety of schemes including URLs and HDFS URIs. +typically by including a jar in +lib/+ or +lib/ext/+, although the VFS classloader +allows for classpath manipulation using a variety of schemes including URLs and HDFS URIs. ==== Setting Iterators via the Shell