public class KVTableStatePersistor extends Object implements DatasetStatePersistor
DatasetStatePersistor
that uses a row of a KeyValueTable
for persistence.Constructor and Description |
---|
KVTableStatePersistor(String kvTableName,
String rowKey) |
Modifier and Type | Method and Description |
---|---|
void |
persistState(DatasetContext datasetContext,
byte[] state)
Writes the serialized bytes of the state of the partition consuming process.
|
byte[] |
readState(DatasetContext datasetContext) |
public byte[] readState(DatasetContext datasetContext)
readState
in interface DatasetStatePersistor
datasetContext
- context to use to instantiate dataset(s) for reading the statepublic void persistState(DatasetContext datasetContext, byte[] state)
DatasetStatePersistor
persistState
in interface DatasetStatePersistor
datasetContext
- context to use to instantiate dataset(s) for persisting the statestate
- the bytes to persistCopyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.