-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-3599]Avoid loading properties file frequently #2454
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
[SPARK-3599]Avoid loading properties file frequently #2454
Conversation
|
QA tests have started for PR 2454 at commit
|
|
QA tests have finished for PR 2454 at commit
|
|
LGTM. Could you fix the typo in the PR title (loaing)? |
|
@vanzin Sorry for that. Fixed. |
|
QA tests have started for PR 2454 at commit
|
|
QA tests have started for PR 2454 at commit
|
|
I think it is better using lazy val for readability(putting all elements of defaultSparkProperties into value properties is more comfortable than conversely) and not using clone to avoid shallow copy( I did not do deep research about clone methods in scala and take it same as in Java. Please point it out if not). |
|
QA tests have finished for PR 2454 at commit
|
|
QA tests have finished for PR 2454 at commit
|
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.
it's canonical to not use new here.
i.e.
val properties = HashMap[String, String]()
|
I don't think the overhead of reading the file is significant here, but agree it's nice to avoid extra print statements. Nonetheless think this is fine to have. It's a small enough code segment here. I'll merge it and make the minor style fix suggested here. |
https://issues.apache.org/jira/browse/SPARK-3599