public static String propertiesToString(Map<String, String> properties, Set<String> exclude) {
    if (properties.isEmpty()) {
      return "";
    }

    SortedMap<String, String> sortedProperties = new TreeMap<>(properties);
    List<String> realProps = new ArrayList<>();
    for (Map.Entry<String, String> e : sortedProperties.entrySet()) {
      if (e.getValue() != null && !exclude.contains(e.getKey())) {
        realProps.add("  '" + e.getKey() + "'='" + HiveStringUtils.escapeHiveCommand(e.getValue()) + "'");
      }
    }
    return String.join(", \n", realProps);
  }
Creates a String from the properties in this format:
   'property_name1'='property_value1',
   'property_name2'='property_value2',
   ...

Properties are listed in alphabetical order.

@param properties The properties to list.
@param exclude Property names to exclude.
ql/src/java/org/apache/hadoop/hive/ql/ddl/ShowUtils.java