You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/10/11 07:10:26 UTC

[GitHub] [hadoop] rbalamohan commented on a diff in pull request #4966: HADOOP-18476. Abfs and S3A FileContext bindings to close wrapped filesystems in finalizer

rbalamohan commented on code in PR #4966:
URL: https://github.com/apache/hadoop/pull/4966#discussion_r991893949


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3A.java:
##########
@@ -54,4 +55,13 @@ public String toString() {
     sb.append('}');
     return sb.toString();
   }
+
+  /**
+   * Close the file system; the FileContext API doesn't have an explicit close.
+   */
+  @Override
+  protected void finalize() throws Throwable {

Review Comment:
   Is it because Hadoop still relies on JDK 8? And cleaner is available from JDK 9? There are also usages of finalize() in other classes like ZlibCompressor. May be we can change all finalize() usages in hadoop when min JDK version moves to 9.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org