-
Notifications
You must be signed in to change notification settings - Fork 321
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
Conversation
/// </summary> | ||
/// <param name="key">Key to use</param> | ||
/// <param name="defaultValue">Default value to use</param> | ||
public string Get(string key, string defaultValue) => |
There was a problem hiding this comment.
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)
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR will allow retrieving and modifying a SparkSessions configuration without requiring a
stop
and recreation of the SparkSession.