@Override public void shutdownDatanode(boolean forUpgrade) throws IOException { ShutdownDatanodeRequestProto request = ShutdownDatanodeRequestProto .newBuilder().setForUpgrade(forUpgrade).build(); try { rpcProxy.shutdownDatanode(NULL_CONTROLLER, request); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public ShutdownDatanodeResponseProto shutdownDatanode( RpcController unused, ShutdownDatanodeRequestProto request) throws ServiceException { try { impl.shutdownDatanode(request.getForUpgrade()); } catch (IOException e) { throw new ServiceException(e); } return SHUTDOWN_DATANODE_RESP; }