Skip to content

Commit

Permalink
fix update number of bigtable nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Gruener authored and nevillelyh committed Oct 23, 2016
1 parent 17ddfc2 commit 282b725
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ public static void updateNumberOfBigtableNodes(final CloudBigtableConfiguration
cloudBigtableConfiguration.getInstanceId());

for (Cluster cluster : clusterUtilities.getClusters().getClustersList()) {
clusterUtilities.setClusterSize(cluster.getName(), cluster.getLocation(), numberOfNodes);
final String clusterId = extractAfterSlash(cluster.getName());
final String zoneId = extractAfterSlash(cluster.getLocation());
clusterUtilities.setClusterSize(clusterId, zoneId, numberOfNodes);
}
Thread.sleep(sleepDuration.getMillis());
}

private static String extractAfterSlash(final String path) {
return path.substring(path.lastIndexOf("/") + 1);
}
}

0 comments on commit 282b725

Please sign in to comment.