Uh oh!
There was an error while loading. Please reload this page.
[SPARK-25408] Move to more ideomatic Java8 - #22637
Conversation
HyukjinKwon
commented
Oct 5, 2018
ok to test |
1 similar comment
cloud-fan
commented
Oct 5, 2018
ok to test |
HyukjinKwon
commented
Oct 5, 2018
mind filling PR description please? |
There was a problem hiding this comment.
Nit: move this onto the previous line
There was a problem hiding this comment.
I wouldn't bother with this. This is a copy of some Hive code anyway
srowen
commented
Oct 5, 2018
Jenkins test this please |
SparkQA
commented
Oct 5, 2018
Test build #96969 has finished for PR 22637 at commit
|
SparkQA
commented
Oct 5, 2018
Test build #96970 has finished for PR 22637 at commit
|
Fokko
commented
Oct 5, 2018
Valid points. Personally I'm a fan of explicit final, instead of implicit. But that's a matter of taste :-) |
SparkQA
commented
Oct 5, 2018
Test build #96972 has finished for PR 22637 at commit
|
SparkQA
commented
Oct 5, 2018
Test build #96974 has finished for PR 22637 at commit
|
SparkQA
commented
Oct 5, 2018
Test build #96967 has finished for PR 22637 at commit
|
SparkQA
commented
Oct 5, 2018
Test build #96975 has finished for PR 22637 at commit
|
cloud-fan
commented
Oct 5, 2018
retest this please |
SparkQA
commented
Oct 5, 2018
Test build #96979 has finished for PR 22637 at commit
|
There was a problem hiding this comment.
Indentation? It seems to follow 4-space indentation for Java style, but it seems to be too outstanding in this file. For the rest of the patch, could you adjust a little bit more to be consistent in a single file?
vanzin
commented
Oct 5, 2018
While we're at it, it would be great to fix the typo in the PR title. |
Fokko
commented
Oct 6, 2018
Thanks @dongjoon-hyun. I've fixed the indentation issues. |
SparkQA
commented
Oct 6, 2018
Test build #97031 has finished for PR 22637 at commit
|
There was a problem hiding this comment.
There's a compile error here. But note you can have multiple Closeables declared in one try block anyway, so these can be merged.
There was a problem hiding this comment.
It's hard to know the best way to wrap these things, but here you have the continuation line indented less than the one that starts the statement. I think we can't do that. I'd indent both continuations 2 spaces from their preceding line ideally. Here and elsewhere where the try statement has to wrap.
SparkQA
commented
Oct 6, 2018
Test build #97063 has finished for PR 22637 at commit
|
Use features from Java8 such as: - Try-with-resource blocks
SparkQA
commented
Oct 7, 2018
Test build #97072 has finished for PR 22637 at commit
|
srowen
commented
Oct 8, 2018
OK, trying this again. Tests have definitely run this time and we've had another good pass at small review changes. |
While working on another PR, I noticed that there is quite some legacy Java in there that can be beautified. For example the use of features from Java8, such as: - Collection libraries - Try-with-resource blocks No logic has been changed. I think it is important to have a solid codebase with examples that will inspire next PR's to follow up on the best practices. What are your thoughts on this? This makes code easier to read, and using try-with-resource makes is less likely to forget to close something. ## What changes were proposed in this pull request? No changes in the logic of Spark, but more in the aesthetics of the code. ## How was this patch tested? Using the existing unit tests. Since no logic is changed, the existing unit tests should pass. Please review http://spark.apache.org/contributing.html before opening a pull request. Closesapache#22637 from Fokko/SPARK-25408. Authored-by: Fokko Driesprong <fokkodriesprong@godatadriven.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
While working on another PR, I noticed that there is quite some legacy Java in there that can be beautified. For example the use of features from Java8, such as:
No logic has been changed. I think it is important to have a solid codebase with examples that will inspire next PR's to follow up on the best practices.
What are your thoughts on this?
This makes code easier to read, and using try-with-resource makes is less likely to forget to close something.
What changes were proposed in this pull request?
No changes in the logic of Spark, but more in the aesthetics of the code.
How was this patch tested?
Using the existing unit tests. Since no logic is changed, the existing unit tests should pass.
Please review http://spark.apache.org/contributing.html before opening a pull request.