Skip to content

Commit

Permalink
chore(spanner): Update instance region (#3228)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshachinta authored Aug 6, 2024
1 parent 8eee15d commit bb9f8ee
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected void after() {
private void initializeInstance(InstanceId instanceId) throws Exception {
InstanceConfig instanceConfig;
try {
instanceConfig = instanceAdminClient.getInstanceConfig("regional-us-central1");
instanceConfig = instanceAdminClient.getInstanceConfig("regional-us-east4");
} catch (Throwable ignore) {
instanceConfig =
Iterators.get(instanceAdminClient.listInstanceConfigs().iterateAll().iterator(), 0, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void createTestInstance(

InstanceInfo instanceInfo =
InstanceInfo.newBuilder(InstanceId.of(projectId, instanceId))
.setInstanceConfigId(InstanceConfigId.of(projectId, "regional-us-central1"))
.setInstanceConfigId(InstanceConfigId.of(projectId, "regional-us-east4"))
.setNodeCount(1)
.setDisplayName(instanceId)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ static void createInstance(String projectId, String instanceId) {
.setDisplayName(displayName)
.setNodeCount(nodeCount)
.setConfig(
InstanceConfigName.of(projectId, "regional-us-central1").toString())
InstanceConfigName.of(projectId, "regional-us-east4").toString())
.build();

try (Spanner spanner =
SpannerOptions.newBuilder()
.setProjectId(projectId)
Expand All @@ -74,4 +74,4 @@ static void createInstance(String projectId, String instanceId) {
}
}
}
//[END spanner_create_instance]
//[END spanner_create_instance]
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static void createInstance(String projectId, String instanceId) {
.getService();
InstanceAdminClient instanceAdminClient = spanner.createInstanceAdminClient()) {
// Set Instance configuration.
String configId = "regional-us-central1";
String configId = "regional-us-east4";
String displayName = "Descriptive name";

// Create an autoscaling config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void createInstance(String projectId, String instanceId) {
InstanceAdminClient instanceAdminClient = spanner.createInstanceAdminClient()) {

// Set Instance configuration.
String configId = "regional-us-central1";
String configId = "regional-us-east4";
// This will create an instance with the processing power of 0.2 nodes.
int processingUnits = 500;
String displayName = "Descriptive name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void createInstance(String projectId, String instanceId) {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();

// Set Instance configuration.
String configId = "regional-us-central1";
String configId = "regional-us-east4";
int nodeCount = 2;
String displayName = "Descriptive name";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void createInstance(String projectId, String instanceId) {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();

// Set Instance configuration.
String configId = "regional-us-central1";
String configId = "regional-us-east4";
// Create an autoscaling config.
AutoscalingConfig autoscalingConfig =
AutoscalingConfig.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void createInstance(String projectId, String instanceId) {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();

// Set Instance configuration.
String configId = "regional-us-central1";
String configId = "regional-us-east4";
// This will create an instance with the processing power of 0.2 nodes.
int processingUnits = 500;
String displayName = "Descriptive name";
Expand Down

0 comments on commit bb9f8ee

Please sign in to comment.