-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-17863. ABFS: Fix compiler deprecation warning in TextFileBasedIdentityHandler #3332
Conversation
TEST RESULTS HNS Account Location: East US 2
JIRAs tracking above failures: testAbfsStreamOps, ITestAzureBlobFileSystemLease, TestAbfsClientThrottlingAnalyzer |
LineIterator it = null; | ||
try { | ||
it = FileUtils.lineIterator(file, "UTF-8"); | ||
try (LineIterator it = FileUtils.lineIterator(file, "UTF-8")) { |
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.
we're not going to close quietly any more...can anyone see an issue that? Given it's a local file read, I don' t personally think it is important
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.
Edited to use catch IOException on close as done by closeQuietly
💔 -1 overall
This message was automatically generated. |
...op-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
...op-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
…IdentityHandler (apache#3332) Closes apache#3332 Contributed by Sumangala Patki
TextFileBasedIdentityHandler uses an instance of LineIterator whose closeQuietly method has been deprecated, resulting in compiler warnings during yetus runs. This PR fixes it by leveraging a try-catch block for close() to avoid the explicit call to closeQuietly by the LineIterator instance.
Testing: Verified change with existing test class TestTextFileBasedIdentityHandler; no new test required.