Search in sources :

Example 1 with TaskInfo

use of org.apache.mesos.v1.Protos.TaskInfo in project Singularity by HubSpot.

the class SingularityMesosTaskBuilder method buildTask.

public SingularityMesosTaskHolder buildTask(SingularityOfferHolder offerHolder, List<Resource> availableResources, SingularityTaskRequest taskRequest, Resources desiredTaskResources, Resources desiredExecutorResources) {
    final String sanitizedRackId = offerHolder.getSanitizedRackId();
    final String sanitizedHost = offerHolder.getSanitizedHost();
    final SingularityTaskId taskId = new SingularityTaskId(taskRequest.getPendingTask().getPendingTaskId().getRequestId(), taskRequest.getDeploy().getId(), System.currentTimeMillis(), taskRequest.getPendingTask().getPendingTaskId().getInstanceNo(), sanitizedHost, sanitizedRackId);
    final TaskInfo.Builder bldr = TaskInfo.newBuilder().setTaskId(TaskID.newBuilder().setValue(taskId.toString()));
    Optional<long[]> ports = Optional.absent();
    Optional<Resource> portsResource = Optional.absent();
    final Optional<SingularityContainerInfo> containerInfo = taskRequest.getDeploy().getContainerInfo();
    if (desiredTaskResources.getNumPorts() > 0 || hasLiteralPortMapping(containerInfo)) {
        List<Long> requestedPorts = new ArrayList<>();
        if (hasLiteralPortMapping(containerInfo)) {
            requestedPorts.addAll(containerInfo.get().getDocker().get().getLiteralHostPorts());
        }
        portsResource = Optional.of(MesosUtils.getPortsResource(desiredTaskResources.getNumPorts(), availableResources, requestedPorts));
        ports = Optional.of(MesosUtils.getPorts(portsResource.get(), desiredTaskResources.getNumPorts()));
    }
    if (containerInfo.isPresent()) {
        prepareContainerInfo(offerHolder, taskId, bldr, containerInfo.get(), ports);
    }
    if (taskRequest.getDeploy().getCustomExecutorCmd().isPresent()) {
        prepareCustomExecutor(bldr, taskId, taskRequest, offerHolder, ports, desiredExecutorResources);
    } else {
        prepareCommand(bldr, taskId, taskRequest, offerHolder, ports);
    }
    if (portsResource.isPresent()) {
        bldr.addResources(portsResource.get());
    }
    Optional<String> requiredRole = taskRequest.getRequest().getRequiredRole();
    bldr.addResources(MesosUtils.getCpuResource(desiredTaskResources.getCpus(), requiredRole));
    bldr.addResources(MesosUtils.getMemoryResource(desiredTaskResources.getMemoryMb(), requiredRole));
    bldr.addResources(MesosUtils.getDiskResource(desiredTaskResources.getDiskMb(), requiredRole));
    bldr.setAgentId(offerHolder.getOffers().get(0).getAgentId());
    bldr.setName(taskRequest.getRequest().getId());
    final Builder labelsBuilder = Labels.newBuilder();
    // apply request-specific labels, if any
    if (taskRequest.getDeploy().getMesosLabels().isPresent() && !taskRequest.getDeploy().getMesosLabels().get().isEmpty()) {
        for (SingularityMesosTaskLabel label : taskRequest.getDeploy().getMesosLabels().get()) {
            org.apache.mesos.v1.Protos.Label.Builder labelBuilder = Label.newBuilder();
            labelBuilder.setKey(label.getKey());
            if ((label.getValue().isPresent())) {
                labelBuilder.setValue(label.getValue().get());
            }
            labelsBuilder.addLabels(labelBuilder.build());
        }
    }
    // apply task-specific labels, if any
    final int taskInstanceNo = taskRequest.getPendingTask().getPendingTaskId().getInstanceNo();
    if (taskRequest.getDeploy().getMesosTaskLabels().isPresent() && taskRequest.getDeploy().getMesosTaskLabels().get().containsKey(taskInstanceNo) && !taskRequest.getDeploy().getMesosTaskLabels().get().get(taskInstanceNo).isEmpty()) {
        for (SingularityMesosTaskLabel label : taskRequest.getDeploy().getMesosTaskLabels().get().get(taskInstanceNo)) {
            org.apache.mesos.v1.Protos.Label.Builder labelBuilder = Label.newBuilder();
            labelBuilder.setKey(label.getKey());
            if ((label.getValue().isPresent())) {
                labelBuilder.setValue(label.getValue().get());
            }
            labelsBuilder.addLabels(labelBuilder.build());
        }
    }
    bldr.setLabels(labelsBuilder);
    TaskInfo task = bldr.build();
    return new SingularityMesosTaskHolder(new SingularityTask(taskRequest, taskId, offerHolder.getOffers().stream().map((o) -> mesosProtosUtils.offerFromProtos(o)).collect(Collectors.toList()), mesosProtosUtils.taskFromProtos(task), Optional.of(offerHolder.getRackId())), task);
}
Also used : SingularityTask(com.hubspot.singularity.SingularityTask) ExecutorInfo(org.apache.mesos.v1.Protos.ExecutorInfo) Parameter(org.apache.mesos.v1.Protos.Parameter) Inject(com.google.inject.Inject) LoggerFactory(org.slf4j.LoggerFactory) Labels(org.apache.mesos.v1.Protos.Labels) SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) SingularityMesosImage(com.hubspot.mesos.SingularityMesosImage) CommandInfo(org.apache.mesos.v1.Protos.CommandInfo) Optional(com.google.common.base.Optional) Map(java.util.Map) NetworkInfo(org.apache.mesos.v1.Protos.NetworkInfo) SingularityDockerInfo(com.hubspot.mesos.SingularityDockerInfo) MesosProtosUtils(com.hubspot.singularity.helpers.MesosProtosUtils) Variable(org.apache.mesos.v1.Protos.Environment.Variable) Resources(com.hubspot.mesos.Resources) SingularityDockerNetworkType(com.hubspot.mesos.SingularityDockerNetworkType) SingularityPortMapping(com.hubspot.mesos.SingularityPortMapping) SingularityTaskId(com.hubspot.singularity.SingularityTaskId) SingularityDockerVolume(com.hubspot.mesos.SingularityDockerVolume) SingularityVolumeSource(com.hubspot.mesos.SingularityVolumeSource) Collectors(java.util.stream.Collectors) MesosInfo(org.apache.mesos.v1.Protos.ContainerInfo.MesosInfo) ExecutorID(org.apache.mesos.v1.Protos.ExecutorID) ExecutorDataBuilder(com.hubspot.deploy.ExecutorDataBuilder) ByteString(com.google.protobuf.ByteString) List(java.util.List) MesosUtils(com.hubspot.singularity.helpers.MesosUtils) SingularityDockerImage(com.hubspot.mesos.SingularityDockerImage) SingularityMesosInfo(com.hubspot.mesos.SingularityMesosInfo) Entry(java.util.Map.Entry) ContainerInfo(org.apache.mesos.v1.Protos.ContainerInfo) Image(org.apache.mesos.v1.Protos.Image) DockerInfo(org.apache.mesos.v1.Protos.ContainerInfo.DockerInfo) Supplier(com.google.common.base.Supplier) HashMap(java.util.HashMap) SingularityTaskExecutorData(com.hubspot.singularity.SingularityTaskExecutorData) Singleton(javax.inject.Singleton) ArrayList(java.util.ArrayList) Resource(org.apache.mesos.v1.Protos.Resource) Strings(com.google.common.base.Strings) SingularityDockerPortMapping(com.hubspot.mesos.SingularityDockerPortMapping) SingularityS3UploaderFile(com.hubspot.singularity.SingularityS3UploaderFile) ImmutableList(com.google.common.collect.ImmutableList) ExecutorIdGenerator(com.hubspot.singularity.data.ExecutorIdGenerator) Volume(org.apache.mesos.v1.Protos.Volume) URI(org.apache.mesos.v1.Protos.CommandInfo.URI) SingularityAppcImage(com.hubspot.mesos.SingularityAppcImage) SingularityConfiguration(com.hubspot.singularity.config.SingularityConfiguration) SingularityNetworkInfo(com.hubspot.mesos.SingularityNetworkInfo) Logger(org.slf4j.Logger) Parameters(org.apache.mesos.v1.Protos.Parameters) SingularityDockerParameter(com.hubspot.mesos.SingularityDockerParameter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Builder(org.apache.mesos.v1.Protos.Labels.Builder) Ints(com.google.common.primitives.Ints) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) Environment(org.apache.mesos.v1.Protos.Environment) SingularityMesosArtifact(com.hubspot.mesos.SingularityMesosArtifact) SingularityTaskRequest(com.hubspot.singularity.SingularityTaskRequest) SingularityVolume(com.hubspot.mesos.SingularityVolume) TaskID(org.apache.mesos.v1.Protos.TaskID) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) Collections(java.util.Collections) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel) Label(org.apache.mesos.v1.Protos.Label) ExecutorDataBuilder(com.hubspot.deploy.ExecutorDataBuilder) Builder(org.apache.mesos.v1.Protos.Labels.Builder) Resource(org.apache.mesos.v1.Protos.Resource) ArrayList(java.util.ArrayList) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel) Label(org.apache.mesos.v1.Protos.Label) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) ByteString(com.google.protobuf.ByteString) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) SingularityContainerInfo(com.hubspot.mesos.SingularityContainerInfo) SingularityTask(com.hubspot.singularity.SingularityTask) SingularityTaskId(com.hubspot.singularity.SingularityTaskId) SingularityMesosTaskLabel(com.hubspot.mesos.SingularityMesosTaskLabel)

