voldemort.server.protocol.admin
Class FetchStreamRequestHandler
java.lang.Object
voldemort.server.protocol.admin.FetchStreamRequestHandler
- All Implemented Interfaces:
- StreamRequestHandler
- Direct Known Subclasses:
- FullScanFetchStreamRequestHandler, PartitionScanFetchStreamRequestHandler
public abstract class FetchStreamRequestHandler
- extends java.lang.Object
- implements StreamRequestHandler
Base class for all key/entry stream fetching handlers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
request
protected final VAdminProto.FetchPartitionEntriesRequest request
errorCodeMapper
protected final ErrorCodeMapper errorCodeMapper
initialCluster
protected final Cluster initialCluster
throttler
protected final EventThrottler throttler
partitionIds
protected java.util.List<java.lang.Integer> partitionIds
filter
protected final VoldemortFilter filter
storageEngine
protected final StorageEngine<ByteArray,byte[],byte[]> storageEngine
streamStats
protected final StreamingStats streamStats
isJmxEnabled
protected boolean isJmxEnabled
operation
protected final StreamingStats.Operation operation
scanned
protected long scanned
fetched
protected long fetched
recordsPerPartition
protected final long recordsPerPartition
startTimeMs
protected final long startTimeMs
logger
protected final org.apache.log4j.Logger logger
nodeId
protected int nodeId
storeDef
protected final StoreDefinition storeDef
fetchOrphaned
protected boolean fetchOrphaned
storeInstance
protected final StoreRoutingPlan storeInstance
FetchStreamRequestHandler
protected FetchStreamRequestHandler(VAdminProto.FetchPartitionEntriesRequest request,
MetadataStore metadataStore,
ErrorCodeMapper errorCodeMapper,
VoldemortConfig voldemortConfig,
StoreRepository storeRepository,
NetworkClassLoader networkClassLoader,
StreamingStats.Operation operation)
getDirection
public final StreamRequestHandler.StreamRequestDirection getDirection()
- Specified by:
getDirection
in interface StreamRequestHandler
close
public void close(java.io.DataOutputStream outputStream)
throws java.io.IOException
- Specified by:
close
in interface StreamRequestHandler
- Throws:
java.io.IOException
handleError
public final void handleError(java.io.DataOutputStream outputStream,
VoldemortException e)
throws java.io.IOException
- Specified by:
handleError
in interface StreamRequestHandler
- Throws:
java.io.IOException
progressInfoMessage
protected void progressInfoMessage(java.lang.String tag)
- Progress info message
- Parameters:
tag
- Message that precedes progress info. Indicate 'keys' or
'entries'.
accountForScanProgress
protected void accountForScanProgress(java.lang.String itemTag)
- Account for item being scanned.
- Parameters:
itemTag
- mad libs style string to insert into progress message.
sendMessage
protected void sendMessage(java.io.DataOutputStream outputStream,
com.google.protobuf.Message message)
throws java.io.IOException
- Helper method to send message on outputStream and account for network
time stats.
- Parameters:
outputStream
- message
-
- Throws:
java.io.IOException
reportStorageOpTime
protected void reportStorageOpTime(long startNs)
- Helper method to track storage operations & time via StreamingStats.
- Parameters:
startNs
-
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu