public static String getDataCenterFromRack(String rack) {
	if (rack != null) {
	    return rack.substring(0, rack.length() - 1);
	}
	return null;
    }
public static String getDataCenterFromRack ( String rack ) { if ( rack != null ) { return rack . substring ( 0 , rack . length ( ) - 1 ) ; } return null ; }
Datacenter format us-east-x, us-west-x etc.
@param rack
@return the datacenter based on the provided rack