StateStoreRecordOperationsStateStoreBaseImpl@Public @Evolving public abstract class StateStoreDriver extends java.lang.Object implements StateStoreRecordOperations
StateStoreService
provider. Driver implementations will extend this class and implement some of
the default methods.| Constructor | Description |
|---|---|
StateStoreDriver() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
close() |
Close the State Store driver connection.
|
protected org.apache.hadoop.conf.Configuration |
getConf() |
Get the State Store configuration.
|
java.lang.String |
getIdentifier() |
Gets a unique identifier for the running task/process.
|
StateStoreMetrics |
getMetrics() |
Get the metrics for the State Store.
|
long |
getTime() |
Returns the current time synchronization from the underlying store.
|
boolean |
init(org.apache.hadoop.conf.Configuration config,
java.lang.String id,
java.util.Collection<java.lang.Class<? extends BaseRecord>> records,
StateStoreMetrics stateStoreMetrics) |
Initialize the state store connection.
|
abstract boolean |
initDriver() |
Prepare the driver to access data storage.
|
abstract <T extends BaseRecord> |
initRecordStorage(java.lang.String className,
java.lang.Class<T> clazz) |
Initialize storage for a single record class.
|
abstract boolean |
isDriverReady() |
Check if the driver is currently running and the data store connection is
valid.
|
void |
verifyDriverReady() |
Check if the driver is ready to be used and throw an exception otherwise.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, getMultiple, put, putAll, remove, remove, removeAllpublic boolean init(org.apache.hadoop.conf.Configuration config,
java.lang.String id,
java.util.Collection<java.lang.Class<? extends BaseRecord>> records,
StateStoreMetrics stateStoreMetrics)
config - Configuration for the driver.id - Identifier for the driver.records - Records that are supported.stateStoreMetrics - State store metrics.protected org.apache.hadoop.conf.Configuration getConf()
public java.lang.String getIdentifier()
public StateStoreMetrics getMetrics()
public abstract boolean initDriver()
public abstract <T extends BaseRecord> boolean initRecordStorage(java.lang.String className, java.lang.Class<T> clazz)
T - Type of the state store record.className - String reference of the record class to initialize,
used to construct paths and file names for the record.
Determined by configuration settings for the specific driver.clazz - Record type corresponding to the provided name.public abstract boolean isDriverReady()
public void verifyDriverReady()
throws StateStoreUnavailableException
StateStoreUnavailableException - If the driver is not ready.public abstract void close()
throws java.lang.Exception
java.lang.Exception - if something goes wrong while closing the state store driver connection.public long getTime()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.