public class S3ListResult extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
S3ListResult(com.amazonaws.services.s3.model.ObjectListing v1,
com.amazonaws.services.s3.model.ListObjectsV2Result v2) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getCommonPrefixes() |
List<com.amazonaws.services.s3.model.S3ObjectSummary> |
getObjectSummaries() |
com.amazonaws.services.s3.model.ObjectListing |
getV1() |
com.amazonaws.services.s3.model.ListObjectsV2Result |
getV2() |
boolean |
hasPrefixesOrObjects(ContextAccessors accessors,
Set<org.apache.hadoop.fs.Path> tombstones)
Does this listing have prefixes or objects after entries with
tombstones have been stripped?
|
boolean |
isEmptyOfKeys(ContextAccessors accessors,
Collection<String> keys,
Set<org.apache.hadoop.fs.Path> tombstones)
Helper function to determine if a collection of keys is empty
after accounting for tombstone markers (if provided).
|
boolean |
isEmptyOfObjects(ContextAccessors accessors,
Set<org.apache.hadoop.fs.Path> tombstones)
Is the list of object summaries empty
after accounting for tombstone markers (if provided)?
|
boolean |
isTruncated() |
boolean |
isV1()
Is this a v1 API result or v2?
|
void |
logAtDebug(org.slf4j.Logger log)
Dmp the result at debug level.
|
boolean |
representsEmptyDirectory(ContextAccessors contextAccessors,
String dirKey,
Set<org.apache.hadoop.fs.Path> tombstones)
Does this listing represent an empty directory?
|
static S3ListResult |
v1(com.amazonaws.services.s3.model.ObjectListing result)
Restricted constructors to ensure v1 or v2, not both.
|
static S3ListResult |
v2(com.amazonaws.services.s3.model.ListObjectsV2Result result)
Restricted constructors to ensure v1 or v2, not both.
|
protected S3ListResult(com.amazonaws.services.s3.model.ObjectListing v1,
com.amazonaws.services.s3.model.ListObjectsV2Result v2)
public static S3ListResult v1(com.amazonaws.services.s3.model.ObjectListing result)
result - v1 resultpublic static S3ListResult v2(com.amazonaws.services.s3.model.ListObjectsV2Result result)
result - v2 resultpublic boolean isV1()
public com.amazonaws.services.s3.model.ObjectListing getV1()
public com.amazonaws.services.s3.model.ListObjectsV2Result getV2()
public List<com.amazonaws.services.s3.model.S3ObjectSummary> getObjectSummaries()
public boolean isTruncated()
public boolean isEmptyOfObjects(ContextAccessors accessors, Set<org.apache.hadoop.fs.Path> tombstones)
accessors - callback for key to path mapping.tombstones - Set of tombstone markers, or null if not applicable.public boolean hasPrefixesOrObjects(ContextAccessors accessors, Set<org.apache.hadoop.fs.Path> tombstones)
accessors - callback for key to path mapping.tombstones - Set of tombstone markers, or null if not applicable.public boolean isEmptyOfKeys(ContextAccessors accessors, Collection<String> keys, Set<org.apache.hadoop.fs.Path> tombstones)
accessors - callback for key to path mapping.keys - Collection of path (prefixes / directories or keys).tombstones - Set of tombstone markers, or null if not applicable.public boolean representsEmptyDirectory(ContextAccessors contextAccessors, String dirKey, Set<org.apache.hadoop.fs.Path> tombstones)
contextAccessors - callback for key to path mapping.dirKey - directory keytombstones - Set of tombstone markers, or null if not applicable.public void logAtDebug(org.slf4j.Logger log)
log - log to useCopyright © 2008–2022 Apache Software Foundation. All rights reserved.