fix indentation

This commit is contained in:
Brandon Williams 2014-05-03 12:44:02 -05:00
parent af96d405b4
commit aa2b769aac
1 changed files with 4 additions and 4 deletions

View File

@ -53,15 +53,15 @@ public class GoogleCloudSnitch extends AbstractNetworkTopologySnitch
public GoogleCloudSnitch() throws IOException, ConfigurationException
{
String response = gceApiCall(ZONE_NAME_QUERY_URL);
String[] splits = response.split("/");
String az = splits[splits.length - 1];
String[] splits = response.split("/");
String az = splits[splits.length - 1];
// Split "us-central1-a" or "asia-east1-a" into "us-central1"/"a" and "asia-east1"/"a".
splits = az.split("-");
gceZone = splits[splits.length - 1];
int lastRegionIndex = az.lastIndexOf("-");
gceRegion = az.substring(0, lastRegionIndex);
int lastRegionIndex = az.lastIndexOf("-");
gceRegion = az.substring(0, lastRegionIndex);
String datacenterSuffix = (new SnitchProperties()).get("dc_suffix", "");
gceRegion = gceRegion.concat(datacenterSuffix);