Skip to content

Conversation

@jeff303
Copy link
Contributor

@jeff303 jeff303 commented Sep 12, 2019

Log the full spark-submit command in SparkSubmit#launchApplication

Adding .python-version (pyenv file) to RAT exclusion list

What changes were proposed in this pull request?

Original motivation here, expanded in the Jira.. In essence, we want to be able to log the full spark-submit command being constructed by SparkLauncher

Why are the changes needed?

Currently, it is not possible to directly obtain this information from the SparkLauncher instance, which makes debugging and customer support more difficult.

Does this PR introduce any user-facing change?

No

How was this patch tested?

core sbt tests were executed. The SparkLauncherSuite (where I added assertions to an existing test) was also checked. Within that, testSparkLauncherGetError is failing, but that appears not to have been caused by this change (failing for me even on the parent commit of c18f849).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just reflect this method and call sparkLauncher.createBuilder().command() as described in the mailing list. Not sure how much useful this API is in general yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about simply logging the command from SparkLauncher instead of adding a new public method, then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is it differernt from setting SPARK_PRINT_LAUNCH_COMMAND to 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That prints the command to stderr, which is not always easy to access (depending on the environment, etc.). Using the logging API gives clients more flexibility in controlling where the information appears (they can use the full power of log4j, for example).

@jeff303 jeff303 force-pushed the SPARK-29070 branch 2 times, most recently from 73121ef to 047d74d Compare September 16, 2019 15:21
@jeff303 jeff303 changed the title [SPARK-29070][CORE] Allow SparkLauncher to return full spark-submit c… [SPARK-29070][CORE] Make SparkLauncher log full spark-submit command line Sep 16, 2019
*/
public class SparkLauncher extends AbstractLauncher<SparkLauncher> {

// use JUL logger, relying on jul-to-slf4j bridge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

vote.tmpl
SessionManager.java
SessionHandler.java
.python-version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd to have this here. What is generating this file? It's definitely not being added by this PR. And other builds are not failing. So I think this deserves an explanation...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pyenv metadata file. I was using pyenv to manage Python versions locally for purposes of running the PySpark tests. It doesn't really need a license file since it's just a single line indicating the Python version. Nonetheless, it indeed has nothing to do with this change, so I'll remove it.

@vanzin
Copy link
Contributor

vanzin commented Sep 26, 2019

ok to test

…line

Log the full spark-submit command in SparkSubmit#launchApplication, using a JUL logger
@SparkQA
Copy link

SparkQA commented Sep 26, 2019

Test build #111444 has finished for PR 25777 at commit 0af4f88.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 26, 2019

Test build #111442 has finished for PR 25777 at commit 047d74d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Sep 26, 2019

retest this please

@SparkQA
Copy link

SparkQA commented Sep 27, 2019

Test build #111453 has finished for PR 25777 at commit 0af4f88.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Sep 27, 2019

Merging to master.

@vanzin vanzin closed this in 233c214 Sep 27, 2019
@jeff303 jeff303 deleted the SPARK-29070 branch September 27, 2019 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants