Package org.apache.iceberg.aws.s3
Class S3InputFile
java.lang.Object
org.apache.iceberg.aws.s3.S3InputFile
- All Implemented Interfaces:
org.apache.iceberg.encryption.NativelyEncryptedFile,org.apache.iceberg.io.InputFile
public class S3InputFile
extends Object
implements org.apache.iceberg.io.InputFile, org.apache.iceberg.encryption.NativelyEncryptedFile
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Note: this may be stale if file was deleted since metadata is cached for size/existence checks.static S3InputFilefromLocation(String location, long length, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.static S3InputFilefromLocation(String location, long length, software.amazon.awssdk.services.s3.S3Client client, software.amazon.awssdk.services.s3.S3AsyncClient asyncClient, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, long, PrefixedS3Client, MetricsContext)instead.static S3InputFilefromLocation(String location, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, PrefixedS3Client, MetricsContext)instead.static S3InputFilefromLocation(String location, software.amazon.awssdk.services.s3.S3Client client, software.amazon.awssdk.services.s3.S3AsyncClient asyncClient, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, PrefixedS3Client, MetricsContext)instead.longNote: this may be stale if file was deleted since metadata is cached for size/existence checks.protected software.amazon.awssdk.services.s3.model.HeadObjectResponselocation()protected org.apache.iceberg.metrics.MetricsContextmetrics()org.apache.iceberg.encryption.NativeFileCryptoParametersorg.apache.iceberg.io.SeekableInputStreamvoidsetNativeCryptoParameters(org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.iceberg.io.InputFile
exists, location
-
Method Details
-
fromLocation
@Deprecated public static S3InputFile fromLocation(String location, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, PrefixedS3Client, MetricsContext)instead.Creates aS3InputFilefrom the given parameters. -
fromLocation
@Deprecated public static S3InputFile fromLocation(String location, software.amazon.awssdk.services.s3.S3Client client, software.amazon.awssdk.services.s3.S3AsyncClient asyncClient, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, PrefixedS3Client, MetricsContext)instead.Creates aS3InputFilefrom the given parameters. -
fromLocation
@Deprecated public static S3InputFile fromLocation(String location, long length, software.amazon.awssdk.services.s3.S3Client client, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, long, PrefixedS3Client, MetricsContext)instead.Creates aS3InputFilefrom the given parameters. -
fromLocation
@Deprecated public static S3InputFile fromLocation(String location, long length, software.amazon.awssdk.services.s3.S3Client client, software.amazon.awssdk.services.s3.S3AsyncClient asyncClient, S3FileIOProperties s3FileIOProperties, org.apache.iceberg.metrics.MetricsContext metrics) Deprecated.since 1.10.0, will be removed in 1.11.0; usefromLocation(String, long, PrefixedS3Client, MetricsContext)instead.Creates aS3InputFilefrom the given parameters. -
getLength
public long getLength()Note: this may be stale if file was deleted since metadata is cached for size/existence checks.- Specified by:
getLengthin interfaceorg.apache.iceberg.io.InputFile- Returns:
- content length
-
newStream
public org.apache.iceberg.io.SeekableInputStream newStream()- Specified by:
newStreamin interfaceorg.apache.iceberg.io.InputFile
-
nativeCryptoParameters
public org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters()- Specified by:
nativeCryptoParametersin interfaceorg.apache.iceberg.encryption.NativelyEncryptedFile
-
setNativeCryptoParameters
public void setNativeCryptoParameters(org.apache.iceberg.encryption.NativeFileCryptoParameters nativeCryptoParameters) - Specified by:
setNativeCryptoParametersin interfaceorg.apache.iceberg.encryption.NativelyEncryptedFile
-
location
-
s3FileIOProperties
-
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
-
fromLocation(String, long, PrefixedS3Client, MetricsContext)instead.