You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "fapifta (via GitHub)" <gi...@apache.org> on 2024/01/31 17:40:41 UTC
[PR] HDDS-10249 Remove unused, dead code in hdds-common module. [ozone]
fapifta opened a new pull request, #6136:
URL: https://github.com/apache/ozone/pull/6136
## What changes were proposed in this pull request?
Removing dead code from hdds-common module. Dead code, besides that it is not used, can be harmful if someone starts to use it, as it was not used it might not have been updated either along with similar functionality, so it is better to get rid of it.
Please describe your PR in detail:
The PR is, removing unused code from hdds-common module. There are still things that are not referenced anywhere in the project and remains in the code after this PR, as removing them are not trivial. Majority of these cases are configuration related constants and some methods for which I was not comfortable removing them right now without more involved thinking.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10249
## How was this patch tested?
Functionality should not be changing, if the code compiles, and existing tests are running fine, that pretty much proves that we did not needed these methods.
On the other hand, due to potential reflective access it is hard to prove that complete methods are not called, therefore I ran a search for the method name in the codebase and checked for that manually.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "kerneltime (via GitHub)" <gi...@apache.org>.
kerneltime commented on code in PR #6136:
URL: https://github.com/apache/ozone/pull/6136#discussion_r1473829547
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/exception/CertificateException.java:
##########
@@ -88,7 +88,6 @@ public enum ErrorCode {
BOOTSTRAP_ERROR,
CSR_ERROR,
CRYPTO_SIGNATURE_VERIFICATION_ERROR,
- CERTIFICATE_NOT_FOUND_ERROR,
Review Comment:
should we delete unused enums? The cardinality changes.. should be harmless but still.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #6136:
URL: https://github.com/apache/ozone/pull/6136#issuecomment-1920855815
Thanks @fapifta for your efforts to clean up code. I support cleanup in general, but I have the following concerns:
1. I think we should first discuss what kind of code is OK to remove. E.g. should we consider compatibility when changing public interfaces? Maybe some code should be removed in two steps: deprecate first, remove in next release. We may also want to add `@InterfaceAudience` consistently.
2. It would be nice to tag folks who added code being removed. Maybe they had some future plans. (I doubt that's the case in most cases, but it doesn't hurt to double-check.)
3. To accommodate contributors from all time zones, please give at least 24 hours for feedback before merging non-trivial PRs.
To avoid blocking your cleanup effort unnecessarily, I think it may be best to group changes into multiple PRs based on complexity/severity instead of modules. (We can get rid of unused `private` code more easily.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "fapifta (via GitHub)" <gi...@apache.org>.
fapifta merged PR #6136:
URL: https://github.com/apache/ozone/pull/6136
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "fapifta (via GitHub)" <gi...@apache.org>.
fapifta commented on code in PR #6136:
URL: https://github.com/apache/ozone/pull/6136#discussion_r1474029674
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/exception/CertificateException.java:
##########
@@ -88,7 +88,6 @@ public enum ErrorCode {
BOOTSTRAP_ERROR,
CSR_ERROR,
CRYPTO_SIGNATURE_VERIFICATION_ERROR,
- CERTIFICATE_NOT_FOUND_ERROR,
Review Comment:
About this one I am pretty sure it does not go through any protocol or conversion during runtime.
We have a couple other similar ErrorCode enums for different exceptions, I left those as they are for now, because I felt that if I want to be sure then I need a bit more involved lookup for how the exception is used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "fapifta (via GitHub)" <gi...@apache.org>.
fapifta commented on PR #6136:
URL: https://github.com/apache/ozone/pull/6136#issuecomment-1920792757
Thank you for the review @kerneltime!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10249. Remove unused, dead code in hdds-common module. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #6136:
URL: https://github.com/apache/ozone/pull/6136#discussion_r1474096192
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/token/OzoneBlockTokenSelector.java:
##########
Review Comment:
`OzoneBlockTokenSelector` itself seems to be unused. Is it used via reflection from Hadoop?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org