Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Sep 18, 2024

What changes were proposed in this pull request?

This PR aims to add a symbolic link file, spark-examples.jar, in the example jar directory.

Apache Spark repository is updated already via

$ docker run -it --rm spark:latest ls -al /opt/spark/examples/jars | tail -n6 total 1620 drwxr-xr-x 1 root root 4096 Oct 11 04:37 . drwxr-xr-x 1 root root 4096 Sep 9 02:08 .. -rw-r--r-- 1 root root 78803 Sep 9 02:08 scopt_2.12-3.7.1.jar -rw-r--r-- 1 root root 1564255 Sep 9 02:08 spark-examples_2.12-3.5.0.jar lrwxrwxrwx 1 root root 29 Oct 11 04:37 spark-examples.jar -> spark-examples_2.12-3.5.0.jar 

Why are the changes needed?

Like PySpark example (pi.py), we can submit the examples without considering the version numbers which was painful before.

bin/spark-submit \ --master k8s://$K8S_MASTER \ --deploy-mode cluster \ ... --class org.apache.spark.examples.SparkPi \ local:///opt/spark/examples/jars/spark-examples.jar 10000 

The following is the driver pod log.

+ exec /usr/bin/tini -s -- /opt/spark/bin/spark-submit ... --deploy-mode client --properties-file /opt/spark/conf/spark.properties --class org.apache.spark.examples.SparkPi local:///opt/spark/examples/jars/spark-examples.jar 10000 Files local:///opt/spark/examples/jars/spark-examples.jar from /opt/spark/examples/jars/spark-examples.jar to /opt/spark/work-dir/./spark-examples.jar 

Does this PR introduce any user-facing change?

No, this is an additional file.

How was this patch tested?

Manually build the docker image and do ls.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member Author

Could you review this PR, @viirya ?

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya ! Merged to master.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-45497 branch September 18, 2024 23:09
@dongjoon-hyun
Copy link
Member Author

For the record, the fixed images are released.

$ docker run -it --rm apache/spark:4.0.0-preview1 ls -al /opt/spark/examples/jars/ total 2636 drwxr-xr-x 2 spark spark 4096 Sep 18 23:19 . drwxr-xr-x 1 spark spark 4096 May 28 16:39 .. -rw-r--r-- 1 spark spark 232248 May 28 16:39 jackson-core-asl-1.9.13.jar -rw-r--r-- 1 spark spark 780664 May 28 16:39 jackson-mapper-asl-1.9.13.jar -rw-r--r-- 1 spark spark 80424 May 28 16:39 scopt_2.13-3.7.1.jar -rw-r--r-- 1 spark spark 1591049 May 28 16:39 spark-examples_2.13-4.0.0-preview1.jar lrwxrwxrwx 1 root root 38 Sep 18 23:19 spark-examples.jar -> spark-examples_2.13-4.0.0-preview1.jar 
dongjoon-hyun added a commit to apache/spark-kubernetes-operator that referenced this pull request Sep 19, 2024
### What changes were proposed in this pull request? This PR aims to propose to use `apache/spark` images instead of `spark` because `apache/spark` images are published first. For example, the following are only available in `apache/spark` as of now. - apache/spark-docker#66 - apache/spark-docker#67 - apache/spark-docker#68 ### Why are the changes needed? To apply the latest bits earlier. ### Does this PR introduce _any_ user-facing change? There is no change from `Apache Spark K8s Operator`. Only the underlying images are changed. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #128 from dongjoon-hyun/SPARK-49706. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants