public static class ReadOptions.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ReadOptions |
build() |
ReadOptions.Builder |
setBlockSize(int blockSize)
Block size in bytes.
|
ReadOptions.Builder |
setIndexCacheSize(int indexCacheSize)
Deprecated.
|
ReadOptions.Builder |
setIndexCacheSizeBytes(long indexCacheSizeBytes)
Index cache size in bytes.
|
ReadOptions.Builder |
setMetadataCacheSize(int metadataCacheSize)
Deprecated.
Use
setMetadataCacheSizeBytes(long) instead |
ReadOptions.Builder |
setMetadataCacheSizeBytes(long metadataCacheSizeBytes)
Size of the metadata cache in bytes.
|
ReadOptions.Builder |
setS3CredentialsRefreshOffsetSeconds(long s3CredentialsRefreshOffsetSeconds)
Set the number of seconds before credential expiration to trigger a refresh.
|
ReadOptions.Builder |
setSerializedManifest(ByteBuffer serializedManifest)
Use a serialized manifest instead of loading it from the object store.
|
ReadOptions.Builder |
setStorageOptions(Map<String,String> storageOptions)
Set storage options.
|
ReadOptions.Builder |
setStorageOptionsProvider(StorageOptionsProvider storageOptionsProvider)
Set a custom storage options provider for automatic storage options refresh.
|
ReadOptions.Builder |
setVersion(int version)
Set the version of the dataset to read.
|
public ReadOptions.Builder setVersion(int version)
version - the version of the datasetpublic ReadOptions.Builder setBlockSize(int blockSize)
blockSize - the block size in bytespublic ReadOptions.Builder setIndexCacheSizeBytes(long indexCacheSizeBytes)
indexCacheSizeBytes - the index cache size in bytes@Deprecated public ReadOptions.Builder setIndexCacheSize(int indexCacheSize)
indexCacheSize - the index cache sizepublic ReadOptions.Builder setMetadataCacheSizeBytes(long metadataCacheSizeBytes)
metadataCacheSizeBytes - the metadata cache size in bytes@Deprecated public ReadOptions.Builder setMetadataCacheSize(int metadataCacheSize)
setMetadataCacheSizeBytes(long) insteadsetMetadataCacheSizeBytes(long) instead.metadataCacheSize - the metadata cache size (entry count)public ReadOptions.Builder setStorageOptions(Map<String,String> storageOptions)
storageOptions - the storage optionspublic ReadOptions.Builder setSerializedManifest(ByteBuffer serializedManifest)
serializedManifest - the serialized manifest as a ByteBufferpublic ReadOptions.Builder setStorageOptionsProvider(StorageOptionsProvider storageOptionsProvider)
The storage options provider will be called automatically before storage options expire, enabling long-running operations on cloud storage without interruption. This is currently only used for refreshing AWS temporary access credentials.
storageOptionsProvider - the storage options provider implementationpublic ReadOptions.Builder setS3CredentialsRefreshOffsetSeconds(long s3CredentialsRefreshOffsetSeconds)
Default is 60 seconds. Only applicable when using AWS S3 with temporary credentials. For example, if set to 60, credentials will be refreshed when they have less than 60 seconds remaining before expiration. This should be set shorter than the credential lifetime to avoid using expired credentials.
s3CredentialsRefreshOffsetSeconds - the refresh offset in secondspublic ReadOptions build()
Copyright © 2025. All rights reserved.