coniferous-cmd commented on issue #17846:
URL: https://github.com/apache/iotdb/issues/17846#issuecomment-4727608472
源码内的默认方法 transfer(TsFileInsertionEvent tsFileInsertionEvent) 会执行实现了的
transfer(TabletInsertionEvent
var1)。只要实现TabletInsertionEvent时间的方法就可以,但实际情况只能通过执行flush 才会使改方法执行
```java
default void transfer(TsFileInsertionEvent tsFileInsertionEvent) throws
Exception {
try {
for(TabletInsertionEvent tabletInsertionEvent :
tsFileInsertionEvent.toTabletInsertionEvents()) {
this.transfer(tabletInsertionEvent);
}
} finally {
tsFileInsertionEvent.close();
}
}
@Override
public void transfer(TabletInsertionEvent tabletInsertionEvent) throws
Exception {
tabletInsertionEvent.processTablet(((tablet, collector) -> {
log.info("{}", tablet.getTableName());
log.info("{}", tablet.getRowSize());
}));
}
CREATE
PIPEPLUGIN console_sink AS 'com.xlkh.tsdb.iotdb.plugin.sink.ConsoleSink'
USING URI
'file:///home/iotdb/apache-iotdb-2.0.8-all-bin/ext/pipe/iotdb-plugin-ext.jar';
CREATE
PIPE console_sink_pipe
WITH SOURCE (
'source' = 'iotdb-source',
'source.pattern' = 'root.s1_5w',
'history.enable'='false',
'realtime.enable'='true',
)
WITH PROCESSOR (
'processor' = 'do-nothing-processor',
)
WITH SINK (
'sink' = 'console_sink',
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]