[SPARK-3599]Avoid loading properties file frequently#2454
[SPARK-3599]Avoid loading properties file frequently#2454WangTaoTheTonic wants to merge 3 commits intoapache:masterfrom
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.
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