public class S3FileCheckpointer extends java.lang.Object implements S3Checkpointer
S3Tap
will re-retrieve the same data as previous executions.
By default this class will write all checkpoints to the directory [user.home]/.cascading/s3tap-checkpoints
in files named [bucket-name].txt.
A Function can be supplied to override the filename creation.
| Constructor and Description |
|---|
S3FileCheckpointer()
Constructor S3FileCheckpointer creates a new S3FileCheckpointer instance.
|
S3FileCheckpointer(java.util.function.Function<java.lang.String,java.lang.String> filename)
Constructor S3FileCheckpointer creates a new S3FileCheckpointer instance.
|
S3FileCheckpointer(java.nio.file.Path path)
Constructor S3FileCheckpointer creates a new S3FileCheckpointer instance.
|
S3FileCheckpointer(java.nio.file.Path path,
java.util.function.Function<java.lang.String,java.lang.String> filename)
Constructor S3FileCheckpointer creates a new S3FileCheckpointer instance.
|
S3FileCheckpointer(java.lang.String path)
Constructor S3FileCheckpointer creates a new S3FileCheckpointer instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Method commit notifies the instance that no more keys will be handled.
|
static java.nio.file.Path |
currentDir()
Method currentDir uses the System property
user.dir to retrieve the user's current working directory |
java.lang.String |
getLastKey(java.lang.String bucketName)
Method getLastKey returns the last known key or null for the requested bucket.
|
static java.nio.file.Path |
homeDir()
Method homeDir uses the System property
user.home to retrieve the user's home directory |
static java.nio.file.Path |
makeHidden(java.nio.file.Path path)
Method makeHidden will append
.cascading/s3tap-checkpoints to the given Path instance. |
void |
setLastKey(java.lang.String bucketName,
java.lang.String key)
Method setLastKey stores the last seen and consumed key for the given bucket.
|
public S3FileCheckpointer()
public S3FileCheckpointer(java.lang.String path)
path - of Stringpublic S3FileCheckpointer(java.nio.file.Path path)
path - of Pathpublic S3FileCheckpointer(java.util.function.Function<java.lang.String,java.lang.String> filename)
filename - of Functionpublic S3FileCheckpointer(java.nio.file.Path path, java.util.function.Function<java.lang.String,java.lang.String> filename)
path - of Pathfilename - of Functionpublic static java.nio.file.Path homeDir()
user.home to retrieve the user's home directorypublic static java.nio.file.Path currentDir()
user.dir to retrieve the user's current working directorypublic static java.nio.file.Path makeHidden(java.nio.file.Path path)
.cascading/s3tap-checkpoints to the given Path instance.path - of Pathpublic java.lang.String getLastKey(java.lang.String bucketName)
S3CheckpointergetLastKey in interface S3CheckpointerbucketName - of Stringpublic void setLastKey(java.lang.String bucketName, java.lang.String key)
S3CheckpointersetLastKey in interface S3CheckpointerbucketName - of Stringkey - of Stringpublic void commit()
S3Checkpointercommit in interface S3CheckpointerCopyright © 2007-2021 Cascading Maintainers. All Rights Reserved.