Skip to content

Commit

Permalink
[Addon kubevela#603] Add Apache Spark as a experimental addon
Browse files Browse the repository at this point in the history
Signed-off-by: yanghua <[email protected]>
  • Loading branch information
yanghua committed Feb 8, 2023
1 parent 96a5260 commit 56c632e
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion experimental/addons/spark-kubernetes-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,62 @@ vela addon status spark-kubernetes-operator
vela ls -A | grep spark
```

* Secondly, show the component type `spark-cluster`, so we know how to use it in one application
* Secondly, show the component type `spark-cluster`, so we know how to use it in one application. As a spark user, you can choose the parameter to set for your spark cluster.

```
vela show spark-cluster
# Specification
+---------------------+-------------+--------+----------+---------+
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
+---------------------+-------------+--------+----------+---------+
| name | | string | true | |
| namespace | | string | true | |
| type | | string | true | |
| mode | | string | true | |
| image | | string | true | |
| imagePullPolicy | | string | true | |
| mainClass | | string | true | |
| mainApplicationFile | | string | true | |
| sparkVersion | | string | true | |
| driverCores | | int | true | |
| executorCores | | int | true | |
+---------------------+-------------+--------+----------+---------+
```

# Example for how to run a component typed spark-cluster in application

1. Firstly, create a new namespace:

```
kubectl create ns spark-cluster
```

2. Secondly, copy the following example to "spark-app-v1.yaml":

```
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: spark-app-v1
namespace: vela-system
spec:
components:
- name: my-spark-component
type: spark-cluster
properties:
name: my-spark-cluster
namespace: spark-cluster
type: Scala
mode: cluster
image: "gcr.io/spark-operator/spark:v3.1.1"
imagePullPolicy: Always
mainClass: org.apache.spark.examples.streaming.JavaQueueStream
mainApplicationFile: "local:///opt/spark/examples/jars/spark-examples_2.12-3.1.1.jar"
sparkVersion: "3.1.1"
driverCores: 1
executorCores: 1
```



0 comments on commit 56c632e

Please sign in to comment.