mirror of https://github.com/apache/druid.git
Fix hadoop docker copy script (#10671)
This commit is contained in:
parent
ac1882bf74
commit
7a8e9bb156
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue