fluo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on issue #185: Calling uno within a script fails
Date Fri, 20 Jul 2018 04:06:52 GMT
keith-turner commented on issue #185: Calling uno within a script fails
URL: https://github.com/apache/fluo-uno/issues/185#issuecomment-406483392
   > I'm inclined to call this a bug in the caller.
   I am not sure if that while pattern is buggy because I am not too familiar with bash. 
However it was the first thing I found with a google search on stackoverflow.   Writing to
stdin seems a bit buggy to me.  Debugging this was very painful because for some reason when
this failed the logs were empty.  It was not until I removed the redirection from the scripts
that I saw the error messages.  It took me a while to narrow the failure down to the point
of knowing I needed to remove that redirection.
   Would it be possible to attempt the write to stdin and if it fails just not print anything?
   I experimented with the following changes.  For some reason the message about setting up
Accumulo showed up but not the ones about Hadoop and ZK.  Even if this worked, not sure that
taking over a random file descriptor is good.
   diff --git a/bin/impl/setup-accumulo.sh b/bin/impl/setup-accumulo.sh
   index ec179ad..f239df1 100755
   --- a/bin/impl/setup-accumulo.sh
   +++ b/bin/impl/setup-accumulo.sh
   @@ -30,7 +30,7 @@ pkill -f accumulo.start
    # stop if any command fails
    set -e
   -echo >&0 "Setting up Apache Accumulo at $ACCUMULO_HOME"
   +echo >&5 "Setting up Apache Accumulo at $ACCUMULO_HOME"
    rm -rf "$INSTALL"/accumulo-*
    rm -f "$ACCUMULO_LOG_DIR"/*
   diff --git a/bin/impl/setup-hadoop.sh b/bin/impl/setup-hadoop.sh
   index d8a81ff..720ff77 100755
   --- a/bin/impl/setup-hadoop.sh
   +++ b/bin/impl/setup-hadoop.sh
   @@ -24,7 +24,7 @@ pkill -f hadoop.yarn
    # stop if any command fails
    set -e
   -echo >&0 "Setting up Apache Hadoop at $HADOOP_PREFIX"
   +echo >&5 "Setting up Apache Hadoop at $HADOOP_PREFIX"
    rm -rf "$INSTALL"/hadoop-*
    rm -f "$HADOOP_LOG_DIR"/*
   diff --git a/bin/impl/setup-zookeeper.sh b/bin/impl/setup-zookeeper.sh
   index 9a6ef37..0814b83 100755
   --- a/bin/impl/setup-zookeeper.sh
   +++ b/bin/impl/setup-zookeeper.sh
   @@ -23,7 +23,7 @@ pkill -f QuorumPeerMain
    # stop if any command fails
    set -e
   -echo >&0 "Setting up Apache ZooKeeper at $ZOOKEEPER_HOME"
   +echo >&5 "Setting up Apache ZooKeeper at $ZOOKEEPER_HOME"
    rm -rf "$INSTALL"/zookeeper-*
    rm -f "$ZOO_LOG_DIR"/*
    mkdir -p "$ZOO_LOG_DIR"
   diff --git a/bin/impl/util.sh b/bin/impl/util.sh
   index ac1a4fa..df1735b 100755
   --- a/bin/impl/util.sh
   +++ b/bin/impl/util.sh
   @@ -57,5 +57,5 @@ function run_setup_script() {
      local L_DIR; L_DIR="$LOGS_DIR/setup"
      mkdir -p "$L_DIR"
   -  "$UNO_HOME/bin/impl/setup-$SCRIP.sh" "$@" 1>"$L_DIR/$SCRIP.stdout" 2>"$L_DIR/$SCRIP.stderr"
   +  "$UNO_HOME/bin/impl/setup-$SCRIP.sh" "$@" 5>&1 1>"$L_DIR/$SCRIP.stdout" 2>"$L_DIR/$SCRIP.stderr"

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message