-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-43576][CORE] Remove unused declarations from Core module #41218
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-43576][CORE] Remove unused declarations from Core module #41218
Conversation
|
|
||
| protected val jobConfCacheKey: String = "rdd_%d_job_conf".format(id) | ||
|
|
||
| protected val inputFormatCacheKey: String = "rdd_%d_input_format".format(id) |
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.
This is a part of developer API. I don't think we can just remove this out.
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.
Ok, Let's reserve it.
|
@panbingkun how did you find them? FWIW, I thought we added a compilation feature to disallow unused variables IIRC, @LuciferYang . |
1.When I review the HadoopRDD code, I noticed some inspection prompts, eg: 2.So I wonder if there are other cases in the core module, then I export 3.execute command: 4.The declared unused variable results in all 6.Some inspect results may be inaccurate and ultimately require manual reconfirmation. |
Currently, we have only added compilation checks on Line 2864 in 411bcd2
For the current version of Scala 2.12, we can further try to add more checks, such as |
| (Math.min(totalGCTime / totalDuration + 0.5, 1)) : 1; | ||
| } | ||
|
|
||
| // When GCTimePercent is edited change ToolTips.TASK_TIME to match |
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.
hmm, why do you propose to remove this?
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.
ToolTips.TASK_TIME - Shaded red when garbage collection (GC) time is over 10% of task time
-
Adding this variable for the first time
CommitID: c037d25
JIRA: https://issues.apache.org/jira/browse/SPARK-12149
[SPARK-12149][WEB UI] Executor UI improvement suggestions - Color UI
PR: [SPARK-12149] [Web UI] Executor UI improvement suggestions - Color UI #10154
First declaration:https://github.com/apache/spark/pull/10154/files#diff-91f8d288f7aa0726fc067ad9eb67aff41c474ada4d702e5b393bd81ae5aee7b5R91-R92
First use:https://github.com/apache/spark/pull/10154/files#diff-3bb7f9962a6343cbc09be474b85f2f9ed2e80047f4863d447faa407d925f425cR82 -
The variable content is directly hard coding in
executorspage-template.htmlfile
CommitID: b9bab4d
JIRA: https://issues.apache.org/jira/browse/SPARK-15951
[SPARK-15951] Change Executors Page to use datatables to support sorting columns and searching
PR: [SPARK-15951] Change Executors Page to use datatables to support sorting columns and searching #13670
The variable content is directly hard coding: https://github.com/apache/spark/pull/13670/files#diff-cc6993f75c03b53bb41d8d7113ed3d5157580e583672da68b15cbe4d9f374e15R36
Delete: https://github.com/apache/spark/pull/13670/files#diff-3bb7f9962a6343cbc09be474b85f2f9ed2e80047f4863d447faa407d925f425cL94
So I think it needs to be removed; Meanwhile, I did not find any usage in the spark code base using the following command: find . -name "*" -type file -print0 | xargs -0 grep "TASK_TIME"
|
+1, LGTM. Merging to master. |
dongjoon-hyun
left a comment
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.
+1, LGTM.
### What changes were proposed in this pull request? The pr aims to remove unused declarations from `Core` module ### Why are the changes needed? Make code clean. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes apache#41218 from panbingkun/remove_unused_declaration_core. Authored-by: panbingkun <[email protected]> Signed-off-by: Max Gekk <[email protected]>



What changes were proposed in this pull request?
The pr aims to remove unused declarations from
CoremoduleWhy are the changes needed?
Make code clean.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass GA.