Tabnine Logo
Protos$Offer.getAgentId
Code IndexAdd Tabnine to your IDE (free)

How to use
getAgentId
method
in
org.apache.mesos.v1.Protos$Offer

Best Java code snippets using org.apache.mesos.v1.Protos$Offer.getAgentId (Showing top 13 results out of 315)

origin: HubSpot/Singularity

public CheckResult checkOffer(Offer offer) {
 final String slaveId = offer.getAgentId().getValue();
 final String rackId = slaveAndRackHelper.getRackIdOrDefault(offer);
 final String host = slaveAndRackHelper.getMaybeTruncatedHost(offer);
 final Map<String, String> textAttributes = slaveAndRackHelper.getTextAttributes(offer);
 final SingularitySlave slave = new SingularitySlave(slaveId, host, rackId, textAttributes, Optional.absent());
 CheckResult result = check(slave, slaveManager);
 if (result == CheckResult.NEW) {
  if (inactiveSlaveManager.isInactive(slave.getHost())) {
   LOG.info("Slave {} on inactive host {} attempted to rejoin. Marking as decommissioned.", slave, host);
   slaveManager.changeState(slave, MachineState.STARTING_DECOMMISSION,
     Optional.of(String.format("Slave %s on inactive host %s attempted to rejoin cluster.", slaveId, host)),
     Optional.absent());
  } else {
   LOG.info("Offer revealed a new slave {}", slave);
  }
 }
 final SingularityRack rack = new SingularityRack(rackId);
 if (check(rack, rackManager) == CheckResult.NEW) {
  LOG.info("Offer revealed a new rack {}", rack);
 }
 return result;
}
origin: HubSpot/Singularity

LOG.debug("Received offer ID {} with roles {} from {} ({}) for {} cpu(s), {} memory, {} ports, and {} disk", offer.getId().getValue(), rolesInfo, offer.getHostname(), offer.getAgentId().getValue(), MesosUtils.getNumCpus(offer), MesosUtils.getMemory(offer),
  MesosUtils.getNumPorts(offer), MesosUtils.getDisk(offer));
origin: HubSpot/Singularity

.collect(Collectors.groupingBy((o) -> o.getAgentId().getValue()))
.entrySet().stream()
.filter((e) -> e.getValue().size() > 0)
origin: com.hubspot/SingularityService

.collect(Collectors.groupingBy((o) -> o.getAgentId().getValue()))
.entrySet().stream()
.filter((e) -> e.getValue().size() > 0)
origin: com.hubspot/SingularityService

LOG.debug("Received offer ID {} with roles {} from {} ({}) for {} cpu(s), {} memory, {} ports, and {} disk", offer.getId().getValue(), rolesInfo, offer.getHostname(), offer.getAgentId().getValue(), MesosUtils.getNumCpus(offer), MesosUtils.getMemory(offer),
  MesosUtils.getNumPorts(offer), MesosUtils.getDisk(offer));
origin: com.hubspot/SingularityService

bldr.addResources(MesosUtils.getDiskResource(desiredTaskResources.getDiskMb(), requiredRole));
bldr.setAgentId(offerHolder.getOffers().get(0).getAgentId());
origin: mesosphere/mesos-rxjava

final AgentID agentId = offer.getAgentId();
final List<OfferID> ids = newArrayList(offer.getId());
origin: com.hubspot/SingularityService

1,
"DEFAULT",
offer.getAgentId().getValue(),
offer.getHostname(),
Collections.emptyMap(),
origin: com.hubspot/SingularityService

public CheckResult checkOffer(Offer offer) {
 final String slaveId = offer.getAgentId().getValue();
 final String rackId = slaveAndRackHelper.getRackIdOrDefault(offer);
 final String host = slaveAndRackHelper.getMaybeTruncatedHost(offer);
 final Map<String, String> textAttributes = slaveAndRackHelper.getTextAttributes(offer);
 final SingularitySlave slave = new SingularitySlave(slaveId, host, rackId, textAttributes, Optional.absent());
 CheckResult result = check(slave, slaveManager);
 if (result == CheckResult.NEW) {
  if (inactiveSlaveManager.isInactive(slave.getHost())) {
   LOG.info("Slave {} on inactive host {} attempted to rejoin. Marking as decommissioned.", slave, host);
   slaveManager.changeState(slave, MachineState.STARTING_DECOMMISSION,
     Optional.of(String.format("Slave %s on inactive host %s attempted to rejoin cluster.", slaveId, host)),
     Optional.absent());
  } else {
   LOG.info("Offer revealed a new slave {}", slave);
  }
 }
 final SingularityRack rack = new SingularityRack(rackId);
 if (check(rack, rackManager) == CheckResult.NEW) {
  LOG.info("Offer revealed a new rack {}", rack);
 }
 return result;
}
origin: com.hubspot/SingularityService

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;
}
origin: HubSpot/Singularity

bldr.addResources(MesosUtils.getDiskResource(desiredTaskResources.getDiskMb(), requiredRole));
bldr.setAgentId(offerHolder.getOffers().get(0).getAgentId());
origin: HubSpot/Singularity

1,
"DEFAULT",
offer.getAgentId().getValue(),
offer.getHostname(),
Collections.emptyMap(),
origin: HubSpot/Singularity

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;
}
org.apache.mesos.v1Protos$OffergetAgentId

Popular methods of Protos$Offer

  • getId
  • getResourcesList
  • getHostname
  • newBuilder
  • getAttributesList
  • getDefaultInstance
  • isInitialized

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now