@ThreadSafe @PublicApi public final class FileSystemCommandUtils extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
setPinned(FileSystem fs,
AlluxioURI path,
boolean pinned,
java.util.List<java.lang.String> mediumTypes)
Sets pin state for the input path.
|
static void |
setTtl(FileSystem fs,
AlluxioURI path,
long ttlMs,
TtlAction ttlAction)
Sets a new TTL value or unsets an existing TTL value for file at path.
|
public static void setTtl(FileSystem fs, AlluxioURI path, long ttlMs, TtlAction ttlAction) throws AlluxioException, java.io.IOException
fs - the file system for Alluxiopath - the file pathttlMs - the TTL (time to live) value to use; it identifies duration (in milliseconds) the
created file should be kept around before it is automatically deleted, irrespective of
whether the file is pinned; Constants.NO_TTL means to unset the TTL valuettlAction - Action to perform on Ttl expiryAlluxioExceptionjava.io.IOExceptionpublic static void setPinned(FileSystem fs, AlluxioURI path, boolean pinned, java.util.List<java.lang.String> mediumTypes) throws AlluxioException, java.io.IOException
fs - The FileSystem clientpath - The AlluxioURI path as the input of the commandpinned - the state to be setmediumTypes - a list of medium types to pin toAlluxioExceptionjava.io.IOExceptionCopyright © 2022. All Rights Reserved.