Example 2 with TaskInfo

use of org.apache.mesos.v1.Protos.TaskInfo in project Singularity by HubSpot.

the class SingularitySchedulerTestBase method prepTask.

protected SingularityTask prepTask(SingularityRequest request, SingularityDeploy deploy, long launchTime, int instanceNo, boolean separateHosts, Optional<String> runId) {
    SingularityPendingTask pendingTask = buildPendingTask(request, deploy, launchTime, instanceNo, runId);
    SingularityTaskRequest taskRequest = new SingularityTaskRequest(request, deploy, pendingTask);
    Offer offer;
    if (separateHosts) {
        offer = createOffer(125, 1024, 2048, String.format("slave%s", instanceNo), String.format("host%s", instanceNo));
    } else {
        offer = createOffer(125, 1024, 2048);
    }
    SingularityTaskId taskId = new SingularityTaskId(request.getId(), deploy.getId(), launchTime, instanceNo, offer.getHostname(), "rack1");
    TaskID taskIdProto = TaskID.newBuilder().setValue(taskId.toString()).build();
    TaskInfo taskInfo = TaskInfo.newBuilder().setAgentId(offer.getAgentId()).setExecutor(ExecutorInfo.newBuilder().setExecutorId(ExecutorID.newBuilder().setValue("executorID"))).setTaskId(taskIdProto).setName("name").build();
    SingularityTask task = new SingularityTask(taskRequest, taskId, Collections.singletonList(mesosProtosUtils.offerFromProtos(offer)), mesosProtosUtils.taskFromProtos(taskInfo), Optional.of("rack1"));
    taskManager.savePendingTask(pendingTask);
    return task;
}
Also used : TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) TaskID(org.apache.mesos.v1.Protos.TaskID) SingularityTask(com.hubspot.singularity.SingularityTask) Offer(org.apache.mesos.v1.Protos.Offer) SingularityPendingTask(com.hubspot.singularity.SingularityPendingTask) SingularityTaskRequest(com.hubspot.singularity.SingularityTaskRequest) SingularityTaskId(com.hubspot.singularity.SingularityTaskId)

