voldemort.server.protocol.admin
Class PartitionScanFetchStreamRequestHandler

java.lang.Object
  extended by voldemort.server.protocol.admin.FetchStreamRequestHandler
      extended by voldemort.server.protocol.admin.PartitionScanFetchStreamRequestHandler
All Implemented Interfaces:
StreamRequestHandler
Direct Known Subclasses:
PartitionScanFetchEntriesRequestHandler, PartitionScanFetchKeysRequestHandler

public abstract class PartitionScanFetchStreamRequestHandler
extends FetchStreamRequestHandler

Base class for key/entry stream fetching handlers that use efficient partition scan (PID layout). Of course, only works if isPartitionScanSupported() is true for the storage engine to be scanned..


Nested Class Summary
 
Nested classes/interfaces inherited from interface voldemort.server.protocol.StreamRequestHandler
StreamRequestHandler.StreamRequestDirection, StreamRequestHandler.StreamRequestHandlerState
 
Field Summary
protected  java.lang.Integer currentIndex
           
protected  java.lang.Integer currentPartition
           
protected  long currentPartitionFetched
           
protected  java.util.Set<java.lang.Integer> fetchedPartitions
           
protected  java.util.List<java.lang.Integer> partitionList
           
 
Fields inherited from class voldemort.server.protocol.admin.FetchStreamRequestHandler
errorCodeMapper, fetched, fetchOrphaned, filter, initialCluster, isJmxEnabled, logger, nodeId, operation, partitionIds, recordsPerPartition, request, scanned, startTimeMs, storageEngine, storeDef, storeInstance, streamStats, throttler
 
Fields inherited from interface voldemort.server.protocol.StreamRequestHandler
STAT_RECORDS_INTERVAL
 
Constructor Summary
PartitionScanFetchStreamRequestHandler(VAdminProto.FetchPartitionEntriesRequest request, MetadataStore metadataStore, ErrorCodeMapper errorCodeMapper, VoldemortConfig voldemortConfig, StoreRepository storeRepository, NetworkClassLoader networkClassLoader, StreamingStats.Operation operation)
           
 
Method Summary
protected  void completedFetchingCurrentPartition()
          Called when current partition has been completely fetched.
protected  boolean fetchedEnoughForCurrentPartition()
          True iff enough items have been fetched for current partition
protected  void recordFetched()
          Account for fetch.
protected  void statusInfoMessage(java.lang.String tag)
          Simple info message for status
 
Methods inherited from class voldemort.server.protocol.admin.FetchStreamRequestHandler
accountForScanProgress, close, getDirection, handleError, progressInfoMessage, reportStorageOpTime, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface voldemort.server.protocol.StreamRequestHandler
handleRequest
 

Field Detail

fetchedPartitions

protected java.util.Set<java.lang.Integer> fetchedPartitions

partitionList

protected java.util.List<java.lang.Integer> partitionList

currentIndex

protected java.lang.Integer currentIndex

currentPartition

protected java.lang.Integer currentPartition

currentPartitionFetched

protected long currentPartitionFetched
Constructor Detail

PartitionScanFetchStreamRequestHandler

public PartitionScanFetchStreamRequestHandler(VAdminProto.FetchPartitionEntriesRequest request,
                                              MetadataStore metadataStore,
                                              ErrorCodeMapper errorCodeMapper,
                                              VoldemortConfig voldemortConfig,
                                              StoreRepository storeRepository,
                                              NetworkClassLoader networkClassLoader,
                                              StreamingStats.Operation operation)
Method Detail

statusInfoMessage

protected void statusInfoMessage(java.lang.String tag)
Simple info message for status

Parameters:
tag - Message to print out at start of info message

fetchedEnoughForCurrentPartition

protected boolean fetchedEnoughForCurrentPartition()
True iff enough items have been fetched for current partition

Returns:
true iff enough items have been fetched for current partition.

recordFetched

protected void recordFetched()
Account for fetch.


completedFetchingCurrentPartition

protected void completedFetchingCurrentPartition()
Called when current partition has been completely fetched.



Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu