public static final class AbstractS3ACommitter.ActiveCommit extends Object
Constructor and Description |
---|
ActiveCommit(org.apache.hadoop.fs.FileSystem sourceFS,
List<? extends org.apache.hadoop.fs.FileStatus> sourceFiles)
Construct from a source FS and list of files.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.hadoop.fs.FileStatus status) |
static AbstractS3ACommitter.ActiveCommit |
empty()
Get the empty entry.
|
static AbstractS3ACommitter.ActiveCommit |
fromStatusIterator(org.apache.hadoop.fs.FileSystem pendingFS,
org.apache.hadoop.fs.RemoteIterator<? extends org.apache.hadoop.fs.FileStatus> statuses)
Create an active commit of the given pending files.
|
long |
getCommittedBytes() |
int |
getCommittedFileCount() |
List<String> |
getCommittedObjects() |
org.apache.hadoop.fs.statistics.IOStatisticsSnapshot |
getIOStatistics() |
List<org.apache.hadoop.fs.FileStatus> |
getSourceFiles() |
org.apache.hadoop.fs.FileSystem |
getSourceFS() |
boolean |
isEmpty() |
void |
pendingsetCommitted(org.apache.hadoop.fs.statistics.IOStatistics sourceStatistics)
Callback when a pendingset has been committed,
including any source statistics.
|
int |
size() |
void |
uploadCommitted(String key,
long size)
Note that a file was committed.
|
public ActiveCommit(org.apache.hadoop.fs.FileSystem sourceFS, List<? extends org.apache.hadoop.fs.FileStatus> sourceFiles)
sourceFS
- filesystem containing the list of pending filessourceFiles
- .pendingset files to load and commit.public static AbstractS3ACommitter.ActiveCommit fromStatusIterator(org.apache.hadoop.fs.FileSystem pendingFS, org.apache.hadoop.fs.RemoteIterator<? extends org.apache.hadoop.fs.FileStatus> statuses) throws IOException
pendingFS
- source filesystem.statuses
- iterator of file status or subclass to use.IOException
- if the iterator raises one.public static AbstractS3ACommitter.ActiveCommit empty()
public List<org.apache.hadoop.fs.FileStatus> getSourceFiles()
public org.apache.hadoop.fs.FileSystem getSourceFS()
public void uploadCommitted(String key, long size)
key
- key of the committed object.size
- size in bytes.public void pendingsetCommitted(org.apache.hadoop.fs.statistics.IOStatistics sourceStatistics)
sourceStatistics
- any source statisticspublic org.apache.hadoop.fs.statistics.IOStatisticsSnapshot getIOStatistics()
public int getCommittedFileCount()
public long getCommittedBytes()
public int size()
public boolean isEmpty()
public void add(org.apache.hadoop.fs.FileStatus status)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.