Package cz.o2.proxima.direct.io.blob
Class BlobLogReader<BlobT extends BlobBase,BlobPathT extends BlobPath<BlobT>>
- java.lang.Object
-
- cz.o2.proxima.direct.io.blob.BlobLogReader<BlobT,BlobPathT>
-
- All Implemented Interfaces:
BatchLogReader
- Direct Known Subclasses:
GCloudLogReader
,S3LogReader
public abstract class BlobLogReader<BlobT extends BlobBase,BlobPathT extends BlobPath<BlobT>> extends java.lang.Object implements BatchLogReader
BatchLogReader
for blob storages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BlobLogReader.ThrowingRunnable
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.batch.BatchLogReader
BatchLogReader.Factory<T extends BatchLogReader>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BlobLogReader(BlobStorageAccessor accessor, Context context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract BlobPath<BlobT>
createPath(BlobT blob)
java.util.List<Partition>
getPartitions(long startStamp, long endStamp)
Retrieve list of partitions covering data from the given range.ObserveHandle
observe(java.util.List<Partition> partitions, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)
Observe data stored in given partitions.protected abstract void
runHandlingErrors(BlobT blob, BlobLogReader.ThrowingRunnable runnable)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.direct.core.batch.BatchLogReader
asFactory, getPartitions, getPartitions, observeOffsets
-
-
-
-
Constructor Detail
-
BlobLogReader
protected BlobLogReader(BlobStorageAccessor accessor, Context context)
-
-
Method Detail
-
getPartitions
public java.util.List<Partition> getPartitions(long startStamp, long endStamp)
Description copied from interface:BatchLogReader
Retrieve list of partitions covering data from the given range.- Specified by:
getPartitions
in interfaceBatchLogReader
- Parameters:
startStamp
- starting timestamp (inclusive)endStamp
- ending timestamp (exclusive)- Returns:
- list of partitions covering the time range
-
observe
public ObserveHandle observe(java.util.List<Partition> partitions, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)
Description copied from interface:BatchLogReader
Observe data stored in given partitions.- Specified by:
observe
in interfaceBatchLogReader
- Parameters:
partitions
- partitions to observeattributes
- attribute descriptors to filter outobserver
- the observer by which to consume the data- Returns:
- an
ObserveHandle
to control the consumption
-
runHandlingErrors
protected abstract void runHandlingErrors(BlobT blob, BlobLogReader.ThrowingRunnable runnable) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-