@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class PersistentCommitData extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
VERSION
Supported version value: 2.
|
| Constructor and Description |
|---|
PersistentCommitData() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
save(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean overwrite)
Save to a hadoop filesystem.
|
abstract byte[] |
toBytes()
Serialize to JSON and then to a byte array, after performing a
preflight validation of the data to be saved.
|
abstract void |
validate()
Validate the data: those fields which must be non empty, must be set.
|
public static final int VERSION
serialVersionUID will change,
to avoid deserialization problems.public abstract void validate()
throws ValidationFailure
ValidationFailure - if the data is invalidpublic abstract byte[] toBytes()
throws IOException
IOException - serialization problem or validation failure.public abstract void save(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean overwrite)
throws IOException
fs - filesystempath - pathoverwrite - should any existing file be overwrittenIOException - IO exceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.