Package cz.o2.proxima.beam.direct.io
Class BatchRestrictionTracker.PartitionList
- java.lang.Object
-
- cz.o2.proxima.beam.direct.io.BatchRestrictionTracker.PartitionList
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.splittabledofn.HasDefaultTracker<BatchRestrictionTracker.PartitionList,BatchRestrictionTracker>
- Enclosing class:
- BatchRestrictionTracker
public static class BatchRestrictionTracker.PartitionList extends java.lang.Object implements java.io.Serializable, org.apache.beam.sdk.transforms.splittabledofn.HasDefaultTracker<BatchRestrictionTracker.PartitionList,BatchRestrictionTracker>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Partition>partitionsprivate static longserialVersionUIDprivate longtotalLimit
-
Constructor Summary
Constructors Modifier Constructor Description privatePartitionList(java.util.List<Partition> partition, long totalLimit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleanclaim(Partition partition)booleanequals(java.lang.Object o)PartitiongetFirstPartition()org.joda.time.InstantgetMinTimestamp()inthashCode()static BatchRestrictionTracker.PartitionListinitialRestriction(java.util.List<Partition> partitions, long limit)booleanisEmpty()booleanisFinished()booleanisLimitConsumed()BatchRestrictionTrackernewTracker()static BatchRestrictionTracker.PartitionListofSinglePartition(Partition partition, long limit)CreateBatchRestrictionTracker.PartitionListwith given limit containing only singlePartitionvoidreportConsumed()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
partitions
private final java.util.List<Partition> partitions
-
totalLimit
private long totalLimit
-
-
Constructor Detail
-
PartitionList
private PartitionList(java.util.List<Partition> partition, long totalLimit)
-
-
Method Detail
-
initialRestriction
public static BatchRestrictionTracker.PartitionList initialRestriction(java.util.List<Partition> partitions, long limit)
- Parameters:
partitions- the list of all partitions inBatchLogReaderlimit- total limit to read- Returns:
- initial restriction for
DoFn.GetInitialRestriction.
-
ofSinglePartition
public static BatchRestrictionTracker.PartitionList ofSinglePartition(Partition partition, long limit)
CreateBatchRestrictionTracker.PartitionListwith given limit containing only singlePartition- Parameters:
partition- thePartitionlimit- total limit
-
claim
boolean claim(@Nonnull Partition partition)
-
getFirstPartition
@Nullable public Partition getFirstPartition()
-
newTracker
public BatchRestrictionTracker newTracker()
- Specified by:
newTrackerin interfaceorg.apache.beam.sdk.transforms.splittabledofn.HasDefaultTracker<BatchRestrictionTracker.PartitionList,BatchRestrictionTracker>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isEmpty
public boolean isEmpty()
-
reportConsumed
public void reportConsumed()
-
isLimitConsumed
public boolean isLimitConsumed()
-
isFinished
public boolean isFinished()
-
getMinTimestamp
public org.joda.time.Instant getMinTimestamp()
-
-