Example 3 with TaskInfo

use of org.apache.mesos.v1.Protos.TaskInfo in project Singularity by HubSpot.

the class SingularityMesosTaskBuilderTest method testEnvironmentVariableOverrides.

@Test
public void testEnvironmentVariableOverrides() {
    Map<String, String> overrideVariables = new HashMap<>();
    overrideVariables.put("MY_NEW_ENV_VAR", "test");
    overrideVariables.put("STARTED_BY_USER", "notTestUser");
    final SingularityRequest request = new SingularityRequestBuilder("test", RequestType.WORKER).build();
    final SingularityDeploy deploy = new SingularityDeployBuilder("test", "1").setCommand(Optional.of("/bin/echo hi")).build();
    final SingularityPendingTask pendingTask = new SingularityPendingTaskBuilder().setPendingTaskId(new SingularityPendingTaskId("test", "1", 0, 1, PendingType.IMMEDIATE, 0)).setUser(user).setEnvOverrides(overrideVariables).build();
    final SingularityTaskRequest taskRequest = new SingularityTaskRequest(request, deploy, pendingTask);
    final TaskInfo task = builder.buildTask(offerHolder, null, taskRequest, taskResources, executorResources).getMesosTask();
    Map<String, String> environmentVariables = task.getCommand().getEnvironment().getVariablesList().stream().collect(Collectors.toMap(Variable::getName, Variable::getValue));
    for (String key : overrideVariables.keySet()) {
        assertEquals("Environment variable " + key + " not overridden.", environmentVariables.get(key), overrideVariables.get(key));
    }
}
Also used : TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) SingularityRequestBuilder(com.hubspot.singularity.SingularityRequestBuilder) HashMap(java.util.HashMap) SingularityPendingTask(com.hubspot.singularity.SingularityPendingTask) SingularityRequest(com.hubspot.singularity.SingularityRequest) SingularityPendingTaskId(com.hubspot.singularity.SingularityPendingTaskId) SingularityDeployBuilder(com.hubspot.singularity.SingularityDeployBuilder) SingularityTaskRequest(com.hubspot.singularity.SingularityTaskRequest) SingularityDeploy(com.hubspot.singularity.SingularityDeploy) SingularityPendingTaskBuilder(com.hubspot.singularity.SingularityPendingTaskBuilder) Test(org.junit.Test)

