Installation Guide - Spark
Last updated
Last updated
Copyright © 2021 by Symetry, Inc. 14 Pine Street, Ste 6 Morristown, NJ 07960 All Rights Reserved April 15th, 2021
You have a working installation of SymetryML with Jetty. For information about performing this task, refer to the .
Make sure that all the required libraries are in your /opt/symetry/nativelib
folder and that your LD_LIBRARY_PATH
is set correctly. Additionally, if you need graphics processor unit (GPU) support, refer to the and to in this guide.
Working installation of Spark on the same machine where the Jetty Web server is installed. SymetryML is certified to work with Spark 2.4.5 hadoop 2.7,
Spark 2.4.6 hadoop 2.7
, Spark 3.0.1 hadoop 2.7
and Spark 3.0.2 hadoop 3.2
.
GPU Support
Spark Master
24 to 32 cores computer with high-speed Internet connection.
Spark Cluster worker memory
Minimum: 8 GB Recommended: 16 GB Start the number of workers on your node based on the amount of worker memory. For example, on Amazon S3: * c5.8xlarge instance: 8 workers. * c5.4xlarge instance: 4 workers.
File
symetry.tar.gz
Contains files that the SymetryML REST application needs to communicate with a Spark cluster. This archive file should be decompressed in /opt/symetry
Once the symetry.tar.gz
file is decompressed, you should get the following in your /opt/symetry/
folder. The lib
and libExt
contain the files that are needed to communicate with a spark cluster using the various spark driver applications - spark-submit
, spark-shell
, pyspark
or the SML web application inside of Jetty.
SymetryML relies on the existence of symbolic link (/opt/symetry/spark-support/spark2.4.5/lib
) that points to your $SPARK_HOME/jars
folder. Just make sure to create the symbolic link so that it points to the jars folder inside you spark installation:
Example with Spark 2.4.5 using hadoop 2.7:
SymetryML needs additional jars to be able to access files on AmazonS3. These files needs to be put in $SPARK_HOME/jars
folder. Depending on the version of Spark you are using you will need to put different jars file there.
Add the following jars to the $SPARK_HOME/jars
folder. Make sure their version matches the version of hadoop-common-HADOOP_VERSION.jar
in the $SPARK_HOME/jars
folder: e.g. hadoop-common-2.7.4.jar
for instance.
hadoop-aws-2.7.4.jar
hadoop-azure-2.7.4.jar
Add the following jars to the $SPARK_HOME/jars
folder:
aws-java-sdk-1.7.4.jar
jets3t-0.9.4.jar
azure-storage-3.1.0.jar
xbean-asm6-shaded-4.10.jar
: For this one you will need to replace the pre-existing xbean-asm6-shaded-4.8.jar
with xbean-asm6-shaded-4.10.jar
. There is a bug in the xbean-asm6-shaded-4.8.jar
when trying to access S3 files.
Add the following jars to the $SPARK_HOME/jars
folder. Make sure their version matches the version of hadoop-common-HADOOP_VERSION.jar
in the $SPARK_HOME/jars
folder: e.g. hadoop-common-2.7.4.jar
for instance.
hadoop-aws-2.7.4.jar
hadoop-azure-2.7.4.jar
Add the following jars to the $SPARK_HOME/jars
folder:
aws-java-sdk-1.7.4.jar
jets3t-0.9.4.jar
azure-storage-3.1.0.jar
Add the following jars to the $SPARK_HOME/jars
folder. Make sure their version matches the version of hadoop-common-HADOOP_VERSION.jar
in the $SPARK_HOME/jars
folder: e.g. hadoop-common-3.2.0.jar
for instance.
hadoop-aws-3.2.0.jar
hadoop-azure-3.2.0.jar
Add the following jars to the $SPARK_HOME/jars
folder:
aws-java-sdk-bundle-1.11.375.jar
jets3t-0.9.4.jar
azure-storage-8.6.6.jar
For information about configuring your Spark Cluster, refer to your Spark documentation. SymetryML assumes that you have an up and running Spark cluster.
You can use a GPU on each worker node in your Spark cluster. If you do, be sure to install all required NVIDIA GPU drivers on each worker node in your cluster. This process is described in the next section.
Perform the following procedure to configure the nodes that will be running your spark worker for use with the NVIDIA GPU. This applies to linux.
Install CUDA, and then use the nvidia-smi command to verify that CUDA is working.
Be sure that Jetty user LD_LIBRARY_PATH
is set correctly like in the following:
CUDA library
Currently certified on CUDA 10.x
Intel MKL
Working with MKL version 11.0.0 and higher
Question: What does the following error message mean: ERROR 500: INTERNAL_SERVER_ERROR : Cannot assign requested address
.
Answer: Be sure the SymetryML configuration files (/opt/symetry/symetry-rest.txt) has the rtlm.option.spark.listener.host set correctly to your host.
Question: What does the following error message mean: java.lang.OutOfMemoryError: GC overhead limit exceeded
.
Answer: Increase your worker memory using spark configuration parameters.
Question: What does the following error message mean: 15/08/17 17:43:47 ERROR WorkerWatcher: Error was: akka.remote.InvalidAssociation: Invalid address: akka.tcp://sparkWorker@boson.local:49991
Answer: This error is most likely caused by lack of memory so, verify worker logs and increase your worker memory.
Question: I see [java.net.BindException: Address already in use
message in my log.
Answer: You can usually ignore this message.
Currently certified on CUDA 10.x with NVIDIA GPU with Compute Capability >= 3.5. Consult the for more information.
Download Cuda 10.x from
Make sure that your Spark Worker /opt/symetry/nativelib
contains the same .so
as your SymetryML host server. Please consult the for more information