-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change introduces the ability to distinguish individual checks by the (external) API being used (Nessie, Iceberg) and for Nessie Catalog (Iceberg REST) to information about the kind(s) of changes being applied. The individual changes that can be distinguished are: * Catalog API operation * Metadata update actions, with special actions wrt to the `location` property * Snapshot operation * Snapshot summary extracts (for example whether a snapshot added or removed data/delete files) All new attributes can be retrieved from the existing `Check` type via new attributes exposed via `AccessCheckMeta` holding the source API, "for write flag" and per-content-key flags. The flags represent the mentioned "individual changes". Fixes #9559 (and more)
- Loading branch information
Showing
71 changed files
with
1,617 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
...at/iceberg/src/main/java/org/projectnessie/catalog/formats/iceberg/nessie/CatalogOps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (C) 2024 Dremio | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.projectnessie.catalog.formats.iceberg.nessie; | ||
|
||
/** | ||
* Enum serving as a "constants pool" for the string values passed to Nessie access control checks. | ||
*/ | ||
public enum CatalogOps { | ||
// Iceberg metadata updates | ||
META_ADD_VIEW_VERSION, | ||
META_SET_CURRENT_VIEW_VERSION, | ||
META_SET_STATISTICS, | ||
META_REMOVE_STATISTICS, | ||
META_SET_PARTITION_STATISTICS, | ||
META_REMOVE_PARTITION_STATISTICS, | ||
META_ASSIGN_UUID, | ||
META_ADD_SCHEMA, | ||
META_SET_CURRENT_SCHEMA, | ||
META_ADD_PARTITION_SPEC, | ||
META_SET_DEFAULT_PARTITION_SPEC, | ||
META_ADD_SNAPSHOT, | ||
META_ADD_SORT_ORDER, | ||
META_SET_DEFAULT_SORT_ORDER, | ||
META_SET_LOCATION, | ||
META_SET_PROPERTIES, | ||
META_REMOVE_PROPERTIES, | ||
META_REMOVE_LOCATION_PROPERTY, | ||
META_SET_SNAPSHOT_REF, | ||
META_REMOVE_SNAPSHOT_REF, | ||
META_UPGRADE_FORMAT_VERSION, | ||
|
||
// Catalog operations | ||
CATALOG_CREATE_ENTITY, | ||
CATALOG_UPDATE_ENTITY, | ||
CATALOG_DROP_ENTITY, | ||
CATALOG_RENAME_ENTITY_FROM, | ||
CATALOG_RENAME_ENTITY_TO, | ||
CATALOG_REGISTER_ENTITY, | ||
CATALOG_UPDATE_MULTIPLE, | ||
|
||
// From Iceberg's snapshot summary | ||
SNAP_ADD_DATA_FILES, | ||
SNAP_DELETE_DATA_FILES, | ||
SNAP_ADD_DELETE_FILES, | ||
SNAP_ADD_EQUALITY_DELETE_FILES, | ||
SNAP_ADD_POSITION_DELETE_FILES, | ||
SNAP_REMOVE_DELETE_FILES, | ||
SNAP_REMOVE_EQUALITY_DELETE_FILES, | ||
SNAP_REMOVE_POSITION_DELETE_FILES, | ||
SNAP_ADDED_RECORDS, | ||
SNAP_DELETED_RECORDS, | ||
SNAP_ADDED_POSITION_DELETES, | ||
SNAP_DELETED_POSITION_DELETES, | ||
SNAP_ADDED_EQUALITY_DELETES, | ||
SNAP_DELETED_EQUALITY_DELETES, | ||
SNAP_REPLACE_PARTITIONS, | ||
SNAP_OP_APPEND, | ||
SNAP_OP_REPLACE, | ||
SNAP_OP_OVERWRITE, | ||
SNAP_OP_DELETE, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.