Search in sources :

Example 11 with SingularityCreateResult

use of com.hubspot.singularity.SingularityCreateResult 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)11 SingularityPendingRequest (com.hubspot.singularity.SingularityPendingRequest)3 SingularityRequestWithState (com.hubspot.singularity.SingularityRequestWithState)3 SingularityRequestCleanup (com.hubspot.singularity.SingularityRequestCleanup)2 SingularityTask (com.hubspot.singularity.SingularityTask)2 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)2 ApiResponses (com.wordnik.swagger.annotations.ApiResponses)2 Consumes (javax.ws.rs.Consumes)2 POST (javax.ws.rs.POST)2 Path (javax.ws.rs.Path)2 ImmutableList (com.google.common.collect.ImmutableList)1 ExtendedTaskState (com.hubspot.singularity.ExtendedTaskState)1 SingularityDeployMarker (com.hubspot.singularity.SingularityDeployMarker)1 SingularityDeployResult (com.hubspot.singularity.SingularityDeployResult)1 SingularityDeployUpdate (com.hubspot.singularity.SingularityDeployUpdate)1 SingularityPendingDeploy (com.hubspot.singularity.SingularityPendingDeploy)1 SingularityPendingTaskBuilder (com.hubspot.singularity.SingularityPendingTaskBuilder)1 SingularityPendingTaskId (com.hubspot.singularity.SingularityPendingTaskId)1 SingularityRequestDeployState (com.hubspot.singularity.SingularityRequestDeployState)1 SingularityShellCommand (com.hubspot.singularity.SingularityShellCommand)1