HADOOP-18105 Implement buffer pooling with weak references#4263
Conversation
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak refrences and could lead to memory leak errors and DirectBufferPool doesn't support caller prefrences of direct and heap buffers and has only fixed length buffer implementation.
|
Don't know why javadoc is playing up in all my patches. |
|
there are some active patches for javadoc; don't worry too much for now. |
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...p-common/src/test/java/org/apache/hadoop/io/TestMoreWeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
...adoop-common/src/test/java/org/apache/hadoop/io/TestWeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...adoop-common/src/test/java/org/apache/hadoop/io/TestWeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...adoop-common/src/test/java/org/apache/hadoop/io/TestWeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
...p-common/src/test/java/org/apache/hadoop/io/TestMoreWeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
steveloughran
left a comment
There was a problem hiding this comment.
happy with the revision, but your new test has to use intercept() when it wants to raise exceptions in a test.
...p-common/src/test/java/org/apache/hadoop/io/TestMoreWeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
steveloughran
left a comment
There was a problem hiding this comment.
a few minor suggestions. deciding how to handle an unknown buffer being returned is the key one
+1 pending those changes.
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/ByteBufferPool.java
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
...ct/hadoop-common/src/main/java/org/apache/hadoop/io/WeakReferencedElasticByteBufferPool.java
Outdated
Show resolved
Hide resolved
...p-common/src/test/java/org/apache/hadoop/io/TestMoreWeakReferencedElasticByteBufferPool.java
Show resolved
Hide resolved
What do you mean by this? I don't think there is a way to know whether the buffer being returned currently through putBuffer() was part of this pool or not. |
ok. we treat that as a success. just add a javadoc warning of this and say "may change in future" |
|
💔 -1 overall
This message was automatically generated. |
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak references and could lead to memory leak errors and DirectBufferPool doesn't support caller preferences of direct and heap buffers and has only fixed length buffer implementation. Contributed By: Mukund Thakur
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak references and could lead to memory leak errors and DirectBufferPool doesn't support caller preferences of direct and heap buffers and has only fixed length buffer implementation. Contributed By: Mukund Thakur
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak references and could lead to memory leak errors and DirectBufferPool doesn't support caller preferences of direct and heap buffers and has only fixed length buffer implementation. Contributed By: Mukund Thakur
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak references and could lead to memory leak errors and DirectBufferPool doesn't support caller preferences of direct and heap buffers and has only fixed length buffer implementation. Contributed By: Mukund Thakur
part of HADOOP-18103. Required for vectored IO feature. None of current buffer pool implementation is complete. ElasticByteBufferPool doesn't use weak references and could lead to memory leak errors and DirectBufferPool doesn't support caller preferences of direct and heap buffers and has only fixed length buffer implementation. Contributed By: Mukund Thakur
Description of PR
part of HADOOP-18103.
Required for vectored IO feature. None of current buffer pool
implementation is complete. ElasticByteBufferPool doesn't use
weak refrences and could lead to memory leak errors and
DirectBufferPool doesn't support caller prefrences of direct
and heap buffers and has only fixed length buffer implementation.
How was this patch tested?
Added new unit tests and tested through vectored read api integration test.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?