Package org.apache.iceberg.spark
Class CommitMetadata
- java.lang.Object
-
- org.apache.iceberg.spark.CommitMetadata
-
public class CommitMetadata extends java.lang.Object
utility class to accept thread local commit properties
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>
commitProperties()
static <R,E extends java.lang.Exception>
RwithCommitProperties(java.util.Map<java.lang.String,java.lang.String> properties, java.util.concurrent.Callable<R> callable, java.lang.Class<E> exClass)
running the code wrapped as a caller, and any snapshot committed within the callable object will be attached with the metadata defined in properties
-
-
-
Method Detail
-
withCommitProperties
public static <R,E extends java.lang.Exception> R withCommitProperties(java.util.Map<java.lang.String,java.lang.String> properties, java.util.concurrent.Callable<R> callable, java.lang.Class<E> exClass) throws E extends java.lang.Exception
running 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 java.lang.Exception
-
commitProperties
public static java.util.Map<java.lang.String,java.lang.String> commitProperties()
-
-