public static HiveObjectType getThriftHiveObjType(HivePrivilegeObjectType type) throws HiveException {
    if (type == null) {
      return null;
    }
    switch(type){
    case GLOBAL:
      return HiveObjectType.GLOBAL;
    case DATABASE:
      return HiveObjectType.DATABASE;
    case TABLE_OR_VIEW:
      return HiveObjectType.TABLE;
    case PARTITION:
      return HiveObjectType.PARTITION;
    case COLUMN:
      return HiveObjectType.COLUMN;
    case DATACONNECTOR:
      return HiveObjectType.DATACONNECTOR;
    default:
      throw new HiveException("Unsupported type " + type);
    }
  }
Convert plugin privilege object type to thrift type
@param type
@return
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java