Tabnine Logo
ClusterSpec$Group.index
Code IndexAdd Tabnine to your IDE (free)

How to use
index
method
in
com.yahoo.config.provision.ClusterSpec$Group

Best Java code snippets using com.yahoo.config.provision.ClusterSpec$Group.index (Showing top 5 results out of 315)

origin: com.yahoo.vespa/node-repository

/** Move nodes from unwanted groups to wanted groups to avoid lingering groups consisting of retired nodes */
private void moveToActiveGroup(List<Node> surplusNodes, int wantedGroups, Optional<ClusterSpec.Group> targetGroup) {
  for (ListIterator<Node> i = surplusNodes.listIterator(); i.hasNext(); ) {
    Node node = i.next();
    ClusterMembership membership = node.allocation().get().membership();
    ClusterSpec cluster = membership.cluster();
    if (cluster.group().get().index() >= wantedGroups) {
      ClusterSpec.Group newGroup = targetGroup.orElse(ClusterSpec.Group.from(0));
      ClusterMembership newGroupMembership = membership.with(cluster.with(Optional.of(newGroup)));
      i.set(node.with(node.allocation().get().with(newGroupMembership)));
    }
  }
}
origin: com.yahoo.vespa/config-model

String groupIndex = String.valueOf(hostGroup.getKey().get().index());
StorageGroup subgroup = new StorageGroup(owner, groupIndex, groupIndex);
for (Map.Entry<HostResource, ClusterMembership> host : hostGroup.getValue().entrySet()) {
origin: com.yahoo.vespa/node-repository

/**
 * Returns a list of the nodes which are
 * in groups with index number above or equal the group count
 */
private List<Node> findNodesInRemovableGroups(ApplicationId application, ClusterSpec requestedCluster, int wantedGroups) {
  List<Node> surplusNodes = new ArrayList<>(0);
  for (Node node : nodeRepository.getNodes(application, Node.State.active)) {
    ClusterSpec nodeCluster = node.allocation().get().membership().cluster();
    if ( ! nodeCluster.id().equals(requestedCluster.id())) continue;
    if ( ! nodeCluster.type().equals(requestedCluster.type())) continue;
    if (nodeCluster.group().get().index() >= wantedGroups)
      surplusNodes.add(node);
  }
  return surplusNodes;
}

origin: com.yahoo.vespa/config-provisioning

protected String toStringValue() {
  return cluster.type().name() +
      "/" + cluster.id().value() +
      (cluster.group().isPresent() ? "/" + cluster.group().get().index() : "") +
      "/" + index +
      ( cluster.isExclusive() ? "/exclusive" : "") +
      ( retired ? "/retired" : "") +
      ( !cluster.rotations().isEmpty() ? "/" + rotationsAsString(cluster.rotations()) : "");
}
origin: com.yahoo.vespa/node-repository

private void toSlime(ClusterMembership membership, Cursor object) {
  object.setString("clustertype", membership.cluster().type().name());
  object.setString("clusterid", membership.cluster().id().value());
  object.setString("group", String.valueOf(membership.cluster().group().get().index()));
  object.setLong("index", membership.index());
  object.setBool("retired", membership.retired());
}
com.yahoo.config.provisionClusterSpec$Groupindex

Popular methods of ClusterSpec$Group

  • from
  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JTable (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ 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