HBASE-16054 OutOfMemory exception when using AsyncRpcClient with encryption (Colin Ma)

This commit is contained in:
tedyu 2016-06-20 07:31:07 -07:00
parent d34e65327e
commit 4377e16619
1 changed files with 2 additions and 0 deletions

View File

@ -331,6 +331,8 @@ public class SaslClientHandler extends ChannelDuplexHandler {
ByteBuf in = (ByteBuf) msg; ByteBuf in = (ByteBuf) msg;
byte[] unwrapped = new byte[in.readableBytes()]; byte[] unwrapped = new byte[in.readableBytes()];
in.readBytes(unwrapped); in.readBytes(unwrapped);
// release the memory
in.release();
try { try {
saslToken = saslClient.wrap(unwrapped, 0, unwrapped.length); saslToken = saslClient.wrap(unwrapped, 0, unwrapped.length);