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 interface
BulkAttributeWriter.Factory<T extends BulkAttributeWriter>
Serializable
factory 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.Factory
suitable for serialization.default AttributeWriterBase.Type
getType()
Retrieve type of the writer.default void
updateWatermark(long watermark)
Update watermark when no input data arrives.void
write(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:AttributeWriterBase
Retrieve type of the writer.- Specified by:
getType
in interfaceAttributeWriterBase
- Returns:
AttributeWriterBase.Type
of 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:AttributeWriterBase
Convert instance of this writer toAttributeWriterBase.Factory
suitable for serialization.- Specified by:
asFactory
in interfaceAttributeWriterBase
- Returns:
- the
AttributeWriterBase.Factory
representing this reader
-
-