Class S3XFileSystemInfo


  • public class S3XFileSystemInfo
    extends S3FileSystemInfo
    Populates fields with information extracted by the S3 URI provided. This implementation is for standard AWS buckets as described in section "Accessing a bucket using S3://" in https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html

    It also computes the file system key that can be used to identify a runtime instance of a S3FileSystem (for caching purposes for example). In this implementation the key is the bucket name (which is unique in the AWS S3 namespace).

    • Constructor Detail

      • S3XFileSystemInfo

        public S3XFileSystemInfo​(java.net.URI uri)
                          throws java.lang.IllegalArgumentException
        Creates a new instance and populates it with the information extracted from uri. The provided uri is parsed accordingly to the following format:

        <p> s3x://[accessKey:accessSecret@]endpoint[:port]/bucket/key <p>

        Please note that the authority part of the URI (endpoint[:port] above) is always considered a HTTP(S) endpoint, therefore the name of the bucket is the first element of the path. The remaining path elements will be the object key.

        Additionally key is computed as endpoint/bucket/accessKey

        Parameters:
        uri - a S3 URI
        Throws:
        java.lang.IllegalArgumentException - if URI contains invalid components (e.g. an invalid bucket name)