Package alluxio.cli

Class BasicNonByteBufferOperations

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Boolean>

    public final class BasicNonByteBufferOperations
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.lang.Boolean>
    Basic example of using the FileSystem for writing to and reading from files.

    This class is different from BasicOperations in the way writes happen. Over there ByteBuffer is used directly, where as here byte data is done via input/output streams.

    This example also let users play around with how to work with files a bit more. The AlluxioStorageType is something that can be set, as well as ability to delete file if exists.

    • Constructor Summary

      Constructors 
      Constructor Description
      BasicNonByteBufferOperations​(alluxio.AlluxioURI filePath, alluxio.client.ReadType readType, alluxio.client.WriteType writeType, boolean deleteIfExists, int length, alluxio.client.file.FileSystemContext fsContext, alluxio.grpc.WorkerNetAddress workerNetAddress)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Boolean call()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicNonByteBufferOperations

        public BasicNonByteBufferOperations​(alluxio.AlluxioURI filePath,
                                            alluxio.client.ReadType readType,
                                            alluxio.client.WriteType writeType,
                                            boolean deleteIfExists,
                                            int length,
                                            alluxio.client.file.FileSystemContext fsContext,
                                            @Nullable
                                            alluxio.grpc.WorkerNetAddress workerNetAddress)
        Parameters:
        filePath - the path for the files
        readType - the ReadType
        writeType - the WriteType
        deleteIfExists - delete files if they already exist
        length - the number of files
        fsContext - the FileSystemContext to use for client operations
        workerNetAddress - if not null, the worker address the file data will be written into
    • Method Detail

      • call

        public java.lang.Boolean call()
                               throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<java.lang.Boolean>
        Throws:
        java.lang.Exception