private static String patternToBaseDn(String pattern) {
    if (pattern.contains("=%s")) {
      return pattern.split(",", 2)[1];
    }
    return pattern;
  }
Reads and parses DN patterns from Hive configuration.
<br>
If no patterns are provided in the configuration, then the base DN will be used.
@param conf Hive configuration
@param var variable to be read
@return a list of DN patterns
@see HiveConf.ConfVars#HIVE_SERVER2_PLAIN_LDAP_BASEDN
@see HiveConf.ConfVars#HIVE_SERVER2_PLAIN_LDAP_GUIDKEY
@see HiveConf.ConfVars#HIVE_SERVER2_PLAIN_LDAP_GROUPDNPATTERN
@see HiveConf.ConfVars#HIVE_SERVER2_PLAIN_LDAP_USERDNPATTERN
service/src/java/org/apache/hive/service/auth/ldap/LdapUtils.java