mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 05:11:42 +08:00
Merge 8fb0f85906
into 0824b45c5e
This commit is contained in:
commit
52d16c93d5
@ -141,14 +141,21 @@ public abstract class Channel {
|
||||
|
||||
public Record pull() {
|
||||
Record record = this.doPull();
|
||||
this.statPull(1L, record.getByteSize());
|
||||
|
||||
// record为终止对象时,该记录不算入统计数量
|
||||
if (!(record instanceof TerminateRecord)) {
|
||||
this.statPull(1L, record.getByteSize());
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
public void pullAll(final Collection<Record> rs) {
|
||||
Validate.notNull(rs);
|
||||
this.doPullAll(rs);
|
||||
this.statPull(rs.size(), this.getByteSize(rs));
|
||||
|
||||
// record为终止对象时,该记录不算入统计数量
|
||||
long recordSize = rs.stream().filter(record -> !(record instanceof TerminateRecord)).count();
|
||||
this.statPull(recordSize, this.getByteSize(rs));
|
||||
}
|
||||
|
||||
protected abstract void doPush(Record r);
|
||||
|
Loading…
Reference in New Issue
Block a user