Class EnhancedWriteMetadataEvent
- java.lang.Object
-
- org.apache.flink.cdc.connectors.hudi.sink.event.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
AnOperatorEventthat enhances a standard HudiWriteMetadataEventwith additional context required for multi-table sinking.The standard
WriteMetadataEventdoes not contain information about which destination table it belongs to. This event wraps the original event and adds thetablePath, allowing theMultiTableStreamWriteOperatorCoordinatorto correctly route the write metadata to the timeline of the appropriate table.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnhancedWriteMetadataEvent(org.apache.hudi.sink.event.WriteMetadataEvent originalEvent, String tablePath)Constructs a new EnhancedWriteMetadataEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hudi.sink.event.WriteMetadataEventgetOriginalEvent()Gets the original, un-enhanced event.StringgetTablePath()Gets the path of the Hudi table.StringtoString()
-
-
-
Constructor Detail
-
EnhancedWriteMetadataEvent
public EnhancedWriteMetadataEvent(org.apache.hudi.sink.event.WriteMetadataEvent originalEvent, String tablePath)Constructs a new EnhancedWriteMetadataEvent.- Parameters:
originalEvent- The originalWriteMetadataEventfrom 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.
-
-