Example 4 with TaskInfo

use of org.apache.mesos.v1.Protos.TaskInfo in project Singularity by HubSpot.

the class SingularityMesosTaskBuilder method prepareCustomExecutor.

/**
 * Prepares the Mesos TaskInfo object when using our custom SingularityExecutor.
 */
private void prepareCustomExecutor(final TaskInfo.Builder bldr, final SingularityTaskId taskId, final SingularityTaskRequest task, final SingularityOfferHolder offerHolder, final Optional<long[]> ports, final Resources desiredExecutorResources) {
    CommandInfo.Builder commandBuilder = CommandInfo.newBuilder().setValue(task.getDeploy().getCustomExecutorCmd().get());
    prepareEnvironment(task, taskId, commandBuilder, offerHolder, ports);
    if (task.getDeploy().getUser().isPresent()) {
        commandBuilder.setUser(task.getDeploy().getUser().get());
    }
    prepareMesosUriDownloads(task.getPendingTask().getExtraArtifacts(), commandBuilder);
    bldr.setExecutor(ExecutorInfo.newBuilder().setCommand(commandBuilder.build()).setExecutorId(ExecutorID.newBuilder().setValue(task.getDeploy().getCustomExecutorId().or(idGenerator.getNextExecutorId()))).setSource(// set source to taskId for use in statistics endpoint, TODO: remove
    task.getDeploy().getCustomExecutorSource().or(taskId.getId())).setLabels(Labels.newBuilder().addLabels(Label.newBuilder().setKey("taskId").setValue(taskId.getId()))).addAllResources(buildMesosResources(desiredExecutorResources, task.getRequest().getRequiredRole())).build());
    if (task.getDeploy().getExecutorData().isPresent()) {
        final ExecutorDataBuilder executorDataBldr = task.getDeploy().getExecutorData().get().toBuilder();
        String defaultS3Bucket = "";
        String s3UploaderKeyPattern = "";
        if (configuration.getS3ConfigurationOptional().isPresent()) {
            if (task.getRequest().getGroup().isPresent() && configuration.getS3ConfigurationOptional().get().getGroupOverrides().containsKey(task.getRequest().getGroup().get())) {
                defaultS3Bucket = configuration.getS3ConfigurationOptional().get().getGroupOverrides().get(task.getRequest().getGroup().get()).getS3Bucket();
                LOG.trace("Setting defaultS3Bucket to {} for task {} executorData", defaultS3Bucket, taskId.getId());
            } else {
                defaultS3Bucket = configuration.getS3ConfigurationOptional().get().getS3Bucket();
            }
            s3UploaderKeyPattern = configuration.getS3ConfigurationOptional().get().getS3KeyFormat();
        }
        if (task.getPendingTask().getCmdLineArgsList().isPresent() && !task.getPendingTask().getCmdLineArgsList().get().isEmpty()) {
            LOG.trace("Adding cmd line args {} to task {} executorData", task.getPendingTask().getCmdLineArgsList(), taskId.getId());
            final ImmutableList.Builder<String> extraCmdLineArgsBuilder = ImmutableList.builder();
            if (executorDataBldr.getExtraCmdLineArgs() != null && !executorDataBldr.getExtraCmdLineArgs().isEmpty()) {
                extraCmdLineArgsBuilder.addAll(executorDataBldr.getExtraCmdLineArgs());
            }
            extraCmdLineArgsBuilder.addAll(task.getPendingTask().getCmdLineArgsList().get());
            executorDataBldr.setExtraCmdLineArgs(extraCmdLineArgsBuilder.build());
        }
        List<SingularityS3UploaderFile> uploaderAdditionalFiles = new ArrayList<>();
        if (configuration.getS3ConfigurationOptional().isPresent()) {
            uploaderAdditionalFiles.addAll(configuration.getS3ConfigurationOptional().get().getS3UploaderAdditionalFiles());
        }
        uploaderAdditionalFiles.addAll(task.getPendingTask().getS3UploaderAdditionalFiles());
        Optional<String> maybeS3StorageClass = configuration.getS3ConfigurationOptional().isPresent() ? configuration.getS3ConfigurationOptional().get().getS3StorageClass() : Optional.<String>absent();
        Optional<Long> maybeApplyAfterBytes = configuration.getS3ConfigurationOptional().isPresent() ? configuration.getS3ConfigurationOptional().get().getApplyS3StorageClassAfterBytes() : Optional.<Long>absent();
        if (task.getPendingTask().getRunAsUserOverride().isPresent()) {
            executorDataBldr.setUser(task.getPendingTask().getRunAsUserOverride());
        }
        final SingularityTaskExecutorData executorData = new SingularityTaskExecutorData(executorDataBldr.build(), uploaderAdditionalFiles, defaultS3Bucket, s3UploaderKeyPattern, configuration.getCustomExecutorConfiguration().getServiceLog(), configuration.getCustomExecutorConfiguration().getServiceFinishedTailLog(), task.getRequest().getGroup(), maybeS3StorageClass, maybeApplyAfterBytes);
        try {
            bldr.setData(ByteString.copyFromUtf8(objectMapper.writeValueAsString(executorData)));
        } catch (JsonProcessingException e) {
            LOG.warn("Unable to process executor data {} for task {} as json (trying as string)", executorData, taskId.getId(), e);
            bldr.setData(ByteString.copyFromUtf8(executorData.toString()));
        }
    } else if (task.getDeploy().getCommand().isPresent()) {
        bldr.setData(ByteString.copyFromUtf8(task.getDeploy().getCommand().get()));
    }
}
Also used : ImmutableList(com.google.common.collect.ImmutableList) ArrayList(java.util.ArrayList) ByteString(com.google.protobuf.ByteString) ExecutorDataBuilder(com.hubspot.deploy.ExecutorDataBuilder) SingularityS3UploaderFile(com.hubspot.singularity.SingularityS3UploaderFile) SingularityTaskExecutorData(com.hubspot.singularity.SingularityTaskExecutorData) CommandInfo(org.apache.mesos.v1.Protos.CommandInfo) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException)

