Search in sources :

Example 1 with SingularityTranscoderException

use of com.hubspot.singularity.data.transcoders.SingularityTranscoderException in project Singularity by HubSpot.

the class SingularityMesosFrameworkMessageHandler method handleMessage.

public void handleMessage(Protos.ExecutorID executorId, Protos.AgentID slaveId, byte[] data) {
    SingularityTaskShellCommandUpdate shellUpdate = null;
    try {
        shellUpdate = commandUpdateTranscoder.fromBytes(data);
        SingularityCreateResult saved = taskManager.saveTaskShellCommandUpdate(shellUpdate);
        LOG.debug("Saved {} with result {}", shellUpdate, saved);
    } catch (SingularityTranscoderException ste) {
        LOG.warn("Framework message {} not a commandUpdate", new String(data, UTF_8));
    } catch (Exception e) {
        LOG.error("While processing framework message {}", shellUpdate, e);
    }
}
Also used : SingularityTranscoderException(com.hubspot.singularity.data.transcoders.SingularityTranscoderException) SingularityTaskShellCommandUpdate(com.hubspot.singularity.SingularityTaskShellCommandUpdate) SingularityCreateResult(com.hubspot.singularity.SingularityCreateResult) SingularityTranscoderException(com.hubspot.singularity.data.transcoders.SingularityTranscoderException)

Aggregations

SingularityCreateResult (com.hubspot.singularity.SingularityCreateResult)1 SingularityTaskShellCommandUpdate (com.hubspot.singularity.SingularityTaskShellCommandUpdate)1 SingularityTranscoderException (com.hubspot.singularity.data.transcoders.SingularityTranscoderException)1