public static HivePrivObjectActionType getActionType(Entity privObject) {
    HivePrivObjectActionType actionType = HivePrivObjectActionType.OTHER;
    if (privObject instanceof WriteEntity) {
      WriteType writeType = ((WriteEntity) privObject).getWriteType();
      switch (writeType) {
      case INSERT:
        return HivePrivObjectActionType.INSERT;
      case INSERT_OVERWRITE:
        return HivePrivObjectActionType.INSERT_OVERWRITE;
      case UPDATE:
        return HivePrivObjectActionType.UPDATE;
      case DELETE:
        return HivePrivObjectActionType.DELETE;
      default:
        // Ignore other types for purposes of authorization
        break;
      }
    }
    return actionType;
  }
Convert thrift HiveObjectRef to plugin HivePrivilegeObject
@param privObj
@return
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java