private static String partitionSpecToName(Map<String,String> spec){
  StringBuilder sb=new StringBuilder();
  for (  Map.Entry<String,String> entry : spec.entrySet()) {
    if (sb.length() != 0) {
      sb.append("/");
    }
    sb.append(entry.getKey() + "=" + entry.getValue());
  }
  return sb.toString();
}

private static String partitionSpecToName ( Map < String , String > spec ) { StringBuilder sb = new StringBuilder ( ) ; for ( Map . Entry < String , String > entry : spec . entrySet ( ) ) { if ( sb . length ( ) != 0 ) { sb . append ( "/" ) ; } sb . append ( entry . getKey ( ) + "=" + entry . getValue ( ) ) ; } return sb . toString ( ) ; }
converts a map of partition key - value pairs to a name . note that special characters are not escaped unlike in production , and the order of the key is dictated by the iteration order for the map .
