Improvements to loading of compression configs#2538
Merged
ctubbsii merged 1 commit intoapache:mainfrom Mar 2, 2022
Merged
Conversation
This follows up from the work done in apache#2518 to remove the use of the Java ServiceLoader for built-in known compression configs. Instead of loading all compression configs through the ServiceLoader, this change loads the known ones, and combines those with those discovered by the ServiceLoader. This prevents issues during development where the integration tests cannot be run inside an IDE, like Eclipse, due to the auto-service annotation processor not having been executed in that environment to make the implementing classes known to the ServiceLoader. Now, they are always available for integration tests. This also prevents the `@AutoService` annotation from being exposed in SPI classes, although it's not clear that's necessarily a problem. Additionally, this cleans up some of the previous code, that unnecessarily placed the supported algorithm names in a list, then converted it to an array, only to have it converted to a list again. For the pom, this change also sets the auto-service version in a property, so the multiple uses will use the same version, and explicitly includes the annotation processor in the maven-compiler-plugin configuration so it is consistent both within the errorprone profile and outside it. And finally, revert the version of Hadoop to 3.3.0, because 3.3.1 seems to be the cause of some flaky testing. In particular, it seems to cause unexpected EOF errors when trying to talk to data nodes, which is revealed by regular CountNameNodeOpsBulkIT failures, some so bad they seem to corrupt the XML output from failsafe, causing failsafe to be unable to read the result of the test. I was not able to reproduce these failures using 3.3.0, whereas I was seeing them regularly with 3.3.1.
EdColeman
approved these changes
Mar 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows up from the work done in #2518 to remove the use of the
Java ServiceLoader for built-in known compression configs. Instead of
loading all compression configs through the ServiceLoader, this change
loads the known ones, and combines those with those discovered by the
ServiceLoader. This prevents issues during development where the
integration tests cannot be run inside an IDE, like Eclipse, due to the
auto-service annotation processor not having been executed in that
environment to make the implementing classes known to the ServiceLoader.
Now, they are always available for integration tests.
This also prevents the
@AutoServiceannotation from being exposed inSPI classes, although it's not clear that's necessarily a problem.
Additionally, this cleans up some of the previous code, that
unnecessarily placed the supported algorithm names in a list, then
converted it to an array, only to have it converted to a list again.
For the pom, this change also sets the auto-service version in a
property, so the multiple uses will use the same version, and explicitly
includes the annotation processor in the maven-compiler-plugin
configuration so it is consistent both within the errorprone profile and
outside it.
And finally, revert the version of Hadoop to 3.3.0, because 3.3.1 seems
to be the cause of some flaky testing. In particular, it seems to cause
unexpected EOF errors when trying to talk to data nodes, which is
revealed by regular CountNameNodeOpsBulkIT failures, some so bad they
seem to corrupt the XML output from failsafe, causing failsafe to be
unable to read the result of the test. I was not able to reproduce these
failures using 3.3.0, whereas I was seeing them regularly with 3.3.1.