Interface DoraWorker

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.google.common.util.concurrent.ListenableFuture<java.util.List<alluxio.grpc.RouteFailure>> copy​(java.util.List<alluxio.grpc.Route> routes, alluxio.grpc.UfsReadOptions readOptions, alluxio.grpc.WriteOptions writeOptions)
      Copies files from src to dst.
      BlockReader createFileReader​(java.lang.String fileId, long offset, boolean positionShort, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions options)
      Creates the file reader to read from Alluxio dora.
      FileInfo getFileInfo​(java.lang.String fileId, alluxio.grpc.GetStatusPOptions options)
      Gets the file information.
      boolean invalidateCachedFile​(FileInfo fileInfo)
      Invalidate all cached pages of this file.
      UfsStatus[] listStatus​(java.lang.String path, alluxio.grpc.ListStatusPOptions options)
      List status from Under File System.
      com.google.common.util.concurrent.ListenableFuture<java.util.List<alluxio.grpc.FileFailure>> load​(java.util.List<alluxio.grpc.File> files, alluxio.grpc.UfsReadOptions options)
      Loads files from UFS to Alluxio.
    • Method Detail

      • getFileInfo

        FileInfo getFileInfo​(java.lang.String fileId,
                             alluxio.grpc.GetStatusPOptions options)
                      throws java.io.IOException,
                             AccessControlException
        Gets the file information.
        Parameters:
        fileId - the file id
        options - the options for the GetStatusPRequest
        Returns:
        the file info
        Throws:
        java.io.IOException
        AccessControlException
      • listStatus

        @Nullable
        UfsStatus[] listStatus​(java.lang.String path,
                               alluxio.grpc.ListStatusPOptions options)
                        throws java.io.IOException,
                               AccessControlException
        List status from Under File System. Please refer to UnderFileSystem.listStatus().
        Parameters:
        path - the path of a dir or file
        options - the option for listStatus()
        Returns:
        An array with the statuses of the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory.
        Throws:
        java.io.IOException
        AccessControlException
      • invalidateCachedFile

        boolean invalidateCachedFile​(FileInfo fileInfo)
        Invalidate all cached pages of this file.
        Parameters:
        fileInfo - the FileInfo of this file. Cached pages are identified by PageId and PageId is generated from fileInfo.fullUfsPath.
        Returns:
        successful or not
      • createFileReader

        BlockReader createFileReader​(java.lang.String fileId,
                                     long offset,
                                     boolean positionShort,
                                     alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions options)
                              throws java.io.IOException,
                                     AccessControlException
        Creates the file reader to read from Alluxio dora. Owner of this block reader must close it or lock will leak.
        Parameters:
        fileId - the ID of the UFS file
        offset - the offset within the block
        positionShort - whether the operation is using positioned read to a small buffer size
        options - the options
        Returns:
        a block reader to read data from
        Throws:
        java.io.IOException - if it fails to get block reader
        AccessControlException
      • load

        com.google.common.util.concurrent.ListenableFuture<java.util.List<alluxio.grpc.FileFailure>> load​(java.util.List<alluxio.grpc.File> files,
                                                                                                          alluxio.grpc.UfsReadOptions options)
        Loads files from UFS to Alluxio.
        Parameters:
        files - the files to load
        options -
        Returns:
        a list of failed files
      • copy

        com.google.common.util.concurrent.ListenableFuture<java.util.List<alluxio.grpc.RouteFailure>> copy​(java.util.List<alluxio.grpc.Route> routes,
                                                                                                           alluxio.grpc.UfsReadOptions readOptions,
                                                                                                           alluxio.grpc.WriteOptions writeOptions)
        Copies files from src to dst.
        Parameters:
        routes - the files to copy
        readOptions - the options for reading
        writeOptions - the options for writing
        Returns:
        a list of failed files