Interface ReservedProperties
public interface ReservedProperties
Used to track entity properties reserved for use by the catalog. These properties may not be
overridden by the end user.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.Loggerstatic final ReservedPropertiesProvides aReservedPropertiesimplementation that reserves nothing. -
Method Summary
Modifier and TypeMethodDescriptionA list of properties that are *not* considered reserved, even if they start with a reserved prefixprefixes()A list of prefixes that are considered reserved.removeReservedProperties(List<String> properties) removeReservedProperties(Map<String, String> properties) Removes reserved properties from a list of input property keys.default org.apache.iceberg.MetadataUpdateremoveReservedProperties(org.apache.iceberg.MetadataUpdate update) removeReservedPropertiesFromUpdate(Map<String, String> existingProperties, Map<String, String> updateProperties) Removes reserved properties from a planned change to an entity.default booleanIf true, attempts to modify a reserved property should throw an exception.
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
NONE
Provides aReservedPropertiesimplementation that reserves nothing. Used for testing.
-
-
Method Details
-
prefixes
A list of prefixes that are considered reserved. Any property starting with one of these prefixes is a reserved property. -
allowlist
A list of properties that are *not* considered reserved, even if they start with a reserved prefix -
shouldThrow
default boolean shouldThrow()If true, attempts to modify a reserved property should throw an exception. -
removeReservedPropertiesFromUpdate
default Map<String,String> removeReservedPropertiesFromUpdate(Map<String, String> existingProperties, Map<String, throws IllegalArgumentExceptionString> updateProperties) Removes reserved properties from a planned change to an entity. If `shouldThrow` returns true, this will throw an IllegalArgumentException.- Parameters:
existingProperties- The properties currently present for an entityupdateProperties- The properties present in an update to an entity- Returns:
- The properties in the update, with changes to reserved properties removed
- Throws:
IllegalArgumentException
-
removeReservedProperties
default Map<String,String> removeReservedProperties(Map<String, String> properties) throws IllegalArgumentExceptionRemoves reserved properties from a list of input property keys. If `shouldThrow`returns true, this will throw an IllegalArgumentException.- Parameters:
properties- A map of properties to remove reserved properties from- Returns:
- The keys from the input list which are not reserved properties
- Throws:
IllegalArgumentException
-
removeReservedProperties
default List<String> removeReservedProperties(List<String> properties) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
removeReservedProperties
default org.apache.iceberg.MetadataUpdate removeReservedProperties(org.apache.iceberg.MetadataUpdate update)
-