Package alluxio.cli.fs.command
Class FileSystemCommandUtils
- java.lang.Object
-
- alluxio.cli.fs.command.FileSystemCommandUtils
-
@ThreadSafe @PublicApi public final class FileSystemCommandUtils extends java.lang.ObjectCommon util methods for executing commands.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetDirectChildrenLoaded(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, boolean directChildrenLoaded)Sets direct children loaded.static voidsetPinned(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, boolean pinned, java.util.List<java.lang.String> mediumTypes)Sets pin state for the input path.static voidsetTtl(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, long ttlMs, alluxio.grpc.TtlAction ttlAction)Sets a new TTL value or unsets an existing TTL value for file at path.
-
-
-
Method Detail
-
setTtl
public static void setTtl(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, long ttlMs, alluxio.grpc.TtlAction ttlAction) throws alluxio.exception.AlluxioException, java.io.IOExceptionSets a new TTL value or unsets an existing TTL value for file at path.- Parameters:
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_TTLmeans to unset the TTL valuettlAction- Action to perform on Ttl expiry- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
setPinned
public static void setPinned(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, boolean pinned, java.util.List<java.lang.String> mediumTypes) throws alluxio.exception.AlluxioException, java.io.IOExceptionSets pin state for the input path.- Parameters:
fs- TheFileSystemclientpath- TheAlluxioURIpath as the input of the commandpinned- the state to be setmediumTypes- a list of medium types to pin to- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
setDirectChildrenLoaded
public static void setDirectChildrenLoaded(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, boolean directChildrenLoaded) throws alluxio.exception.AlluxioException, java.io.IOExceptionSets direct children loaded.- Parameters:
fs- TheFileSystemclientpath- TheAlluxioURIpath as the input of the commanddirectChildrenLoaded- true or false- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
-