Package org.apache.iceberg.util
Class PropertyUtil
java.lang.Object
org.apache.iceberg.util.PropertyUtil
-
Method Summary
Modifier and TypeMethodDescriptionapplySchemaChanges
(Map<String, String> properties, List<String> deletedColumns, Map<String, String> renamedColumns, Set<String> columnProperties) Filter the properties map by the provided key predicate.propertiesWithPrefix
(Map<String, String> properties, String prefix) Returns subset of provided map with keys matching the provided prefix.static boolean
propertyAsBoolean
(Map<String, String> properties, String property, boolean defaultValue) static double
propertyAsDouble
(Map<String, String> properties, String property, double defaultValue) static int
propertyAsInt
(Map<String, String> properties, String property, int defaultValue) static long
propertyAsLong
(Map<String, String> properties, String property, long defaultValue) static Boolean
propertyAsNullableBoolean
(Map<String, String> properties, String property) static Integer
propertyAsNullableInt
(Map<String, String> properties, String property) static Long
propertyAsNullableLong
(Map<String, String> properties, String property) static String
-
Method Details
-
propertyAsBoolean
-
propertyAsNullableBoolean
-
propertyAsDouble
-
propertyAsInt
-
propertyAsNullableInt
-
propertyAsLong
-
propertyAsNullableLong
-
propertyAsString
-
propertiesWithPrefix
Returns subset of provided map with keys matching the provided prefix. Matching is case-sensitive and the matching prefix is removed from the keys in returned map.- Parameters:
properties
- input mapprefix
- prefix to choose keys from input map- Returns:
- subset of input map with keys starting with provided prefix and prefix trimmed out
-
filterProperties
public static Map<String,String> filterProperties(Map<String, String> properties, Predicate<String> keyPredicate) Filter the properties map by the provided key predicate.- Parameters:
properties
- input mapkeyPredicate
- predicate to choose keys from input map- Returns:
- subset of input map with keys satisfying the predicate
-
applySchemaChanges
-