Package org.apache.iceberg.aws.s3
Class S3InputFile
- java.lang.Object
-
- org.apache.iceberg.aws.s3.S3InputFile
-
- All Implemented Interfaces:
NativelyEncryptedFile
,InputFile
public class S3InputFile extends java.lang.Object implements InputFile, NativelyEncryptedFile
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsProperties
awsProperties()
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, AwsProperties awsProperties, MetricsContext metrics)
static S3InputFile
fromLocation(java.lang.String location, software.amazon.awssdk.services.s3.S3Client client, AwsProperties awsProperties, 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 MetricsContext
metrics()
NativeFileCryptoParameters
nativeCryptoParameters()
SeekableInputStream
newStream()
Opens a newSeekableInputStream
for the underlying data filevoid
setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters)
java.lang.String
toString()
-
-
-
Method Detail
-
fromLocation
public static S3InputFile fromLocation(java.lang.String location, software.amazon.awssdk.services.s3.S3Client client, AwsProperties awsProperties, MetricsContext metrics)
-
fromLocation
public static S3InputFile fromLocation(java.lang.String location, long length, software.amazon.awssdk.services.s3.S3Client client, AwsProperties awsProperties, MetricsContext metrics)
-
getLength
public long getLength()
Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
-
newStream
public SeekableInputStream newStream()
Description copied from interface:InputFile
Opens a newSeekableInputStream
for the underlying data file
-
nativeCryptoParameters
public NativeFileCryptoParameters nativeCryptoParameters()
- Specified by:
nativeCryptoParameters
in interfaceNativelyEncryptedFile
-
setNativeCryptoParameters
public void setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters)
- Specified by:
setNativeCryptoParameters
in interfaceNativelyEncryptedFile
-
location
public java.lang.String location()
-
awsProperties
public AwsProperties awsProperties()
-
metrics
protected 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 classjava.lang.Object
-
-