<p>Create and configure a new {@link org.apache.hadoop.conf.Configuration}.</p>

@param projectId a {@link java.lang.String} object.
@param instanceId a {@link java.lang.String} object.
@return a {@link org.apache.hadoop.conf.Configuration} object.
763454
public static Configuration configure(String projectId, String instanceId) {
    Configuration config = new Configuration(false);
    return configure(config, projectId, instanceId);
  }
625255
public MemberConfig setId(MemberId id) {
    this.id = id != null ? id : MemberId.anonymous();
    return this;
  }
348805
Configuration copyWithIdentifier(String identifier) {
		return new Configuration(details.builder().identifier(identifier).build(), new HashMap<>(config));
	}
134623
public MemberConfig setId(String id) {
    return setId(id != null ? MemberId.from(id) : null);
  }
831431
@SuppressWarnings("unchecked")
    public static Map component_conf(TopologyContext topology_context, String component_id) {
        Map<Object, Object> componentConf = new HashMap<>();
        String jconf = topology_context.getComponentCommon(component_id).get_json_conf();
        if (jconf != null) {
            componentConf = (Map<Object, Object>) JStormUtils.from_json(jconf);
        }

        return componentConf;
    }
799902
public List<Database> listDatabases(String instanceId) {
    // [START listDatabases]
    Page<Database> page = dbAdminClient.listDatabases(instanceId, Options.pageSize(1));
    List<Database> dbs = new ArrayList<>();
    while (page != null) {
      Database db = Iterables.getOnlyElement(page.getValues());
      dbs.add(db);
      page = page.getNextPage();
    }
    // [END listDatabases]
    return dbs;
  }
17089
@SuppressWarnings("WeakerAccess")
  public Cluster resizeCluster(String instanceId, String clusterId, int numServeNodes) {
    return ApiExceptions.callAndTranslateApiException(
        resizeClusterAsync(instanceId, clusterId, numServeNodes));
  }
1366263
public InstanceConfig getInstanceConfig(final String my_config_id) {
    // [START instance_admin_client_get_instance_config]
    final String configId = my_config_id;
    InstanceConfig instanceConfig = instanceAdminClient.getInstanceConfig(configId);
    // [END instance_admin_client_get_instance_config]
    return instanceConfig;
  }
214321
protected CompletableFuture<JsonObjectBuilder> makeBuilder(int instanceId) {
    CompletableFuture<T> futureValue = getValue();

    if (futureValue == null) {
      logger.error("Could not retrieve value " + this.getClass().getName());
      return null;
    }

    return futureValue
        .exceptionally(
            t -> {
              logger.error("Could not retrieve value " + this.getClass().getName(), t);
              return null;
            })
        .thenApply(
            value -> {
              JsonArrayBuilder perms = Json.createArrayBuilder();
              if (isWritable) {
                perms.add("pw");
              }
              if (isReadable) {
                perms.add("pr");
              }
              if (isEventable) {
                perms.add("ev");
              }
              JsonObjectBuilder builder =
                  Json.createObjectBuilder()
                      .add("iid", instanceId)
                      .add("type", shortType)
                      .add("perms", perms.build())
                      .add("format", format)
                      .add("ev", false)
                      .add("description", description);
              setJsonValue(builder, value);
              return builder;
            });
  }
711188
void setInstanceId(String instanceId) throws IllegalArgumentException {
        if (instanceId != null && !"".equals(instanceId)) {

            subInstanceId = getSubProcessInstanceId(instanceId);

            try {
                long id = getProcessInstanceId(instanceId);
                mainInstanceId = id < 0 ? null : new Date(id);
            } catch (NumberFormatException nfe) {
                throw new IllegalArgumentException(getLocalizedString("LVM_ERROR_INSTANCEID"), nfe);
            }
        }
    }
1112039
public void add(String instanceId) {
		ScheduledFuture task = this.scheduler.scheduleAtFixedRate(
				new ConsulHeartbeatTask(instanceId), this.configuration
						.computeHearbeatInterval().toStandardDuration().getMillis());
		ScheduledFuture previousTask = this.serviceHeartbeats.put(instanceId, task);
		if (previousTask != null) {
			previousTask.cancel(true);
		}
	}
303036
public static void main(String[] args) {
    System.exit(getConf(
        ClientContext.create(new InstancedConfiguration(ConfigurationUtils.defaults())), args));
  }
1246491
def _configure_project(config):
    
    project_id = config["provider"].get("project_id")
    assert config["provider"]["project_id"] is not None, (
        "'project_id' must be set in the 'provider' section of the autoscaler"
        " config. Notice that the project id must be globally unique.")
    project = _get_project(project_id)

    if project is None:
        #  Project not found, try creating it
        _create_project(project_id)
        project = _get_project(project_id)

    assert project is not None, "Failed to create project"
    assert project["lifecycleState"] == "ACTIVE", (
        "Project status needs to be ACTIVE, got {}".format(
            project["lifecycleState"]))

    config["provider"]["project_id"] = project["projectId"]

    return config
1137142
public static DatabaseId of(String project, String instance, String database) {
    return new DatabaseId(new InstanceId(project, instance), database);
  }
1106959
public static BigtableInstanceAdminClient create(
      @Nonnull String projectId, @Nonnull BigtableInstanceAdminStub stub) {
    return new BigtableInstanceAdminClient(projectId, stub);
  }
1100370
public static RequestContext create(String projectId, String instanceId, String appProfileId) {
    return new AutoValue_RequestContext(projectId, instanceId, appProfileId);
  }
128812
public static String javaOptStringFromHadoopConfiguration(Configuration conf, String key) {
    String value = conf.get(key);
    if (value == null) {
      throw new RuntimeException(
          String.format("Cannot find property [%s], in Hadoop configuration: [%s]",
              key, value));
    }
    return String.format("-D%s=%s", key, value);
  }