Package cz.o2.proxima.direct.core
Interface BulkAttributeWriter
-
- All Superinterfaces:
AttributeWriterBase,java.lang.AutoCloseable
- All Known Implementing Classes:
AbstractBulkAttributeWriter,AbstractBulkFileSystemAttributeWriter,BulkBlobWriter,BulkGCloudStorageWriter,BulkS3Writer,ElasticsearchWriter,HadoopBulkAttributeWriter
@Stable public interface BulkAttributeWriter extends AttributeWriterBase
Writer for attribute values. This is online version, where each element is committed one after another.The ingest process works as follows:
- incoming request is written into
CommitLog, which is instance of this interface - the message is confirmed to the client, because commit log is persistent, durable and distributed
- next, the message is asynchronously consumed by all writes from the commit log and written to the storages
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBulkAttributeWriter.Factory<T extends BulkAttributeWriter>Serializablefactory forBulkAttributeWriter.-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
AttributeWriterBase.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BulkAttributeWriter.Factory<?>asFactory()Convert instance of this writer toAttributeWriterBase.Factorysuitable for serialization.default AttributeWriterBase.TypegetType()Retrieve type of the writer.default voidupdateWatermark(long watermark)Update watermark when no input data arrives.voidwrite(StreamElement data, long watermark, CommitCallback statusCallback)Write given serialized attribute value to given entity.
-
-
-
Method Detail
-
getType
default AttributeWriterBase.Type getType()
Description copied from interface:AttributeWriterBaseRetrieve type of the writer.- Specified by:
getTypein interfaceAttributeWriterBase- Returns:
AttributeWriterBase.Typeof the writer
-
write
void write(StreamElement data, long watermark, CommitCallback statusCallback)
Write given serialized attribute value to given entity. Use the statusCallback to commit the whole bulk (of not yet committed elements).- Parameters:
data- the data to writerwatermark- watermark of data being writtenstatusCallback- callback to commit the data
-
updateWatermark
default void updateWatermark(long watermark)
Update watermark when no input data arrives.- Parameters:
watermark- timestamp of the new watermark
-
asFactory
BulkAttributeWriter.Factory<?> asFactory()
Description copied from interface:AttributeWriterBaseConvert instance of this writer toAttributeWriterBase.Factorysuitable for serialization.- Specified by:
asFactoryin interfaceAttributeWriterBase- Returns:
- the
AttributeWriterBase.Factoryrepresenting this reader
-
-