Hadoop-17413. Release elastic byte buffer pool at close
- Contributed by Sneha Vijayarajan
(cherry picked from commit 5bf977e6b1
)
This commit is contained in:
parent
a44890eb63
commit
d3caa1552b
@ -85,7 +85,7 @@ public class AbfsOutputStream extends OutputStream implements Syncable, StreamCa
|
||||
* blocks. After the data is sent to the service, the buffer is returned
|
||||
* back to the queue
|
||||
*/
|
||||
private final ElasticByteBufferPool byteBufferPool
|
||||
private ElasticByteBufferPool byteBufferPool
|
||||
= new ElasticByteBufferPool();
|
||||
|
||||
private final Statistics statistics;
|
||||
@ -297,6 +297,7 @@ public synchronized void close() throws IOException {
|
||||
bufferIndex = 0;
|
||||
closed = true;
|
||||
writeOperations.clear();
|
||||
byteBufferPool = null;
|
||||
if (!threadExecutor.isShutdown()) {
|
||||
threadExecutor.shutdownNow();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user