Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section covers the configurations required to use Apache Spark with WSO2 DAS.

...

If you want to add additional jars, you can add them to the SPARK_CLASSPATH in the <DAS_HOME>/bin/external-spark-classpath.conf file in a UNIX environment.

...

PropertyDefault ValueDescription
carbon.spark.masterlocal

The Spark master has three possible states as follows:

  • local: This starts Spark in the local mode. e.g, carbon.spark.master local or carbon.spark.master local[2]
  • client: This mode results in the DAS acting as a client for an external Spark cluster. e.g., carbon.spark.master spark://<host name>:<port>. For more details on setting up WSO2 DAS and Apache Spark in this mode, see Connecting a DAS Instance to an Existing External Apache Spark Cluster.
  • cluster: This mode results in the DAS creating its own Spark cluster using Carbon Clustering. When Spark runs in this mode, it is required to specify a value for the carbon.spark.master.count property. e.g., carbon.spark.master local AND carbon.spark.master.count  <number of redundant masters>
carbon.spark.master.count1

The maximum number of masters allowed at a given time when DAS creates its own Spark cluster.

Info

This property is applicable only when the Spark master runs in the cluster mode.

carbon.das.symbolic.link
Anchor
symbolic link
symbolic link
This links to your DAS home by default.

The symbolic link for the jar files in the Spark class path.

In a clustered DAS deployment, the directory path for the Spark Class path is different for each node depending on the location of the <DAS_HOME>. The symbolic link redirects the Spark Driver Application to the relevant directory for each node when it creates the Spark class path. The symbolic link should be located in the same path for each <DAS_HOME>.

Info
  • The symbolic link is not specified by default. When it is not specified, the jar files are added in the DAS home.
  • In a multi node cluster, DAS servers consume a lot of CPU power and sometimes run out of memory. This is often the result of too many log directories being created in the <DAS_HOME>/work directory due to the symbolic link not being properly set. To address this, it is recommended to update the <DAS_HOME>/bin/wso2server.sh file with the following entry so that the <DAS_HOME> is exported.

    Export CARBON_HOME=<symbolic link>

...