hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] avijayanhwx commented on a change in pull request #1667: HDFS-14308. DFSStripedInputStream curStripeBuf is not freed by unbuff…
Date Wed, 23 Oct 2019 05:32:27 GMT
avijayanhwx commented on a change in pull request #1667: HDFS-14308. DFSStripedInputStream
curStripeBuf is not freed by unbuff…
URL: https://github.com/apache/hadoop/pull/1667#discussion_r337855843
 
 

 ##########
 File path: hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java
 ##########
 @@ -554,4 +555,19 @@ public synchronized void releaseBuffer(ByteBuffer buffer) {
     throw new UnsupportedOperationException(
         "Not support enhanced byte buffer access.");
   }
+
+  @Override
+  public synchronized void unbuffer() {
+    closeCurrentBlockReaders();
+    if (curStripeBuf != null) {
+      curStripeBuf.clear();
 
 Review comment:
   Probably a minor issue. Won't we be doing this curStripeBuf.clear() step twice in the unbuffer
method? The first time is in Line #127-129. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message