public static HivePrincipal getHivePrincipal(String name, PrincipalType type) throws HiveException {
    return new HivePrincipal(name, AuthorizationUtils.getHivePrincipalType(type));
  }
Convert thrift object type to hive authorization plugin object type
@param type - thrift object type
@return
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java