Running Spark Applications in Namespaces
Describes how namespaces work with regard to Spark applications in HPE Ezmeral Unified Analytics Software.
Information in this topic relates to Spark applications that use the HPE-curated Spark images or Spark OSS images with the security context set in the Spark application YAML, as described in Setting Security Context for Spark OSS Images.
HPE Ezmeral Unified Analytics Software users (admins and members) can submit Spark applications through the following clients and interfaces:
- HPE Ezmeral Unified Analytics Software UI
- APIs/CLI (kubectl)
- Notebooks
- Airflow DAGs
By default, when a user submits a Spark application, the Spark application runs in the
user's designated namespace, isolating the user's work and resource use from other users in
the HPE Ezmeral Unified Analytics Software cluster.
For example, if user01
is signed into HPE Ezmeral Unified Analytics Software and submits a Spark application, the Spark
application automatically runs in the user01
namespace. Only
user01
can access the Spark application and Spark application details in
the Spark History Server UI.
spark
namespace. When a user changes the namespace to spark
in the Spark
application YAML, the Spark application runs in the spark
namespace and all
users (admins and members) can access the Spark application through the HPE Ezmeral Unified Analytics Software UI. However, only the
user that submitted the Spark application can access the application details in the Spark History Server UI. spark
namespace. You can
only run Spark applications in the spark
namespace through kubectl,
notebooks, and Airflow DAGs.Client/Interface | Description |
---|---|
HPE Ezmeral Unified Analytics Software UI |
|
API/CLI (kubectl) |
|
Notebook |
|
Airflow DAG |
|
Spark History Server
In an HPE Ezmeral Unified Analytics Software
cluster, one Spark History Server runs in the spark
namespace. Users can go
to the Spark History Server UI to view a list of all Spark applications that have run.
However, users can only view the details of Spark applications that they submit, regardless
of the namespace they use (their own namespace or the spark
namespace).
If a user submits a Spark application in the spark
namespace, only that
user can view the application details in the Spark History Server UI. For example, if
user01
submits a spark application in the spark
namespace, user02
cannot access the Spark application details in the Spark
History Server UI. Only user01
can view the Spark application details.
The system returns an unauthorized message when users try to view application details for Spark applications that were submitted by other users.
Setting Security Context for Spark OSS Images
The Spark OSS images do not contain the security context required to run Spark applications against volumes in HPE Ezmeral Unified Analytics Software. HPE Ezmeral Unified Analytics Software denies user access to the volume if it cannot authenticate the user, which results in Spark application failures.
To add security context to your Spark application, add the following configuration setting in the Spark application YAML:sparkConf:
spark.hpe.webhook.security.context.autoconfigure: "true"
This security context flag sets the pod security context and enables HPE Ezmeral Unified Analytics Software to recognize you as a valid HPE Ezmeral Unified Analytics Software user when you run your Spark applications.
spark
, the
Spark application runs in the spark
namespace. For additional information, see User Isolation and Setting the User Context.