@Override public void fail(Object msgId) { DRPCMessageId did = (DRPCMessageId) msgId; DistributedRPCInvocations.Iface client; if(_local_drpc_id == null) { client = _clients.get(did.index); } else { client = (DistributedRPCInvocations.Iface) ServiceRegistry.getService(_local_drpc_id); } try { client.failRequest(did.id); } catch (TException e) { LOG.error("Failed to fail request", e); } }
DistributedRPCInvocations.Iface drpc = (DistributedRPCInvocations.Iface) ServiceRegistry.getService(_local_drpc_id); try { DRPCRequest req = drpc.fetchRequest(_function); if(req.get_request_id().length() > 0) { Map returnInfo = new HashMap();
client.result(id, result); _collector.ack(input); } catch (AuthorizationException aze) {
if (drpc != null) { // can happen during shutdown of drpc while topology is still up try { DRPCRequest req = drpc.fetchRequest(_function); if (req.get_request_id().length() > 0) { Map returnInfo = new HashMap();
client.result(id, result); _collector.ack(input); } catch (AuthorizationException aze) {
if(drpc!=null) { // can happen during shutdown of drpc while topology is still up try { DRPCRequest req = drpc.fetchRequest(_function); if(req.get_request_id().length() > 0) { Map returnInfo = new HashMap();
client.result(id, result); } catch (AuthorizationException aze) { collector.reportError(aze);
client.result(id, result); _collector.ack(input); } catch(TException e) {
@Override public void complete(ReturnResultsState state, TridentCollector collector) { // only one of the multireducers will receive the tuples if(state.returnInfo!=null) { String result = JSONValue.toJSONString(state.results); Map retMap = (Map) JSONValue.parse(state.returnInfo); final String host = (String) retMap.get("host"); final int port = Utils.getInt(retMap.get("port")); String id = (String) retMap.get("id"); DistributedRPCInvocations.Iface client; if(local) { client = (DistributedRPCInvocations.Iface) ServiceRegistry.getService(host); } else { List server = new ArrayList() {{ add(host); add(port); }}; if(!_clients.containsKey(server)) { _clients.put(server, new DRPCInvocationsClient(host, port)); } client = _clients.get(server); } try { client.result(id, result); } catch(TException e) { collector.reportError(e); } } }
@Override public void fail(Object msgId) { DRPCMessageId did = (DRPCMessageId) msgId; DistributedRPCInvocations.Iface client; if (_local_drpc_id == null) { client = _clients.get(did.index); } else { client = (DistributedRPCInvocations.Iface) ServiceRegistry.getService(_local_drpc_id); } try { client.failRequest(did.id); } catch (AuthorizationException aze) { LOG.error("Not authorized to failREquest from DRPC server", aze); } catch (TException e) { LOG.error("Failed to fail request", e); } }
@Override public void fail(Object msgId) { DRPCMessageId did = (DRPCMessageId) msgId; DistributedRPCInvocations.Iface client; if(_local_drpc_id == null) { client = _clients.get(did.index); } else { client = (DistributedRPCInvocations.Iface) ServiceRegistry.getService(_local_drpc_id); } try { client.failRequest(did.id); } catch (TException e) { LOG.error("Failed to fail request", e); } }
public result_result getResult(I iface, result_args args) throws org.apache.thrift.TException { result_result result = new result_result(); try { iface.result(args.id, args.result); } catch (AuthorizationException aze) { result.aze = aze; } return result; } }
public fetchRequest_result getResult(I iface, fetchRequest_args args) throws org.apache.thrift.TException { fetchRequest_result result = new fetchRequest_result(); try { result.success = iface.fetchRequest(args.functionName); } catch (AuthorizationException aze) { result.aze = aze; } return result; } }
protected fetchRequest_result getResult(I iface, fetchRequest_args args) throws org.apache.thrift.TException { fetchRequest_result result = new fetchRequest_result(); result.success = iface.fetchRequest(args.functionName); return result; } }
protected failRequest_result getResult(I iface, failRequest_args args) throws org.apache.thrift.TException { failRequest_result result = new failRequest_result(); iface.failRequest(args.id); return result; } }
public failRequest_result getResult(I iface, failRequest_args args) throws org.apache.thrift.TException { failRequest_result result = new failRequest_result(); try { iface.failRequest(args.id); } catch (AuthorizationException aze) { result.aze = aze; } return result; } }
protected result_result getResult(I iface, result_args args) throws org.apache.thrift.TException { result_result result = new result_result(); iface.result(args.id, args.result); return result; } }
if (drpc != null) { // can happen during shutdown of drpc while topology is still up try { DRPCRequest req = drpc.fetchRequest(_function); if (req.get_request_id().length() > 0) { Map returnInfo = new HashMap();
client.result(id, result); _collector.ack(input); } catch(TException e) {
client.result(id, result); } catch (AuthorizationException aze) { collector.reportError(aze);