@Override public void refreshCallQueue() throws IOException { try { rpcProxy.refreshCallQueue(NULL_CONTROLLER, VOID_REFRESH_CALL_QUEUE_REQUEST); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
private Collection<RefreshResponse> unpack(GenericRefreshResponseCollectionProto collection) { List<GenericRefreshResponseProto> responseProtos = collection.getResponsesList(); List<RefreshResponse> responses = new ArrayList<RefreshResponse>(); for (GenericRefreshResponseProto rp : responseProtos) { RefreshResponse response = unpack(rp); responses.add(response); } return responses; }
@Override public Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException { List<String> argList = Arrays.asList(args); try { GenericRefreshRequestProto request = GenericRefreshRequestProto.newBuilder() .setIdentifier(identifier) .addAllArgs(argList) .build(); GenericRefreshResponseCollectionProto resp = rpcProxy.refresh(NULL_CONTROLLER, request); return unpack(resp); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
@Override public GenericRefreshResponseCollectionProto refresh( RpcController controller, GenericRefreshRequestProto request) throws ServiceException { try { List<String> argList = request.getArgsList(); String[] args = argList.toArray(new String[argList.size()]); if (!request.hasIdentifier()) { throw new ServiceException("Request must contain identifier"); } Collection<RefreshResponse> results = impl.refresh(request.getIdentifier(), args); return pack(results); } catch (IOException e) { throw new ServiceException(e); } }
new GenericRefreshProtocolClientSideTranslatorPB(proxy);) { responses = xlator.refresh(identifier, args);
new RefreshCallQueueProtocolServerSideTranslatorPB(this); BlockingService refreshCallQueueService = RefreshCallQueueProtocolService .newReflectiveBlockingService(refreshCallQueueXlator); new GenericRefreshProtocolServerSideTranslatorPB(this); BlockingService genericRefreshService = GenericRefreshProtocolService .newReflectiveBlockingService(genericRefreshXlator);
private static RefreshCallQueueProtocol createNNProxyWithRefreshCallQueueProtocol(InetSocketAddress address, Configuration conf, UserGroupInformation ugi) throws IOException { RefreshCallQueueProtocolPB proxy = (RefreshCallQueueProtocolPB) createNameNodeProxy(address, conf, ugi, RefreshCallQueueProtocolPB.class, 0); return new RefreshCallQueueProtocolClientSideTranslatorPB(proxy); }
@Override public Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException { List<String> argList = Arrays.asList(args); try { GenericRefreshRequestProto request = GenericRefreshRequestProto.newBuilder() .setIdentifier(identifier) .addAllArgs(argList) .build(); GenericRefreshResponseCollectionProto resp = rpcProxy.refresh(NULL_CONTROLLER, request); return unpack(resp); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
@Override public void refreshCallQueue() throws IOException { try { rpcProxy.refreshCallQueue(NULL_CONTROLLER, VOID_REFRESH_CALL_QUEUE_REQUEST); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
private Collection<RefreshResponse> unpack(GenericRefreshResponseCollectionProto collection) { List<GenericRefreshResponseProto> responseProtos = collection.getResponsesList(); List<RefreshResponse> responses = new ArrayList<RefreshResponse>(); for (GenericRefreshResponseProto rp : responseProtos) { RefreshResponse response = unpack(rp); responses.add(response); } return responses; }
private static RefreshCallQueueProtocol createNNProxyWithRefreshCallQueueProtocol(InetSocketAddress address, Configuration conf, UserGroupInformation ugi) throws IOException { RefreshCallQueueProtocolPB proxy = (RefreshCallQueueProtocolPB) createNameNodeProxy(address, conf, ugi, RefreshCallQueueProtocolPB.class); return new RefreshCallQueueProtocolClientSideTranslatorPB(proxy); }
@Override public Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException { List<String> argList = Arrays.asList(args); try { GenericRefreshRequestProto request = GenericRefreshRequestProto.newBuilder() .setIdentifier(identifier) .addAllArgs(argList) .build(); GenericRefreshResponseCollectionProto resp = rpcProxy.refresh(NULL_CONTROLLER, request); return unpack(resp); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
@Override public void refreshCallQueue() throws IOException { try { rpcProxy.refreshCallQueue(NULL_CONTROLLER, VOID_REFRESH_CALL_QUEUE_REQUEST); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
private Collection<RefreshResponse> unpack(GenericRefreshResponseCollectionProto collection) { List<GenericRefreshResponseProto> responseProtos = collection.getResponsesList(); List<RefreshResponse> responses = new ArrayList<RefreshResponse>(); for (GenericRefreshResponseProto rp : responseProtos) { RefreshResponse response = unpack(rp); responses.add(response); } return responses; }
private static RefreshCallQueueProtocol createNNProxyWithRefreshCallQueueProtocol(InetSocketAddress address, Configuration conf, UserGroupInformation ugi) throws IOException { RefreshCallQueueProtocolPB proxy = (RefreshCallQueueProtocolPB) createNameNodeProxy(address, conf, ugi, RefreshCallQueueProtocolPB.class); return new RefreshCallQueueProtocolClientSideTranslatorPB(proxy); }
@Override public Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException { List<String> argList = Arrays.asList(args); try { GenericRefreshRequestProto request = GenericRefreshRequestProto.newBuilder() .setIdentifier(identifier) .addAllArgs(argList) .build(); GenericRefreshResponseCollectionProto resp = rpcProxy.refresh(NULL_CONTROLLER, request); return unpack(resp); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
@Override public void refreshCallQueue() throws IOException { try { rpcProxy.refreshCallQueue(NULL_CONTROLLER, VOID_REFRESH_CALL_QUEUE_REQUEST); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
private Collection<RefreshResponse> unpack(GenericRefreshResponseCollectionProto collection) { List<GenericRefreshResponseProto> responseProtos = collection.getResponsesList(); List<RefreshResponse> responses = new ArrayList<RefreshResponse>(); for (GenericRefreshResponseProto rp : responseProtos) { RefreshResponse response = unpack(rp); responses.add(response); } return responses; }
@Override public Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException { List<String> argList = Arrays.asList(args); try { GenericRefreshRequestProto request = GenericRefreshRequestProto.newBuilder() .setIdentifier(identifier) .addAllArgs(argList) .build(); GenericRefreshResponseCollectionProto resp = rpcProxy.refresh(NULL_CONTROLLER, request); return unpack(resp); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }
@Override public void refreshCallQueue() throws IOException { try { rpcProxy.refreshCallQueue(NULL_CONTROLLER, VOID_REFRESH_CALL_QUEUE_REQUEST); } catch (ServiceException se) { throw ProtobufHelper.getRemoteException(se); } }