Example 5 with TaskInfo

use of org.apache.mesos.v1.Protos.TaskInfo in project Singularity by HubSpot.

the class SingularityOfferHolder method launchTasksAndGetUnusedOffers.

public List<Offer> launchTasksAndGetUnusedOffers(SingularityMesosSchedulerClient schedulerClient) {
    final List<TaskInfo> toLaunch = Lists.newArrayListWithCapacity(acceptedTasks.size());
    final List<SingularityTaskId> taskIds = Lists.newArrayListWithCapacity(acceptedTasks.size());
    for (SingularityMesosTaskHolder taskHolder : acceptedTasks) {
        taskIds.add(taskHolder.getTask().getTaskId());
        toLaunch.add(taskHolder.getMesosTask());
        LOG.debug("Launching {} with offer {}", taskHolder.getTask().getTaskId(), offers.get(0).getId());
        LOG.trace("Launching {} mesos task: {}", taskHolder.getTask().getTaskId(), MesosUtils.formatForLogging(taskHolder.getMesosTask()));
    }
    // At this point, `currentResources` contains a list of unused resources, because we subtracted out the required resources of every task we accepted.
    // Let's try and reclaim offers by trying to pull each offer's list of resources out of the combined pool of leftover resources.
    // n.b., This is currently not optimal. We just look through the offers in this instance and try to reclaim them with no particular priority or order.
    Map<Boolean, List<Offer>> partitionedOffers = offers.stream().collect(Collectors.partitioningBy(offer -> {
        List<Long> ports = MesosUtils.getAllPorts(offer.getResourcesList());
        boolean offerCanBeReclaimedFromUnusedResources = offer.getResourcesList().stream().collect(Collectors.groupingBy(Resource::getRole)).entrySet().stream().map((entry) -> {
            // Now, for each set of offer Resources grouped by role...
            String role = entry.getKey();
            List<Resource> offerResources = entry.getValue();
            Optional<String> maybeRole = (!role.equals("") && !role.equals("*")) ? Optional.of(role) : Optional.absent();
            // ...Check if we can pull the Resources belonging to this offer out of the pool of `currentResources`.
            return MesosUtils.doesOfferMatchResources(maybeRole, MesosUtils.buildResourcesFromMesosResourceList(offerResources, maybeRole), currentResources, ports);
        }).reduce(true, (x, y) -> x && y);
        if (offerCanBeReclaimedFromUnusedResources) {
            // We can reclaim this offer in its entirety! Pull all of its resources out of the combined pool for this SingularityOfferHolder instance.
            LOG.trace("Able to reclaim offer {} from unused resources in OfferHolder from host {}. cpu: {}, mem: {}, disk: {}", offer.getId().getValue(), offer.getHostname(), MesosUtils.getNumCpus(offer), MesosUtils.getMemory(offer), MesosUtils.getDisk(offer));
            currentResources = MesosUtils.subtractResources(currentResources, offer.getResourcesList());
        }
        return offerCanBeReclaimedFromUnusedResources;
    }));
    List<Offer> leftoverOffers = partitionedOffers.get(true);
    List<Offer> neededOffers = partitionedOffers.get(false);
    schedulerClient.accept(neededOffers.stream().map(Offer::getId).collect(Collectors.toList()), Collections.singletonList(Operation.newBuilder().setType(Type.LAUNCH).setLaunch(Launch.newBuilder().addAllTaskInfos(toLaunch).build()).build()));
    LOG.info("{} tasks ({}) launched", taskIds.size(), taskIds);
    return leftoverOffers;
}
Also used : Logger(org.slf4j.Logger) LoggerFactory(org.slf4j.LoggerFactory) Set(java.util.Set) Offer(org.apache.mesos.v1.Protos.Offer) Protos(org.apache.mesos.v1.Protos) Collectors(java.util.stream.Collectors) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) Objects(java.util.Objects) Resource(org.apache.mesos.v1.Protos.Resource) List(java.util.List) JavaUtils(com.hubspot.mesos.JavaUtils) Launch(org.apache.mesos.v1.Protos.Offer.Operation.Launch) Lists(com.google.common.collect.Lists) MesosUtils(com.hubspot.singularity.helpers.MesosUtils) Operation(org.apache.mesos.v1.Protos.Offer.Operation) Optional(com.google.common.base.Optional) Map(java.util.Map) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) Type(org.apache.mesos.v1.Protos.Offer.Operation.Type) Collections(java.util.Collections) SingularityTaskId(com.hubspot.singularity.SingularityTaskId) Resource(org.apache.mesos.v1.Protos.Resource) SingularityMesosTaskHolder(com.hubspot.singularity.helpers.SingularityMesosTaskHolder) TaskInfo(org.apache.mesos.v1.Protos.TaskInfo) Offer(org.apache.mesos.v1.Protos.Offer) List(java.util.List) SingularityTaskId(com.hubspot.singularity.SingularityTaskId)

Aggregations

SingularityTaskId (com.hubspot.singularity.SingularityTaskId)3 SingularityTaskRequest (com.hubspot.singularity.SingularityTaskRequest)3 TaskInfo (org.apache.mesos.v1.Protos.TaskInfo)3 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 Optional (com.google.common.base.Optional)2 ImmutableList (com.google.common.collect.ImmutableList)2 ByteString (com.google.protobuf.ByteString)2 ExecutorDataBuilder (com.hubspot.deploy.ExecutorDataBuilder)2 SingularityPendingTask (com.hubspot.singularity.SingularityPendingTask)2 SingularityS3UploaderFile (com.hubspot.singularity.SingularityS3UploaderFile)2 SingularityTask (com.hubspot.singularity.SingularityTask)2 SingularityTaskExecutorData (com.hubspot.singularity.SingularityTaskExecutorData)2 MesosUtils (com.hubspot.singularity.helpers.MesosUtils)2 SingularityMesosTaskHolder (com.hubspot.singularity.helpers.SingularityMesosTaskHolder)2 ArrayList (java.util.ArrayList)2 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 Offer (org.apache.mesos.v1.Protos.Offer)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Strings (com.google.common.base.Strings)1