Class FileSystemCommandUtils


  • @ThreadSafe
    @PublicApi
    public final class FileSystemCommandUtils
    extends java.lang.Object
    Common util methods for executing commands.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setDirectChildrenLoaded​(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI path, boolean directChildrenLoaded)
      Sets direct children loaded.
      static void setPinned​(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 void setTtl​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.IOException
        Sets a new TTL value or unsets an existing TTL value for file at path.
        Parameters:
        fs - the file system for Alluxio
        path - the file path
        ttlMs - 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 value
        ttlAction - Action to perform on Ttl expiry
        Throws:
        alluxio.exception.AlluxioException
        java.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.IOException
        Sets pin state for the input path.
        Parameters:
        fs - The FileSystem client
        path - The AlluxioURI path as the input of the command
        pinned - the state to be set
        mediumTypes - a list of medium types to pin to
        Throws:
        alluxio.exception.AlluxioException
        java.io.IOException
      • setDirectChildrenLoaded

        public static void setDirectChildrenLoaded​(alluxio.client.file.FileSystem fs,
                                                   alluxio.AlluxioURI path,
                                                   boolean directChildrenLoaded)
                                            throws alluxio.exception.AlluxioException,
                                                   java.io.IOException
        Sets direct children loaded.
        Parameters:
        fs - The FileSystem client
        path - The AlluxioURI path as the input of the command
        directChildrenLoaded - true or false
        Throws:
        alluxio.exception.AlluxioException
        java.io.IOException