Class EnhancedWriteMetadataEvent

  • All Implemented Interfaces:
    Serializable, org.apache.flink.runtime.operators.coordination.OperatorEvent

    public class EnhancedWriteMetadataEvent
    extends Object
    implements org.apache.flink.runtime.operators.coordination.OperatorEvent
    An OperatorEvent that enhances a standard Hudi WriteMetadataEvent with additional context required for multi-table sinking.

    The standard WriteMetadataEvent does not contain information about which destination table it belongs to. This event wraps the original event and adds the tablePath, allowing the MultiTableStreamWriteOperatorCoordinator to correctly route the write metadata to the timeline of the appropriate table.

    See Also:
    Serialized Form
    • Constructor Detail

      • EnhancedWriteMetadataEvent

        public EnhancedWriteMetadataEvent​(org.apache.hudi.sink.event.WriteMetadataEvent originalEvent,
                                          String tablePath)
        Constructs a new EnhancedWriteMetadataEvent.
        Parameters:
        originalEvent - The original WriteMetadataEvent from the writer.
        tablePath - The path of the Hudi table this metadata belongs to.
    • Method Detail

      • getOriginalEvent

        public org.apache.hudi.sink.event.WriteMetadataEvent getOriginalEvent()
        Gets the original, un-enhanced event.
        Returns:
        The original WriteMetadataEvent.
      • getTablePath

        public String getTablePath()
        Gets the path of the Hudi table.
        Returns:
        The table path string.