Description
During RSCDriver's shutdown, it will first shutdown RPC server, and then all the RPC clients. When RPC client is closed, it will register a timeout to avoid orphaned RSCDriver, but this is not necessary during RSCDriver's shutdown, and will throw an exception as show below, so here fixing this issue.
18/05/02 14:03:53 INFO utils.LineBufferedStream: 18/05/02 14:03:53 WARN DefaultPromise: An exception was thrown by org.apache.livy.rsc.Utils$2.operationComplete() 18/05/02 14:03:53 INFO utils.LineBufferedStream: java.util.concurrent.RejectedExecutionException: event executor terminated 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:821) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:327) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:320) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:746) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:195) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:140) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.AbstractEventExecutorGroup.schedule(AbstractEventExecutorGroup.java:50) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver.setupIdleTimeout(RSCDriver.java:238) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver.access$100(RSCDriver.java:70) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver$2.onSuccess(RSCDriver.java:220) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver$2.onSuccess(RSCDriver.java:216) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.Utils$2.operationComplete(Utils.java:108) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:481) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:420) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1148) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:764) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:740) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:611) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1301) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:608) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:608) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:465) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:973) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannel.close(AbstractChannel.java:238) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.rpc.Rpc.close(Rpc.java:310) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver.shutdownServer(RSCDriver.java:311) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver.shutdown(RSCDriver.java:133) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.driver.RSCDriver.handle(RSCDriver.java:398) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at java.lang.reflect.Method.invoke(Method.java:497) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.rpc.RpcDispatcher.handleCall(RpcDispatcher.java:133) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at org.apache.livy.rsc.rpc.RpcDispatcher.channelRead0(RpcDispatcher.java:80) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) 18/05/02 14:03:53 INFO utils.LineBufferedStream: at java.lang.Thread.run(Thread.java:745)