W - - the type of the result returned by writeSingle(java.lang.String)public interface NdBenchAbstractClient<W>
This interface provides backward compatability with legacy client plug-ins (which do not support auto-tuning)
since the interface NdBenchClient concretizes the type parameter 'W'
to the type that heretofore has been returned by all clients implementing the writeSingle method (namely: String.)
| Modifier and Type | Method and Description |
|---|---|
default double |
autoTuneReadRateLimit(double currentRateLimit,
W event,
NdBenchMonitor runStats)
|
default java.lang.Double |
autoTuneWriteRateLimit(java.lang.Double currentRateLimit,
W event,
NdBenchMonitor runStats)
Implementations of the autoTune[Write/Read]RateLimit methods will interpret the information provided by
'event' and 'runStats', and 'currentRateLimit' in order to determine whether or not it is appropriate to auto-tune
read / write rate limits for the currently running benchmark.
|
java.lang.String |
getConnectionInfo()
Get connection info
|
void |
init(DataGenerator dataGenerator)
Initialize the client
|
java.lang.String |
readSingle(java.lang.String key)
Perform a single read operation
|
java.lang.String |
runWorkFlow()
Run workflow for functional testing
|
void |
shutdown()
shutdown the client
|
W |
writeSingle(java.lang.String key)
Perform a single write operation
|
void init(DataGenerator dataGenerator) throws java.lang.Exception
java.lang.Exceptionjava.lang.String readSingle(java.lang.String key)
throws java.lang.Exception
java.lang.ExceptionW writeSingle(java.lang.String key) throws java.lang.Exception
java.lang.Exceptionvoid shutdown()
throws java.lang.Exception
java.lang.Exceptionjava.lang.String getConnectionInfo()
throws java.lang.Exception
java.lang.Exceptionjava.lang.String runWorkFlow()
throws java.lang.Exception
java.lang.Exceptiondefault java.lang.Double autoTuneWriteRateLimit(java.lang.Double currentRateLimit,
W event,
NdBenchMonitor runStats)
This method will be called by the benchmark driver after every write operation (this applies to the initial implementation -- subsequent releases may also allow tuning based on responses to read operations).
Note that if there are multiple read or write workers it is possible that an attempt by one thread to auto-tune the rate limit to a particular level might be overwritten by the rate limit value set by another thread. But such overwrites should not affect the eventual trend of the rate limit either downward or upward.
currentRateLimit - - the write rate limit currently in effect.event - - conveys information related to the most recently performed read or write operation which
this method will use to decide whether or not it is appropriate to auto-tune
write / read rate limits for the currently running benchmark. An event will typically
capture details of errors occurring in the context of an attempt to perform
either a read or write operation.runStats - - statistics such as average write/read latency for current benchmark rundefault double autoTuneReadRateLimit(double currentRateLimit,
W event,
NdBenchMonitor runStats)