forked from Marcel-Jan/docker-hadoop-spark
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ManduTheCat
committed
Apr 14, 2023
1 parent
a1977d5
commit b34b83d
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
#!/bin/bash | ||
|
||
datadir=`echo $HDFS_CONF_dfs_datanode_data_dir | perl -pe 's#file://##'` | ||
if [ ! -d $datadir ]; then | ||
echo "Datanode data directory not found: $datadir" | ||
exit 2 | ||
fi | ||
. "/spark/sbin/spark-config.sh" | ||
|
||
$HADOOP_HOME/bin/hdfs --config $HADOOP_CONF_DIR datanode | ||
. "/spark/bin/load-spark-env.sh" | ||
|
||
mkdir -p $SPARK_WORKER_LOG | ||
|
||
export SPARK_HOME=/spark | ||
|
||
ln -sf /dev/stdout $SPARK_WORKER_LOG/spark-worker.out | ||
|
||
/spark/sbin/../bin/spark-class org.apache.spark.deploy.worker.Worker \ | ||
--webui-port $SPARK_WORKER_WEBUI_PORT $SPARK_MASTER >> $SPARK_WORKER_LOG/spark-worker.out | ||
|
||
# Keep the container running | ||
tail -f /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters