public static String getClusterForLocation ( URI location ) { Matcher matcher = getLocatorMatcher ( location ) ; checkArgument ( matcher . matches ( ) , "Invalid location: %s" , location ) ; final String clusterPrefix ; if ( matcher . group ( "universe" ) != null ) { clusterPrefix = matcher . group ( "universe" ) ; } else { clusterPrefix = "local" ; } String group = Objects . firstNonNull ( matcher . group ( "group" ) , DEFAULT_GROUP ) ; return format ( "%s_%s" , clusterPrefix , group ) ; }
Returns the EmoDB cluster name associated with the given location .