Enable Spark actions
While Spark actions are initially disabled, you have the flexibility to enable them at your discretion if you still want to utilize them.
Enabling Spark actions globally
- Navigate to Oozie's configuration page in Cloudera Manager.
- Search for
Oozie Server Advanced Configuration Snippet (Safety Valve) for oozie-site.xml
. - Add a new property named
oozie.action.spark.enabled
with the valuetrue
. - Save the modifications.
- Allow Cloudera Manager some time to recognize the changes.
- Redeploy Oozie.
Enabling Spark actions per workflows
oozie.action.spark.enabled
property to
true
in the global configuration of the specific workflow. For
example:<workflow-app name="spark_workflow" xmlns="uri:oozie:workflow:1.0">
<global>
<configuration>
<property>
<name>oozie.action.spark.enabled</name>
<value>true</value>
</property>
</configuration>
</global>
<start to="spark_action"/>
<action name="spark_action">
...
By following this approach, if your workflow contains multiple Spark actions, all of them will be enabled and operational.
You can also enable Spark actions for a given workflow by specifying the
oozie.action.spark.enabled
property in your
job.properties
file.
Enabling a given Spark action only
oozie.action.spark.enabled
property in the
configuration of that particular action. For
example:<workflow-app name="spark_workflow" xmlns="uri:oozie:workflow:1.0">
<start to="spark_action"/>
<action name="spark_action">
<spark xmlns="uri:oozie:spark-action:1.0">
<resource-manager>${resourceManager}</resource-manager>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>oozie.action.spark.enabled</name>
<value>true</value>
</property>
</configuration>
...
The order of precedence for the above options is as follows:
-
If you have configured the property at the action level, it takes precedence over all other settings, and the remaining configurations are disregarded.
-
If you have configured the property in the global configuration of the workflow, the value from there is used.
-
If the setting is not available in either of the previous locations, the value configured in your
job.properties
file is used instead. -
Lastly, the global safety-valve setting comes into effect.