public static String extractFirstRdn(String dn) {
    return dn.substring(0, dn.indexOf(","));
  }
Extracts the first Relative Distinguished Name (RDN).
<br>
<b>Example:</b>
<br>
For DN "cn=user1,ou=CORP,dc=mycompany,dc=com" this method will return "cn=user1"
@param dn distinguished name
@return first RDN
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ldap/LdapUtils.java