dongjoon-hyun commented on code in PR #43324:
URL: https://github.com/apache/spark/pull/43324#discussion_r1354244110


##########
resource-managers/kubernetes/docker/src/main/dockerfiles/spark/Dockerfile:
##########
@@ -49,6 +49,7 @@ COPY sbin /opt/spark/sbin
 COPY kubernetes/dockerfiles/spark/entrypoint.sh /opt/
 COPY kubernetes/dockerfiles/spark/decom.sh /opt/
 COPY examples /opt/spark/examples
+RUN ln -s $(basename $(ls /opt/spark/examples/jars/spark-examples_*.jar)) 
/opt/spark/examples/jars/spark-examples.jar

Review Comment:
   😄 I understand why you are confused. `ln` command does need to switch 
directory. You can do that in your mac.
   ```
   $ ls examples/jars
   scopt_2.12-3.7.1.jar          spark-examples_2.12-3.5.0.jar
   
   $ ln -s spark-examples_2.12-3.5.0.jar examples/jars/spark-examples.jar
   
   $ ls -al examples/jars
   total 3216
   drwxr-xr-x  5 dongjoon  staff      160 Oct 10 23:41 .
   drwxr-xr-x  4 dongjoon  staff      128 Sep  8 19:08 ..
   -rw-r--r--  1 dongjoon  staff    78803 Sep  8 19:08 scopt_2.12-3.7.1.jar
   lrwxr-xr-x  1 dongjoon  staff       29 Oct 10 23:41 spark-examples.jar -> 
spark-examples_2.12-3.5.0.jar
   -rw-r--r--  1 dongjoon  staff  1564255 Sep  8 19:08 
spark-examples_2.12-3.5.0.jar
   ```
   
   BTW, this is tested in the cluster already, @viirya ~



##########
resource-managers/kubernetes/docker/src/main/dockerfiles/spark/Dockerfile:
##########
@@ -49,6 +49,7 @@ COPY sbin /opt/spark/sbin
 COPY kubernetes/dockerfiles/spark/entrypoint.sh /opt/
 COPY kubernetes/dockerfiles/spark/decom.sh /opt/
 COPY examples /opt/spark/examples
+RUN ln -s $(basename $(ls /opt/spark/examples/jars/spark-examples_*.jar)) 
/opt/spark/examples/jars/spark-examples.jar

Review Comment:
   😄 I understand why you are confused. `ln` command doesn't need to switch 
directory. You can do that in your mac.
   ```
   $ ls examples/jars
   scopt_2.12-3.7.1.jar          spark-examples_2.12-3.5.0.jar
   
   $ ln -s spark-examples_2.12-3.5.0.jar examples/jars/spark-examples.jar
   
   $ ls -al examples/jars
   total 3216
   drwxr-xr-x  5 dongjoon  staff      160 Oct 10 23:41 .
   drwxr-xr-x  4 dongjoon  staff      128 Sep  8 19:08 ..
   -rw-r--r--  1 dongjoon  staff    78803 Sep  8 19:08 scopt_2.12-3.7.1.jar
   lrwxr-xr-x  1 dongjoon  staff       29 Oct 10 23:41 spark-examples.jar -> 
spark-examples_2.12-3.5.0.jar
   -rw-r--r--  1 dongjoon  staff  1564255 Sep  8 19:08 
spark-examples_2.12-3.5.0.jar
   ```
   
   BTW, this is tested in the cluster already, @viirya ~



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to