L - The generic type of the key used to lookup subtasks in the
            internal map.HS - The generic type of the subtask statistics.public abstract class AbstractMasterStats<L,HS extends AbstractSubtaskStats> extends Object
AbstractMasterTask
 and a factory for the statistics for the subtasks.
 
 Note: Since there are concurrent threads which need to write on the counters
 on this class the practice is to be synchronized on this
 reference before you update those counters. Without this, the counters might
 not update correctly as thing like a += 2 may not produce the
 correct result.
 
 Note: The use of AtomicLongs provides atomic visibility changes
 relied on by some unit tests.
| Modifier and Type | Field and Description | 
|---|---|
| AtomicLong | chunksInThe #of chunks drained from the  BlockingBufferby theAbstractMasterTask. | 
| AtomicLong | chunksOutThe #of chunks written onto index partitions using RMI. | 
| AtomicLong | chunksTransferredThe #of chunks transferred from the master to the sinks. | 
| long | elapsedRedirectNanosElapsed nanoseconds handling a redirect. | 
| long | elapsedSinkChunkWaitingNanosElapsed time across sinks waiting for another chunk to be ready so that
 it can be written onto the index partition. | 
| long | elapsedSinkChunkWritingNanosElapsed nanoseconds across sinks writing chunks on an index partition
 (RMI requests). | 
| long | elapsedSinkOfferNanosElapsed nanoseconds the master spends offering a chunk for transfer to a
 sink. | 
| AtomicLong | elementsInThe #of elements drained from the  BlockingBufferby theAbstractMasterTask. | 
| AtomicLong | elementsOnSinkQueuesThe #of elements on the output sink queues. | 
| AtomicLong | elementsOutThe #of elements in the output chunks written onto the index partitions
 (not including any eliminated duplicates). | 
| AtomicLong | elementsTransferredThe #of elements transferred from the master to the sinks. | 
| AtomicInteger | masterCreateCountThe #of master tasks which have been created for the index whose
 asynchronous write statistics are reported on by this object. | 
| protected ConcurrentWeakValueCache<Integer,AbstractMasterTask> | mastersWeak value hash map of the active masters. | 
| AtomicLong | redirectCountThe #of redirects ( StaleLocatorExceptions) that were handled. | 
| AtomicLong | subtaskEndCountThe #of subtasks which have finished (either the buffer has been closed
 and all buffered data has been flushed -or- the task was interrupted or
 otherwise threw an exception). | 
| AtomicLong | subtaskIdleTimeoutCountThe #of subtasks which were closed due to an idle timeout. | 
| AtomicLong | subtaskStartCountThe #of subtasks which have started. | 
| Constructor and Description | 
|---|
| AbstractMasterStats() | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getActiveSinkCount()The #of active sinks. | 
| CounterSet | getCounterSet()Return a  CounterSetwhich may be used to report the statistics on
 the index write operation. | 
| int | getMasterActiveCount()The approximate #of active master tasks. | 
| int | getMaximumPartitionCount()The maximum #of distinct partitions for which the master has caused
 subtasks to be created at any given time. | 
| Map<L,HS> | getSubtaskStats()Return a snapshot of the statistics for each index partition. | 
| HS | getSubtaskStats(L locator)Return the statistics object for the specified index partition and never
  null(a new instance is created if none exists). | 
| protected abstract HS | newSubtaskStats(L locator)Factory for the subtask statistics. | 
| String | toString() | 
public final AtomicLong subtaskStartCount
public final AtomicLong subtaskEndCount
public final AtomicLong subtaskIdleTimeoutCount
public final AtomicLong redirectCount
StaleLocatorExceptions) that were handled.public long elapsedRedirectNanos
public final AtomicLong chunksIn
BlockingBuffer by the
 AbstractMasterTask.public final AtomicLong elementsIn
BlockingBuffer by the
 AbstractMasterTask.public final AtomicLong elementsOut
public final AtomicLong elementsOnSinkQueues
elementsTransferred/
 chunksTransferred X the averageMasterQueueSize). Neither does it
 include the #of elements in a prepared or outstanding write on an index
 partition.public final AtomicLong chunksTransferred
public final AtomicLong elementsTransferred
public final AtomicLong chunksOut
public long elapsedSinkOfferNanos
public long elapsedSinkChunkWaitingNanos
public long elapsedSinkChunkWritingNanos
protected final ConcurrentWeakValueCache<Integer,AbstractMasterTask> masters
public final AtomicInteger masterCreateCount
public int getMaximumPartitionCount()
public int getActiveSinkCount()
public int getMasterActiveCount()
public HS getSubtaskStats(L locator)
null (a new instance is created if none exists).locator - The index partition.protected abstract HS newSubtaskStats(L locator)
locator - The subtask key.public Map<L,HS> getSubtaskStats()
public CounterSet getCounterSet()
CounterSet which may be used to report the statistics on
 the index write operation. The CounterSet is NOT placed into any
 namespace.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.