This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git
The following commit(s) were added to refs/heads/main by this push: new 0eb494a Wait for the NameNode to leave safemode before init'ing Accumulo (#200) 0eb494a is described below commit 0eb494a3cf30e17bed93f85e08c731b70bd1b449 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Mon Apr 4 11:54:24 2022 -0400 Wait for the NameNode to leave safemode before init'ing Accumulo (#200) Co-authored-by: Brian Loss <brianl...@gmail.com> Co-authored-by: Christopher Tubbs <ctubb...@apache.org> --- .../modules/config-files/templates/initialize_hadoop.sh.tftpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/terraform-testing-infrastructure/modules/config-files/templates/initialize_hadoop.sh.tftpl b/contrib/terraform-testing-infrastructure/modules/config-files/templates/initialize_hadoop.sh.tftpl index 1d97aa7..cf156fe 100644 --- a/contrib/terraform-testing-infrastructure/modules/config-files/templates/initialize_hadoop.sh.tftpl +++ b/contrib/terraform-testing-infrastructure/modules/config-files/templates/initialize_hadoop.sh.tftpl @@ -28,9 +28,16 @@ pdsh -S -g worker sudo systemctl enable hadoop-datanode yarn-nodemanager # 3. Start the namenode # 4. Start the resource manager # 5. Start datanodes and nodemanagers on the worker nodes +# 6. Wait for the namenode to leave safemode # sudo systemctl start zookeeper hdfs namenode -format sudo systemctl start hadoop-namenode sudo systemctl start yarn-resourcemanager pdsh -S -g worker 'sudo systemctl start hadoop-datanode yarn-nodemanager' + +echo "Waiting for NameNode to leave safemode..." +while [[ ! $(hdfs dfsadmin -safemode wait 2>/dev/null) =~ OFF ]]; do + sleep 5 + echo "Waiting for NameNode to leave safemode..." +done