Skip to content

YARN-11135. Remove unused Imports in hadoop project#4284

Closed
hotcodemacha wants to merge 1 commit intoapache:trunkfrom
hotcodemacha:YARN-11135
Closed

YARN-11135. Remove unused Imports in hadoop project#4284
hotcodemacha wants to merge 1 commit intoapache:trunkfrom
hotcodemacha:YARN-11135

Conversation

@hotcodemacha
Copy link
Contributor

@hotcodemacha hotcodemacha commented May 8, 2022

Description of PR

Remove unused Imports in hadoop project

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?

@hotcodemacha
Copy link
Contributor Author

@aajisaka - Can you please have a look? Thanks.

@steveloughran
Copy link
Contributor

-1. wontfix.

if this were to go in

  • every pending PR would no longer apply without rebasing/reworking
  • every subsequent pr would be impossible to backport without reversing the work

we have a fraction of this problem even with the movement of unshaded guava to shaded guava to hadoop's own Precondition classes; moving things from trunk to 3.3. to internal PRs always fail to merge at those two or three imports.

we couldn't cope with this at scale.

this is also why we don't go overboard in reordering imports in the files touched within a normal PR: IDEs may think they are being helpful by cleaning up imports, but aren't. Removing unused imports is fine, but big cleanups, tht causes too many problems.

Sorry. if you had to deal with backporting you'd understand why.

@hotcodemacha
Copy link
Contributor Author

@steveloughran - What you are saying makes sense. But let's do some clean up the code. I am changing the scope and only removing the unused imports. What do you think about it?

@hotcodemacha hotcodemacha reopened this May 9, 2022
@hotcodemacha hotcodemacha changed the title YARN-11135. Optimize Imports in hadoop project YARN-11135. Remove unused Imports in hadoop project May 10, 2022
@hotcodemacha
Copy link
Contributor Author

Closing this PR as discussed offline with @aajisaka. Will create separate JIRA and PR for each Hadoop project and reduce the scope to only remove unused imports.

@steveloughran
Copy link
Contributor

ok. for tools/ do one for the different submodules, that way backporting is a lot easier.

@hotcodemacha
Copy link
Contributor Author

Thanks @steveloughran. I have started with Hadoop Map/Reduce. Here is the PR of that. #4299. Can you please review? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants