You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/16 03:04:00 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #29653: [SPARK-32804][Launcher] Fix run-example command builder bug

HyukjinKwon commented on a change in pull request #29653:
URL: https://github.com/apache/spark/pull/29653#discussion_r489133236



##########
File path: launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java
##########
@@ -401,6 +403,15 @@ private boolean isThriftServer(String mainClass) {
       mainClass.equals("org.apache.spark.sql.hive.thriftserver.HiveThriftServer2"));
   }
 
+  private String findExamplesAppJar() {
+    for (String exampleJar : findExamplesJars()) {
+      if (new File(exampleJar).getName().startsWith("spark-examples")) {
+        return exampleJar;
+      }
+    }
+    throw new IllegalStateException("Failed to find examples' main app jar.");

Review comment:
       @koertkuipers I think you can fix it like:
   
   ```scala
   if (isTesting) {
     SparkLauncher.NO_RESOURCE
   } else {
     throw new IllegalStateException("Failed to find examples' main app jar.");
   }
   ```
   
   Are you interested in fixing it as a followup pr via testing as you did?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org