public class DataWriter extends Object
| 构造器和说明 |
|---|
DataWriter(List<String> outputChannels,
List<io.ray.api.BaseActorHandle> toActors,
Map<String,OffsetInfo> checkpoints,
StreamingWorkerConfig workerConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
broadcastBarrier(long checkpointId,
ByteBuffer attach) |
void |
clearCheckpoint(long checkpointId) |
void |
close()
close writer to release resources
|
Map<String,OffsetInfo> |
getOutputCheckpoints() |
void |
stop()
stop writer
|
void |
write(ChannelId id,
ByteBuffer item)
Write msg into the specified channel
|
void |
write(Set<ChannelId> ids,
ByteBuffer item)
Write msg into the specified channels
|
public DataWriter(List<String> outputChannels, List<io.ray.api.BaseActorHandle> toActors, Map<String,OffsetInfo> checkpoints, StreamingWorkerConfig workerConfig)
outputChannels - output channels idstoActors - downstream output actorsworkerConfig - configurationcheckpoints - offset of each channelspublic void write(ChannelId id, ByteBuffer item)
id - channel iditem - message item data section is specified by [position, limit).public void write(Set<ChannelId> ids, ByteBuffer item)
ids - channel idsitem - message item data section is specified by [position, limit). item doesn't have to
be a direct buffer.public Map<String,OffsetInfo> getOutputCheckpoints()
public void broadcastBarrier(long checkpointId,
ByteBuffer attach)
public void clearCheckpoint(long checkpointId)
public void stop()
public void close()
Copyright © 2022. All rights reserved.