@ThreadSafe @PublicApi public final class FileSystemCommandUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
setPinned(FileSystem fs,
AlluxioURI path,
boolean pinned,
List<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, 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 expiryAlluxioException
IOException
public static void setPinned(FileSystem fs, AlluxioURI path, boolean pinned, List<String> mediumTypes) throws AlluxioException, 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 toAlluxioException
IOException
Copyright © 2023. All Rights Reserved.