[ 
https://issues.apache.org/jira/browse/HADOOP-18105?focusedWorklogId=775848&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-775848
 ]

ASF GitHub Bot logged work on HADOOP-18105:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/May/22 10:33
            Start Date: 30/May/22 10:33
    Worklog Time Spent: 10m 
      Work Description: steveloughran commented on code in PR #4263:
URL: https://github.com/apache/hadoop/pull/4263#discussion_r884681833


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMoreWeakReferencedElasticByteBufferPool.java:
##########
@@ -0,0 +1,93 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.io;
+
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+import org.apache.hadoop.test.HadoopTestBase;
+
+import static org.apache.hadoop.test.LambdaTestUtils.intercept;
+
+/**
+ * Non parameterized tests for {@code WeakReferencedElasticByteBufferPool}.
+ */
+public class TestMoreWeakReferencedElasticByteBufferPool

Review Comment:
   as long as it fails in the same method where it is passed in, I'm happy. 
it's the delayed failures which are the pain point





Issue Time Tracking
-------------------

    Worklog Id:     (was: 775848)
    Time Spent: 3.5h  (was: 3h 20m)

> Implement a variant of ElasticByteBufferPool which uses weak references for 
> garbage collection.
> -----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18105
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18105
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: common, fs
>            Reporter: Mukund Thakur
>            Assignee: Mukund Thakur
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Currently in hadoop codebase, we have two classes which implements byte 
> buffers pooling.
> One is ElasticByteBufferPool which doesn't use weak references and thus could 
> cause memory leaks in production environment. 
> Other is DirectBufferPool which uses weak references but doesn't support 
> caller's preference for either on-heap or off-heap buffers. 
>  
> The idea is to create an improved version of ElasticByteBufferPool by 
> subclassing it ( as it is marked as public and stable and used widely in hdfs 
> ) with essential functionalities required for effective buffer pooling. This 
> is important for the parent Vectored IO work.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to