Package cz.o2.proxima.direct.core.batch
Interface BatchLogReader
-
- All Known Implementing Classes:
BlobLogReader,GCloudLogReader,HadoopBatchLogReader,JdbcBatchLogReader,OffsetTrackingBatchLogReader,S3LogReader
@Stable public interface BatchLogReader
Reader of batch data stored in batch storage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBatchLogReader.Factory<T extends BatchLogReader>Serializablefactory forBatchLogReader.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BatchLogReader.Factory<?>asFactory()Convert instance of this reader toBatchLogReader.Factorysuitable for serialization.default java.util.List<Partition>getPartitions()Retrieve list of partitions of this batch observer.default java.util.List<Partition>getPartitions(long startStamp)Retrieve list of partitions covering data at least from given starting stamp.java.util.List<Partition>getPartitions(long startStamp, long endStamp)Retrieve list of partitions covering data from the given range.ObserveHandleobserve(java.util.List<Partition> partitions, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)Observe data stored in given partitions.default ObserveHandleobserveOffsets(java.util.List<Offset> offsets, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)Observe data stored in given partitions for a given offsets.
-
-
-
Method Detail
-
getPartitions
default java.util.List<Partition> getPartitions()
Retrieve list of partitions of this batch observer.- Returns:
- list of partitions of this reader
-
getPartitions
default java.util.List<Partition> getPartitions(long startStamp)
Retrieve list of partitions covering data at least from given starting stamp.- Parameters:
startStamp- timestamp to start reading from- Returns:
- list of partitions covering the time range
-
getPartitions
java.util.List<Partition> getPartitions(long startStamp, long endStamp)
Retrieve list of partitions covering data from the given range.- Parameters:
startStamp- starting timestamp (inclusive)endStamp- ending timestamp (exclusive)- Returns:
- list of partitions covering the time range
-
observe
ObserveHandle observe(java.util.List<Partition> partitions, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)
Observe data stored in given partitions.- Parameters:
partitions- partitions to observeattributes- attribute descriptors to filter outobserver- the observer by which to consume the data- Returns:
- an
ObserveHandleto control the consumption
-
observeOffsets
default ObserveHandle observeOffsets(java.util.List<Offset> offsets, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)
Observe data stored in given partitions for a given offsets.- Parameters:
offsets- offsets to observeattributes- attribute descriptors to filter outobserver- the observer by which to consume the data- Returns:
- an
ObserveHandleto control the consumption
-
asFactory
BatchLogReader.Factory<?> asFactory()
Convert instance of this reader toBatchLogReader.Factorysuitable for serialization.- Returns:
- the
BatchLogReader.Factoryrepresenting this reader
-
-