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
BatchLogReaderfor blob storages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBlobLogReader.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 protectedBlobLogReader(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.ObserveHandleobserve(java.util.List<Partition> partitions, java.util.List<AttributeDescriptor<?>> attributes, BatchLogObserver observer)Observe data stored in given partitions.protected abstract voidrunHandlingErrors(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:BatchLogReaderRetrieve list of partitions covering data from the given range.- Specified by:
getPartitionsin 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:BatchLogReaderObserve data stored in given partitions.- Specified by:
observein interfaceBatchLogReader- Parameters:
partitions- partitions to observeattributes- attribute descriptors to filter outobserver- the observer by which to consume the data- Returns:
- an
ObserveHandleto control the consumption
-
runHandlingErrors
protected abstract void runHandlingErrors(BlobT blob, BlobLogReader.ThrowingRunnable runnable) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-