Class OSSPositionReader

  • All Implemented Interfaces:
    alluxio.PositionReader, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public class OSSPositionReader
    extends alluxio.underfs.ObjectPositionReader
    Implementation of ObjectPositionReader that reads from OSS object store.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.aliyun.oss.OSS mClient
      Client for operations with Aliyun OSS.
      • Fields inherited from class alluxio.underfs.ObjectPositionReader

        mBucketName, mFileLength, mPath
    • Constructor Summary

      Constructors 
      Constructor Description
      OSSPositionReader​(com.aliyun.oss.OSS client, java.lang.String bucketName, java.lang.String path, long fileLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.io.InputStream openObjectInputStream​(long position, int bytesToRead)  
      • Methods inherited from class alluxio.underfs.ObjectPositionReader

        readInternal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface alluxio.PositionReader

        close, read, read, read, read, read
    • Field Detail

      • mClient

        protected final com.aliyun.oss.OSS mClient
        Client for operations with Aliyun OSS.
    • Constructor Detail

      • OSSPositionReader

        public OSSPositionReader​(com.aliyun.oss.OSS client,
                                 java.lang.String bucketName,
                                 java.lang.String path,
                                 long fileLength)
        Parameters:
        client - the Aliyun OSS client
        bucketName - the bucket name
        path - the file path
        fileLength - the file length
    • Method Detail

      • openObjectInputStream

        protected java.io.InputStream openObjectInputStream​(long position,
                                                            int bytesToRead)
                                                     throws java.io.IOException
        Specified by:
        openObjectInputStream in class alluxio.underfs.ObjectPositionReader
        Throws:
        java.io.IOException