@InterfaceAudience.Private
@InterfaceStability.Evolving
public class S3AFileStatus
extends org.apache.hadoop.fs.FileStatus
implements org.apache.hadoop.fs.EtagSource
getModificationTime()
.
The subclass is private as it should not be created directly.Constructor and Description |
---|
S3AFileStatus(boolean isemptydir,
org.apache.hadoop.fs.Path path,
String owner)
Create a directory status.
|
S3AFileStatus(long length,
long modification_time,
org.apache.hadoop.fs.Path path,
long blockSize,
String owner,
String eTag,
String versionId)
A simple file.
|
S3AFileStatus(Tristate isemptydir,
org.apache.hadoop.fs.Path path,
String owner)
Create a directory status.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compare if this object is equal to another object.
|
static S3AFileStatus |
fromFileStatus(org.apache.hadoop.fs.FileStatus source,
Tristate isEmptyDirectory,
String eTag,
String versionId)
Convenience constructor for creating from a vanilla FileStatus plus
an isEmptyDirectory flag.
|
String |
getEtag() |
String |
getETag()
Deprecated.
use
EtagSource.getEtag() for
public access. |
long |
getModificationTime()
Get the modification time of the file/directory.
|
String |
getVersionId() |
int |
hashCode()
Returns a hash code value for the object, which is defined as
the hash code of the path name.
|
Tristate |
isEmptyDirectory() |
void |
setIsEmptyDirectory(Tristate isEmptyDirectory)
Update isEmptyDirectory attribute.
|
void |
setVersionId(String versionId)
set the S3 object versionId, else null.
|
String |
toString() |
attributes, compareTo, compareTo, getAccessTime, getBlockSize, getGroup, getLen, getOwner, getPath, getPermission, getReplication, getSymlink, hasAcl, isDir, isDirectory, isEncrypted, isErasureCoded, isFile, isSnapshotEnabled, isSymlink, readFields, setGroup, setOwner, setPath, setPermission, setSymlink, validateObject, write
public S3AFileStatus(boolean isemptydir, org.apache.hadoop.fs.Path path, String owner)
isemptydir
- is this an empty directory?path
- the pathowner
- the ownerpublic S3AFileStatus(Tristate isemptydir, org.apache.hadoop.fs.Path path, String owner)
isemptydir
- is this an empty directory?path
- the pathowner
- the ownerpublic S3AFileStatus(long length, long modification_time, org.apache.hadoop.fs.Path path, long blockSize, String owner, String eTag, String versionId)
length
- file lengthmodification_time
- mod timepath
- pathblockSize
- block sizeowner
- ownereTag
- eTag of the S3 object if available, else nullversionId
- versionId of the S3 object if available, else nullpublic static S3AFileStatus fromFileStatus(org.apache.hadoop.fs.FileStatus source, Tristate isEmptyDirectory, String eTag, String versionId)
source
- FileStatus to convert to S3AFileStatusisEmptyDirectory
- TRUE/FALSE if known to be / not be an empty
directory, UNKNOWN if that information was not computed.eTag
- eTag of the S3 object if available, else nullversionId
- versionId of the S3 object if available, else nullpublic Tristate isEmptyDirectory()
public void setIsEmptyDirectory(Tristate isEmptyDirectory)
isEmptyDirectory
- new isEmptyDirectory value@Deprecated public String getETag()
EtagSource.getEtag()
for
public access.public String getEtag()
getEtag
in interface org.apache.hadoop.fs.EtagSource
public String getVersionId()
public void setVersionId(String versionId)
versionId
- version ID or null.public boolean equals(Object o)
equals
in class org.apache.hadoop.fs.FileStatus
o
- the object to be compared.public int hashCode()
hashCode
in class org.apache.hadoop.fs.FileStatus
public long getModificationTime()
getModificationTime
in class org.apache.hadoop.fs.FileStatus
public String toString()
toString
in class org.apache.hadoop.fs.FileStatus
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.