use of org.openkilda.wfm.error.PipelineException in project open-kilda by telstra.
the class WorkerBolt method emitResponseToHub.
/**
* Send response to the hub bolt. Note: the operation's key is required.
* @param input request or response tuple (use key to lookup original request).
* @param values response to be sent to the hub.
*/
protected void emitResponseToHub(Tuple input, Values values) {
String key;
try {
key = pullKey(input);
} catch (PipelineException e) {
throw new IllegalStateException(String.format("Can't extract request key from %s: %s", input, e), e);
}
cancelCallback(key);
Tuple processingRequest = pendingTasks.remove(key);
if (processingRequest == null) {
throw new IllegalStateException(format("Attempt to send response for non pending task with id %s", key));
}
getOutput().emitDirect(processingRequest.getSourceTask(), workerConfig.getStreamToHub(), getCurrentTuple(), values);
}
use of org.openkilda.wfm.error.PipelineException in project open-kilda by telstra.
the class PortHandler method handleSpeakerBcast.
private void handleSpeakerBcast(Tuple input) {
try {
SpeakerBcast command = pullValue(input, SpeakerRouter.FIELD_ID_COMMAND, SpeakerBcast.class);
command.apply(this);
} catch (PipelineException e) {
log.error("Handle speaker bcast command exception", e);
}
}
Aggregations