@Override public UpdateBlockForPipelineResponseProto updateBlockForPipeline( RpcController controller, UpdateBlockForPipelineRequestProto req) throws ServiceException { try { LocatedBlockProto result = PBHelper.convert(server .updateBlockForPipeline(PBHelper.convert(req.getBlock()), req.getClientName())); return UpdateBlockForPipelineResponseProto.newBuilder().setBlock(result) .build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public LocatedBlock updateBlockForPipeline(ExtendedBlock block, String clientName) throws IOException { UpdateBlockForPipelineRequestProto req = UpdateBlockForPipelineRequestProto .newBuilder() .setBlock(PBHelper.convert(block)) .setClientName(clientName) .build(); try { return PBHelper.convert( rpcProxy.updateBlockForPipeline(null, req).getBlock()); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public LocatedBlock updateBlockForPipeline(ExtendedBlock block, String clientName) throws IOException { UpdateBlockForPipelineRequestProto req = UpdateBlockForPipelineRequestProto .newBuilder() .setBlock(PBHelperClient.convert(block)) .setClientName(clientName) .build(); try { return PBHelperClient.convertLocatedBlockProto( rpcProxy.updateBlockForPipeline(null, req).getBlock()); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public UpdateBlockForPipelineResponseProto updateBlockForPipeline( RpcController controller, UpdateBlockForPipelineRequestProto req) throws ServiceException { try { LocatedBlockProto result = PBHelperClient.convertLocatedBlock( server.updateBlockForPipeline(PBHelperClient.convert(req.getBlock()), req.getClientName())); return UpdateBlockForPipelineResponseProto.newBuilder().setBlock(result) .build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public LocatedBlock updateBlockForPipeline(ExtendedBlock block, String clientName) throws IOException { UpdateBlockForPipelineRequestProto req = UpdateBlockForPipelineRequestProto.newBuilder() .setBlock(PBHelper.convert(block)).setClientName(clientName) .build(); try { return PBHelper .convert(rpcProxy.updateBlockForPipeline(null, req).getBlock()); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }