public static PrincipalType getThriftPrincipalType(HivePrincipalType type) {
    if(type == null){
      return null;
    }
    switch(type){
    case USER:
      return PrincipalType.USER;
    case GROUP:
      return PrincipalType.GROUP;
    case ROLE:
      return PrincipalType.ROLE;
    default:
      throw new AssertionError("Invalid principal type " + type);
    }
  }
Convert authorization plugin principal type to thrift principal type
@param type
@return
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java