saxenapranav commented on code in PR #6752:
URL: https://github.com/apache/hadoop/pull/6752#discussion_r1617130220
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsCustomEncryption.java:
##########
@@ -390,9 +386,34 @@ private AzureBlobFileSystem getCPKEnabledFS() throws
IOException {
conf.set(FS_AZURE_ENCRYPTION_ENCODED_CLIENT_PROVIDED_KEY_SHA + "."
+ getAccountName(), cpkEncodedSHA);
conf.unset(FS_AZURE_ENCRYPTION_CONTEXT_PROVIDER_TYPE);
- AzureBlobFileSystem fs = (AzureBlobFileSystem)
FileSystem.newInstance(conf);
- fileSystemsOpenedInTest.add(fs);
- return fs;
+ return getAzureBlobFileSystem(conf);
+ }
+
+ private AzureBlobFileSystem getAzureBlobFileSystem(final Configuration conf)
{
+ try {
+ AzureBlobFileSystem fs = (AzureBlobFileSystem) FileSystem.newInstance(
Review Comment:
Thats correct. Have made change that whatever new filesystem is created gets
closed in try-with-resources.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]