accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <>
Subject [GitHub] accumulo pull request: ACCUMULO-4162 Fix zookeeper version matchin...
Date Mon, 21 Mar 2016 17:32:57 GMT
Github user ctubbsii commented on a diff in the pull request:
    --- Diff: assemble/bin/ ---
    @@ -28,50 +28,52 @@ bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
     . "$bin"/
     unset DISPLAY
    -if [ ! -f $ACCUMULO_CONF_DIR/ ] ; then
    +if [[ ! -f $ACCUMULO_CONF_DIR/ ]] ; then
        echo "${ACCUMULO_CONF_DIR}/ does not exist. Please make sure you configure
Accumulo before you run anything"
        echo "We provide examples you can copy in ${ACCUMULO_HOME}/conf/examples/ which are
set up for your memory footprint"
        exit 1
    -if [ -z "$ZOOKEEPER_HOME" ] ; then
    +if [[ -z "$ZOOKEEPER_HOME" ]] ; then
        echo "ZOOKEEPER_HOME is not set.  Please make sure it's set globally or in conf/"
        exit 1
    -if [ ! -d $ZOOKEEPER_HOME ]; then
    +if [[ ! -d $ZOOKEEPER_HOME ]]; then
        echo "ZOOKEEPER_HOME is not a directory: $ZOOKEEPER_HOME"
        echo "Please check the setting, either globally or in"
        exit 1
    -ZOOKEEPER_VERSION=$(find -L $ZOOKEEPER_HOME -maxdepth 1 -name "zookeeper-[0-9]*.jar"
| head -1)
    -if [ -z "$ZOOKEEPER_VERSION" ]; then
    +ZOOKEEPER_VERSION=$(find -L "$ZOOKEEPER_HOME" -maxdepth 1 -name "zookeeper-[0-9]*.jar"
| head -1)
    +if [[ -z "$ZOOKEEPER_VERSION" ]]; then
        echo "A Zookeeper JAR was not found in $ZOOKEEPER_HOME."
        echo "Please check ZOOKEEPER_HOME, either globally or in"
        exit 1
    +ZOOKEEPER_VERSION=$(basename "${ZOOKEEPER_VERSION##*-}" .jar)
    -if [ "$ZOOKEEPER_VERSION" '<' "3.3.0" ]; then
    +if [[ "$ZOOKEEPER_VERSION" < "3.3.0" ]]; then
        echo "WARN : Using Zookeeper $ZOOKEEPER_VERSION.  Use version 3.3.0 or greater to
avoid zookeeper deadlock bug.";
    -${bin}/ $MONITOR monitor 
    +"${bin}/" "$MONITOR" monitor
    -if [ "$1" != "--notSlaves" ]; then
    -   ${bin}/
    +if [[ "$1" != "--notSlaves" ]]; then
    +   "${bin}/"
    -${bin}/accumulo org.apache.accumulo.master.state.SetGoalState NORMAL
    -for master in `egrep -v '(^#|^\s*$)' "$ACCUMULO_CONF_DIR/masters"`; do
    -   ${bin}/ $master master
    +"${bin}/accumulo" org.apache.accumulo.master.state.SetGoalState NORMAL
    -for gc in `egrep -v '(^#|^\s*$)' "$ACCUMULO_CONF_DIR/gc"`; do
    -   ${bin}/ $gc gc "garbage collector"
    +startServersFromHostsFile() {
    +  # use hostfile in conf dir to get hosts, and start each server with the remaining args
    +  local hostfile; hostfile="$1"
    +  shift
    +  local otherArgs; otherArgs=("$@")
    +  while IFS=$' \t\n' read -r host; do
    --- End diff --
    Yes. This is the default behavior of IFS, but I wanted to be explicit, and didn't want
to have user's exported IFS interfere.

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 or file a JIRA ticket
with INFRA.

View raw message