Add some code on RPCBus.java get method to close inputstream at finally
block
diff --git
a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
index 30101b2..9eb6f78 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
@@ -232,6 +232,11 @@ public abstract class RpcBus<T extends EnumLite, C
extends RemoteConnection> imp
return parser.parseFrom(is);
} catch (InvalidProtocolBufferException e) {
throw new RpcException(String.format("Failure while decoding message
with parser of type. %s", parser.getClass().getCanonicalName()), e);
- }
+ }finally {
+ try{
+ inputStream.close();
+ }catch(IOException e){
+ e.printStackTrace();
+ }
}
}
--
long is the way and hard that out of Hell leads up to light