Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SparkSession.conf #184

Merged
merged 5 commits into from
Jul 24, 2019
Merged

Conversation

suhsteve
Copy link
Member

This PR will allow retrieving and modifying a SparkSessions configuration without requiring a stop and recreation of the SparkSession.

@rapoth rapoth requested a review from imback82 July 24, 2019 15:23
@suhsteve
Copy link
Member Author

#156

/// </summary>
/// <param name="key">Key to use</param>
/// <param name="defaultValue">Default value to use</param>
public string Get(string key, string defaultValue) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also expose public string Get(string key).

Copy link
Member Author

@suhsteve suhsteve Jul 24, 2019

Choose a reason for hiding this comment

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

I was considering this, but spark will throw a java.util.NoSuchElementException if the key does not exist. This exact exception doesn't seem like it'll be propagated back through the _jvmObject.Invoke call. I assume this was also why SparkConf.cs didn't implement this method.

Copy link
Contributor

Choose a reason for hiding this comment

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

We have many APIs where exceptions are thrown on the JVM side. I also, check the PySpark and they expose this function as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

Copy link
Contributor

@imback82 imback82 left a comment

Choose a reason for hiding this comment

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

LGTM

@imback82 imback82 merged commit 0fcedf2 into dotnet:master Jul 24, 2019
@suhsteve suhsteve deleted the stsuh/ssconfig branch October 18, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants