Class S3InputFile

  • All Implemented Interfaces:
    org.apache.iceberg.encryption.NativelyEncryptedFile, org.apache.iceberg.io.InputFile

    public class S3InputFile
    extends java.lang.Object
    implements org.apache.iceberg.io.InputFile, org.apache.iceberg.encryption.NativelyEncryptedFile
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists()
      Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
      static S3InputFile fromLocation​(java.lang.String location, long length, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics)  
      static S3InputFile fromLocation​(java.lang.String location, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics)  
      long getLength()
      Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
      protected software.amazon.awssdk.services.s3.model.HeadObjectResponse getObjectMetadata()  
      java.lang.String location()  
      protected org.apache.iceberg.metrics.MetricsContext metrics()  
      org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters()  
      org.apache.iceberg.io.SeekableInputStream newStream()  
      S3FileIOProperties s3FileIOProperties()  
      void setNativeCryptoParameters​(org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.iceberg.io.InputFile

        exists, location
    • Method Detail

      • fromLocation

        public static S3InputFile fromLocation​(java.lang.String location,
                                               software.amazon.awssdk.services.s3.S3Client client,
                                               S3FileIOProperties s3FileIOProperties,
                                               org.apache.iceberg.metrics.MetricsContext metrics)
      • fromLocation

        public static S3InputFile fromLocation​(java.lang.String location,
                                               long length,
                                               software.amazon.awssdk.services.s3.S3Client client,
                                               S3FileIOProperties s3FileIOProperties,
                                               org.apache.iceberg.metrics.MetricsContext metrics)
      • getLength

        public long getLength()
        Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
        Specified by:
        getLength in interface org.apache.iceberg.io.InputFile
        Returns:
        content length
      • newStream

        public org.apache.iceberg.io.SeekableInputStream newStream()
        Specified by:
        newStream in interface org.apache.iceberg.io.InputFile
      • nativeCryptoParameters

        public org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters()
        Specified by:
        nativeCryptoParameters in interface org.apache.iceberg.encryption.NativelyEncryptedFile
      • setNativeCryptoParameters

        public void setNativeCryptoParameters​(org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters)
        Specified by:
        setNativeCryptoParameters in interface org.apache.iceberg.encryption.NativelyEncryptedFile
      • location

        public java.lang.String location()
      • metrics

        protected org.apache.iceberg.metrics.MetricsContext metrics()
      • exists

        public boolean exists()
        Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
        Returns:
        flag
      • getObjectMetadata

        protected software.amazon.awssdk.services.s3.model.HeadObjectResponse getObjectMetadata()
                                                                                         throws software.amazon.awssdk.services.s3.model.S3Exception
        Throws:
        software.amazon.awssdk.services.s3.model.S3Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object