Class CommitMetadata

java.lang.Object
org.apache.iceberg.spark.CommitMetadata

public class CommitMetadata extends Object
utility class to accept thread local commit properties
  • Method Details

    • withCommitProperties

      public static <R, E extends Exception> R withCommitProperties(Map<String,String> properties, Callable<R> callable, Class<E> exClass) throws E
      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 with SnapshotSummary.EXTRA_METADATA_PREFIX
      callable - the code to be executed
      exClass - the expected type of exception which would be thrown from callable
      Throws:
      E extends Exception
    • commitProperties

      public static Map<String,String> commitProperties()