Tabnine Logo
com.yahoo.config.provision
Code IndexAdd Tabnine to your IDE (free)

How to use com.yahoo.config.provision

Best Java code snippets using com.yahoo.config.provision (Showing top 20 results out of 315)

origin: com.yahoo.vespa/config-provisioning

@Override
public int compareTo(ApplicationId other) {
  int diff;
  diff = tenant.compareTo(other.tenant);
  if (diff != 0) { return diff; }
  diff = application.compareTo(other.application);
  if (diff != 0) { return diff; }
  diff = instance.compareTo(other.instance);
  if (diff != 0) { return diff; }
  return 0;
}
origin: com.yahoo.vespa/config-provisioning

/** Returns an application id where all fields are "default" */
public static ApplicationId defaultId() {
  return new ApplicationId(TenantName.defaultName(), ApplicationName.defaultName(), InstanceName.defaultName());
}
origin: com.yahoo.vespa/config-provisioning

public String toShortString() {
  return tenant().value() + "." + application().value() +
      ( instance().isDefault() ? "" : "." + instance().value() );
}
origin: com.yahoo.vespa/config-model

private SentinelConfig.Application.Builder getApplicationConfig() {
  SentinelConfig.Application.Builder builder = new SentinelConfig.Application.Builder();
  builder.tenant(applicationId.tenant().value());
  builder.name(applicationId.application().value());
  builder.environment(zone.environment().value());
  builder.region(zone.region().value());
  builder.instance(applicationId.instance().value());
  return builder;
}
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());
}
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/config-model

  private String getConfigserverIdentityName() {
    return String.format("%s.provider_%s_%s",
               zone.system() == SystemName.main ? "vespa.vespa" : "vespa.vespa.cd",
               zone.environment().value(),
               zone.region().value());
  }
}
origin: com.yahoo.vespa/node-repository

private ApplicationId applicationIdFromSlime(Inspector object) {
  return ApplicationId.from(TenantName.from(object.field(tenantIdKey).asString()),
               ApplicationName.from(object.field(applicationIdKey).asString()),
               InstanceName.from(object.field(instanceIdKey).asString()));
}
origin: com.yahoo.vespa/config-provisioning

public static ApplicationId from(String tenant, String application, String instance) {
  return new ApplicationId(TenantName.from(tenant), ApplicationName.from(application), InstanceName.from(instance));
}
origin: com.yahoo.vespa/config-provisioning

/** Do not use */
public static Zone defaultZone() {
  return new Zone(SystemName.defaultSystem(), Environment.defaultEnvironment(), RegionName.defaultName());
}
origin: com.yahoo.vespa/config-model

private static int compareClusters(ClusterMembership cluster1, ClusterMembership cluster2) {
  // This depends on the declared order of enum constants.
  return cluster2.cluster().type().compareTo(cluster1.cluster().type());
}
origin: com.yahoo.vespa/node-repository

/** Returns whether to reboot node as part of transition to given state. This is done to get rid of any lingering
 * unwanted state (e.g. processes) on non-host nodes. */
private boolean rebootOnTransitionTo(Node.State state, Node node) {
  if (node.type().isDockerHost()) return false; // Reboot of host nodes is handled by NodeRebooter
  if (zone.environment().isTest()) return false; // We want to reuse nodes quickly in test environments
  return node.state() != Node.State.dirty && state == Node.State.dirty;
}
origin: com.yahoo.vespa/config-provisioning

/** Returns whether this is equal, disregarding the group value and wanted Vespa version */
public boolean equalsIgnoringGroupAndVespaVersion(Object o) {
  if (o == this) return true;
  if ( ! (o instanceof ClusterSpec)) return false;
  ClusterSpec other = (ClusterSpec)o;
  if ( ! other.type.equals(this.type)) return false;
  if ( ! other.id.equals(this.id)) return false;
  return true;
}
origin: com.yahoo.vespa/config-provisioning

@Override
public boolean equals(Object other) {
  if (this == other) return true;
  if (other == null || getClass() != other.getClass()) return false;
  ApplicationId rhs = (ApplicationId) other;
  return tenant.equals(rhs.tenant) &&
      application.equals(rhs.application) &&
      instance.equals(rhs.instance);
}
origin: com.yahoo.vespa/config-provisioning

public Builder() {
  this.tenant = TenantName.defaultName();
  this.application = null;
  this.instance = InstanceName.defaultName();
}
origin: com.yahoo.vespa/controller-api

public String dottedString() {
  return unCapitalize(applicationId().tenant().value()) + "."
      + unCapitalize(applicationId().application().value()) + "."
      + unCapitalize(zoneId.environment().value()) + "."
      + unCapitalize(zoneId.region().value()) + "."
      + unCapitalize(applicationId.instance().value());
}
origin: com.yahoo.vespa/controller-api

/** Creates a new TesterId for a tester of the given application. */
public static TesterId of(ApplicationId id) {
  return new TesterId(ApplicationId.from(id.tenant().value(),
                      id.application().value(),
                      id.instance().value() + suffix));
}
origin: com.yahoo.vespa/config-model

/**
 * Returns a config server config containing the right zone settings (and defaults for the rest).
 * This is useful to allow applications to find out in which zone they are runnung by having the Zone
 * object (which is constructed from this config) injected.
 */
@Override
public void getConfig(ConfigserverConfig.Builder builder) {
  builder.system(zone.system().name());
  builder.environment(zone.environment().value());
  builder.region(zone.region().value());
}
origin: com.yahoo.vespa/config-model

@Override
public void getConfig(ApplicationIdConfig.Builder builder) {
  builder.tenant(applicationId.tenant().value());
  builder.application(applicationId.application().value());
  builder.instance(applicationId.instance().value());
}
origin: com.yahoo.vespa/node-repository

private void toSlime(ApplicationId id, Cursor object) {
  object.setString("tenant", id.tenant().value());
  object.setString("application", id.application().value());
  object.setString("instance", id.instance().value());
}
com.yahoo.config.provision

Most used classes

  • ApplicationId
    A complete, immutable identification of an application instance.
  • Environment
    Environments in hosted Vespa.
  • ApplicationName
    Represents an applications name, which may be any kind of string or default. This type is defined in
  • InstanceName
    Represents an applications instance name, which may be any kind of string or default. This type is d
  • RegionName
    Represents an applications region, which may be any kind of string or default. This type is defined
  • Zone,
  • Capacity,
  • ClusterMembership,
  • ClusterSpec$Group,
  • ClusterSpec$Id,
  • ClusterSpec$Type,
  • ClusterSpec,
  • Flavor$Type,
  • Flavor,
  • HostName,
  • HostSpec,
  • NodeType,
  • RotationName,
  • AllocatedHosts
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