public static class TopPartitionTracker.TopHolder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
long |
lastUpdate |
java.util.NavigableSet<TopPartitionTracker.TopPartition> |
top |
Modifier and Type | Method and Description |
---|---|
TopPartitionTracker.TopHolder |
merge(TopPartitionTracker.TopHolder holder,
java.util.Collection<Range<Token>> ownedRanges)
we merge any pre-existing top partitions on to the ones we just collected if they are outside of the
range collected.
|
java.util.Map<java.lang.String,java.lang.Long> |
toMap(TableMetadata metadata) |
java.lang.String |
toString() |
void |
track(DecoratedKey key,
long value) |
public final java.util.NavigableSet<TopPartitionTracker.TopPartition> top
public final long lastUpdate
public void track(DecoratedKey key, long value)
public TopPartitionTracker.TopHolder merge(TopPartitionTracker.TopHolder holder, java.util.Collection<Range<Token>> ownedRanges)
holder
- the newly collected holder - this will get copied and any existing token outside of the collected ranges will get added to the copyownedRanges
- the ranges this node owns - any existing token outside of these ranges will get droppedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.Long> toMap(TableMetadata metadata)
Copyright © 2009- The Apache Software Foundation