@NotThreadSafe public abstract class UfsStatus extends Object
UnderFileSystem
returns entries of this class.Modifier and Type | Field and Description |
---|---|
protected String |
mGroup |
protected boolean |
mIsDirectory |
protected Long |
mLastModifiedTimeMs
Last modified epoch time in ms, or null if it is not available.
|
protected short |
mMode |
protected String |
mName |
protected String |
mOwner |
protected AlluxioURI |
mUfsFullPath |
protected Map<String,byte[]> |
mXAttr |
Modifier | Constructor and Description |
---|---|
protected |
UfsStatus(String name,
boolean isDirectory,
String owner,
String group,
short mode,
Long lastModifiedTimeMs,
Map<String,byte[]> xAttrs)
Creates new instance of
UfsStatus . |
protected |
UfsStatus(UfsStatus status)
Creates a new instance of
UfsStatus as a copy. |
Modifier and Type | Method and Description |
---|---|
UfsFileStatus |
asUfsFileStatus() |
static String[] |
convertToNames(UfsStatus[] children)
Converts an array of UFS file status to a listing result where each element in the array is
a file or directory name.
|
abstract UfsStatus |
copy()
Create a copy of
UfsStatus . |
boolean |
equals(Object o) |
static UfsStatus |
fromProto(UfsStatus ufsStatus) |
String |
getGroup()
Gets the group of the given path.
|
Long |
getLastModifiedTime()
Gets the UTC time of when the indicated path was modified recently in ms, or null if the last
modified time is not available.
|
short |
getMode()
Gets the mode of the given path in short format, e.g 0700.
|
String |
getName() |
String |
getOwner()
Gets the owner of the given path.
|
AlluxioURI |
getUfsFullPath() |
Map<String,byte[]> |
getXAttr()
Returns the extended attributes from the Ufs, if any.
|
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
UfsStatus |
setName(String name)
Set the name of file or directory.
|
void |
setUfsFullPath(AlluxioURI ufsFullPath) |
UfsStatus |
toProto() |
protected com.google.common.base.MoreObjects.ToStringHelper |
toStringHelper() |
protected final boolean mIsDirectory
protected final Long mLastModifiedTimeMs
protected String mName
protected AlluxioURI mUfsFullPath
protected final String mOwner
protected final String mGroup
protected final short mMode
protected UfsStatus(String name, boolean isDirectory, String owner, String group, short mode, @Nullable Long lastModifiedTimeMs, @Nullable Map<String,byte[]> xAttrs)
UfsStatus
.name
- relative path of file or directoryisDirectory
- whether the path is a directoryowner
- of the filegroup
- of the filemode
- of the filelastModifiedTimeMs
- last modified epoch time in ms, or null if it is not availablexAttrs
- any extended attributes on the inodepublic AlluxioURI getUfsFullPath()
public void setUfsFullPath(AlluxioURI ufsFullPath)
ufsFullPath
- the ufs full path@Nullable public static String[] convertToNames(UfsStatus[] children)
children
- array of listing statusespublic boolean isDirectory()
public boolean isFile()
public String getGroup()
@Nullable public Long getLastModifiedTime()
public short getMode()
public String getName()
public String getOwner()
@Nullable public Map<String,byte[]> getXAttr()
public UfsStatus setName(String name)
name
- of entryprotected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
public UfsStatus toProto()
public static UfsStatus fromProto(UfsStatus ufsStatus)
ufsStatus
- the UfsStatus protobufpublic UfsFileStatus asUfsFileStatus()
Copyright © 2023. All Rights Reserved.