This is an automated email from the ASF dual-hosted git repository. jihoonson pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push: new 7a8e9bb Fix hadoop docker copy script (#10671) 7a8e9bb is described below commit 7a8e9bb156249ca042da7ed8ccb473cc7594afde Author: Abhishek Agarwal <1477457+abhishekagarwa...@users.noreply.github.com> AuthorDate: Tue Dec 15 12:38:50 2020 +0530 Fix hadoop docker copy script (#10671) --- integration-tests/script/copy_hadoop_resources.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/integration-tests/script/copy_hadoop_resources.sh b/integration-tests/script/copy_hadoop_resources.sh index 5f4c17e..ae378cf 100755 --- a/integration-tests/script/copy_hadoop_resources.sh +++ b/integration-tests/script/copy_hadoop_resources.sh @@ -14,17 +14,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -e # wait for hadoop namenode to be up echo "Waiting for hadoop namenode to be up" +MAX_ITERATIONS=15 +i=1 docker exec -t druid-it-hadoop sh -c "./usr/local/hadoop/bin/hdfs dfs -mkdir -p /druid" -while [ $? -ne 0 ] +while [ $? -ne 0 ] && [ $i -lt $MAX_ITERATIONS ] do sleep 2 + i=$((i+1)) docker exec -t druid-it-hadoop sh -c "./usr/local/hadoop/bin/hdfs dfs -mkdir -p /druid" done -echo "Finished waiting for Hadoop namenode" + +if [ $i -lt $MAX_ITERATIONS ]; then + echo "Hadoop namenode is up after $i iterations" +else + echo "Exhausted all runs while waiting for namenode to be up. Exiting" + exit 1 +fi + +set -e # Setup hadoop druid dirs echo "Setting up druid hadoop dirs" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org