seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

How to get the number of records in the event listener

Open bugouyongxin opened this issue 3 weeks ago • 2 comments

根据事件监听器的文档中的示例代码

/** * 处理读取器打开事件 */ private void handleReaderOpenEvent(ReaderOpenEvent event) { log.info("读取器打开 | 插件ID: {}, 并行度: {}, 时间: {}", event.getPluginId(), event.getParallelism(), event.getEventTime()); // 处理读取器初始化逻辑 }

/**
 * 处理写入器关闭事件
 */
private void handleWriterCloseEvent(WriterCloseEvent event) {
    log.info("写入器关闭 | 插件ID: {}, 处理记录数: {}, 时间: {}",
        event.getPluginId(), event.getRecordCount(), event.getEventTime());
    // 处理写入器资源清理逻辑
}

请问2.3.12版本seatunne-api中的这两个方法event.getParallelism() 、event.getRecordCount()在哪里?

bugouyongxin avatar Dec 05 '25 17:12 bugouyongxin

I checked the code, but I couldn't find these methods. cc @hawk9821 Could you explain why this code was included in the document? It's possible that I misunderstood something.

dybyte avatar Dec 06 '25 09:12 dybyte

Pseudocode example, there are errors here. I will fix it.

hawk9821 avatar Dec 11 '25 00:12 hawk9821