Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML-264] enable yarn ci #294

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
run: |
${{github.workspace}}/dev/ci/ci-local-test.sh
yarn-test:
if: ${{ false }} # disable for now
name: Yarn Test for Examples (CPU)
runs-on: ubuntu-20.04
steps:
Expand Down
4 changes: 2 additions & 2 deletions dev/ci/ci-yarn-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ echo "========================================="
echo "Cluster Testing with Spark Version: $SPARK_VERSION"
echo "========================================="

# Build and run all examples
# Build and run all examplesdebug#./build-all-scala.sh
./build-all-scala.sh
./run-all-scala.sh
./run-all-pyspark.sh
#./run-all-pyspark.sh
1 change: 1 addition & 0 deletions dev/install-build-deps-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if [ ! -d /opt/intel/oneapi ]; then
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo -E apt-cache pkgnames intel | grep intel-oneapi-runtime
sudo apt-get install -y intel-oneapi-ccl-devel-2021.8.0 \
intel-oneapi-tbb-common-devel-2021.8.0 intel-oneapi-tbb-devel-2021.8.0 \
intel-oneapi-mpi-devel-2021.8.0 \
Expand Down
4 changes: 2 additions & 2 deletions dev/test-cluster/yarn/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ else
fi

# Set Spark resources, can be overwritten in example
SPARK_DRIVER_MEMORY=1G
SPARK_DRIVER_MEMORY=512M
SPARK_NUM_EXECUTORS=2
SPARK_EXECUTOR_CORES=1
SPARK_EXECUTOR_MEMORY=1G
SPARK_EXECUTOR_MEMORY=512M
SPARK_TOTAL_CORES=$((SPARK_NUM_EXECUTORS * SPARK_EXECUTOR_CORES))
SPARK_DEFAULT_PARALLELISM=$((SPARK_TOTAL_CORES * 2))

Expand Down
2 changes: 2 additions & 0 deletions dev/test-cluster/yarn/hadoop-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ export HADOOP_SECURE_DN_PID_DIR=${HADOOP_PID_DIR}

# A string representing this instance of hadoop. $USER by default.
export HADOOP_IDENT_STRING=$USER
source /opt/intel/oneapi/setvars.sh --ccl-configuration=cpu
export FI_TCP_IFACE=eth0
1 change: 1 addition & 0 deletions dev/test-cluster/yarn/load-spark-envs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ export PYTHONPATH=$SPARK_HOME/python:$PYTHONPATH
export PYSPARK_PYTHON=python3

export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PATH
export FI_TCP_IFACE=eth0

set +x
11 changes: 11 additions & 0 deletions dev/test-cluster/yarn/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cp ./yarn-site.xml ~/opt/hadoop-$HADOOP_VERSION/etc/hadoop/
cp ./hadoop-env.sh ~/opt/hadoop-$HADOOP_VERSION/etc/hadoop/
cp ../log4j.properties ~/opt/spark-$SPARK_VERSION-bin-$SPARK_HADOOP_VERSION/conf
cp ./spark-defaults.conf ~/opt/spark-$SPARK_VERSION-bin-$SPARK_HADOOP_VERSION/conf
cp ~/opt/spark-$SPARK_VERSION-bin-$SPARK_HADOOP_VERSION/yarn/spark-*-yarn-shuffle.jar ~/opt/hadoop-$HADOOP_VERSION/share/hadoop/yarn/lib/

echo $HOST_IP > $HADOOP_HOME/etc/hadoop/slaves
echo $HOST_IP > $SPARK_HOME/conf/slaves
Expand All @@ -53,10 +54,20 @@ mkdir -p /tmp/run/hdfs/datanode
# hdfs format
$HADOOP_HOME/bin/hdfs namenode -format

wget -P $HADOOP_HOME/share/hadoop/yarn/lib/ https://repo1.maven.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.jar

# start hdfs and yarn
$HADOOP_HOME/sbin/start-dfs.sh
$HADOOP_HOME/sbin/start-yarn.sh

jps
free -g
df -h
yarn application -list
ls -ls $HADOOP_HOME/logs/
cat $HADOOP_HOME/logs/hadoop-*-resourcemanager-*.log
cat $HADOOP_HOME/logs/hadoop-*-nodemanager-*.log

hadoop fs -ls /
yarn node -list

7 changes: 0 additions & 7 deletions dev/test-cluster/yarn/spark-defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,3 @@
# spark.serializer org.apache.spark.serializer.KryoSerializer
# spark.driver.memory 5g
# spark.executor.extraJavaOptions -XX:+PrintGCDetails -Dkey=value -Dnumbers="one two three"

spark.master yarn
spark.serializer org.apache.spark.serializer.KryoSerializer
spark.driver.memory 1g
spark.executor.num 2
spark.executor.cores 1
spark.executor.memory 2g
17 changes: 12 additions & 5 deletions dev/test-cluster/yarn/yarn-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>7168</value>
<value>3072</value>
</property>
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
Expand All @@ -43,17 +43,21 @@
<name>yarn.nodemanager.vmem-check-enabled</name>
<value>false</value>
</property>
<property>
<name>yarn.nodemanager.pmem-check-enabled</name>
<value>false</value>
</property>
<property>
<name>yarn.nodemanager.vmem-pmem-ratio</name>
<value>2</value>
<value>1</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>1024</value>
<value>256</value>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>7168</value>
<value>3072</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-vcores</name>
Expand All @@ -63,5 +67,8 @@
<name>yarn.scheduler.maximum-allocation-vcores</name>
<value>2</value>
</property>

<property>
<name>yarn.nodemanager.env-whitelist</name>
<value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,HADOOP_YARN_HOME,LD_LIBRARY_PATH,FI_TCP_IFACE,CMPLR_ROOT,DAALROOT,CCL_ROOT</value>
</property>
</configuration>
2 changes: 1 addition & 1 deletion examples/build-all-scala.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

exampleDirs=(kmeans pca als naive-bayes linear-regression correlation summarizer)
exampleDirs=(kmeans)

for dir in ${exampleDirs[*]}
do
Expand Down
2 changes: 1 addition & 1 deletion examples/run-all-scala.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

exampleDirs=(kmeans pca als naive-bayes linear-regression correlation summarizer)
exampleDirs=(kmeans)

for dir in ${exampleDirs[*]}
do
Expand Down