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

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

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

origin: HubSpot/Singularity

public Optional<String> getRackId(Offer offer) {
 for (Attribute attribute : offer.getAttributesList()) {
  if (attribute.getName().equals(rackIdAttributeKey)) {
   return Optional.of(attribute.getText().getValue());
  }
 }
 return Optional.absent();
}
origin: HubSpot/Singularity

public Map<String, String> getTextAttributes(Offer offer) {
 Map<String, String> textAttributes = new HashMap<>();
 for (Attribute attribute : offer.getAttributesList()) {
  if (!attribute.getName().equals(rackIdAttributeKey)) {
   if (attribute.hasText()) {
    textAttributes.put(attribute.getName(), attribute.getText().getValue());
   } else if (attribute.hasScalar()) {
    textAttributes.put(attribute.getName(), Double.toString(attribute.getScalar().getValue()));
   } else if (attribute.hasRanges()) {
    textAttributes.put(attribute.getName(), attribute.getRanges().getRangeList().toString());
   }
  }
 }
 return textAttributes;
}
origin: com.hubspot/SingularityService

public Optional<String> getRackId(Offer offer) {
 for (Attribute attribute : offer.getAttributesList()) {
  if (attribute.getName().equals(rackIdAttributeKey)) {
   return Optional.of(attribute.getText().getValue());
  }
 }
 return Optional.absent();
}
origin: com.hubspot/SingularityService

public Map<String, String> getTextAttributes(Offer offer) {
 Map<String, String> textAttributes = new HashMap<>();
 for (Attribute attribute : offer.getAttributesList()) {
  if (!attribute.getName().equals(rackIdAttributeKey)) {
   if (attribute.hasText()) {
    textAttributes.put(attribute.getName(), attribute.getText().getValue());
   } else if (attribute.hasScalar()) {
    textAttributes.put(attribute.getName(), Double.toString(attribute.getScalar().getValue()));
   } else if (attribute.hasRanges()) {
    textAttributes.put(attribute.getName(), attribute.getRanges().getRangeList().toString());
   }
  }
 }
 return textAttributes;
}
org.apache.mesos.v1Protos$OffergetAttributesList

Popular methods of Protos$Offer

  • getAgentId
  • getId
  • getResourcesList
  • getHostname
  • newBuilder
  • getDefaultInstance
  • isInitialized

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ImageIO (javax.imageio)
  • JComboBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top Vim 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