Package org.apache.iceberg.spark
Class CommitMetadata
java.lang.Object
org.apache.iceberg.spark.CommitMetadata
utility class to accept thread local commit properties
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R,
E extends Exception>
Rrunning the code wrapped as a caller, and any snapshot committed within the callable object will be attached with the metadata defined in properties
-
Method Details
-
withCommitProperties
public static <R,E extends Exception> R withCommitProperties(Map<String, String> properties, Callable<R> callable, Class<E> exClass) throws Erunning the code wrapped as a caller, and any snapshot committed within the callable object will be attached with the metadata defined in properties- Parameters:
properties
- extra commit metadata to attach to the snapshot committed within callable. The prefix will be removed for properties starting withSnapshotSummary.EXTRA_METADATA_PREFIX
callable
- the code to be executedexClass
- the expected type of exception which would be thrown from callable- Throws:
E extends Exception
-
commitProperties
-