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