Class TieredStorageConfiguration
java.lang.Object
org.apache.bookkeeper.mledger.offload.jcloud.provider.TieredStorageConfiguration
Class responsible for holding all of the tiered storage configuration data
that is set in the global Pulsar broker.conf file.
This class is used by the BlobStoreManagedLedgerOffloader to determine which JCloud provider to use for Tiered Storage offloand, along with the associated properties such as region, bucket, user credentials, etc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilds a JCloudprovider BlobStore from the TieredStorageConfiguration, which allows us to publish and retrieve data blocks from the external storage system.static interfaceChecks the given TieredStorageConfiguration to see if all of the required properties are set, and that all properties are valid.static interfaceConstructs the proper credentials for the given JCloud provider from the given TieredStorageConfiguration. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final longstatic final longstatic final longstatic final Stringstatic final Stringstatic final Stringprotected static final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TieredStorageConfigurationstatic TieredStorageConfigurationcreate(Properties props) org.jclouds.blobstore.BlobStoregetConfigProperty(String propertyName) Used to find a specific configuration property other than one of the predefined ones.longlonglongprotected PropertiesSupplier<org.jclouds.domain.Credentials>org.jclouds.providers.ProviderMetadatavoidsetProvider(JCloudBlobStoreProvider provider) voidsetProviderCredentials(Supplier<org.jclouds.domain.Credentials> credentials) voidvoidvoidvalidate()
-
Field Details
-
BLOB_STORE_PROVIDER_KEY
- See Also:
-
METADATA_FIELD_BUCKET
- See Also:
-
METADATA_FIELD_REGION
- See Also:
-
METADATA_FIELD_ENDPOINT
- See Also:
-
METADATA_FIELD_MAX_BLOCK_SIZE
- See Also:
-
METADATA_FIELD_MIN_BLOCK_SIZE
- See Also:
-
METADATA_FIELD_READ_BUFFER_SIZE
- See Also:
-
METADATA_FIELD_WRITE_BUFFER_SIZE
- See Also:
-
OFFLOADER_PROPERTY_PREFIX
- See Also:
-
MAX_OFFLOAD_SEGMENT_ROLLOVER_TIME_SEC
- See Also:
-
MIN_OFFLOAD_SEGMENT_ROLLOVER_TIME_SEC
- See Also:
-
DEFAULT_MAX_SEGMENT_TIME_IN_SECOND
public static final long DEFAULT_MAX_SEGMENT_TIME_IN_SECOND- See Also:
-
DEFAULT_MIN_SEGMENT_TIME_IN_SECOND
public static final long DEFAULT_MIN_SEGMENT_TIME_IN_SECOND- See Also:
-
MAX_OFFLOAD_SEGMENT_SIZE_IN_BYTES
- See Also:
-
DEFAULT_MAX_SEGMENT_SIZE_IN_BYTES
public static final long DEFAULT_MAX_SEGMENT_SIZE_IN_BYTES- See Also:
-
MB
protected static final int MB- See Also:
-
GCS_ACCOUNT_KEY_FILE_FIELD
- See Also:
-
S3_ID_FIELD
- See Also:
-
S3_SECRET_FIELD
- See Also:
-
S3_ROLE_FIELD
- See Also:
-
S3_ROLE_SESSION_NAME_FIELD
- See Also:
-
-
Constructor Details
-
TieredStorageConfiguration
-
-
Method Details
-
create
- Throws:
IOException
-
create
-
getKeys
-
getBlobStoreProviderKey
-
getDriver
-
getRegion
-
setRegion
-
getBucket
-
getServiceEndpoint
-
getMaxSegmentTimeInSecond
public long getMaxSegmentTimeInSecond() -
getMinSegmentTimeInSecond
public long getMinSegmentTimeInSecond() -
getMaxSegmentSizeInBytes
public long getMaxSegmentSizeInBytes() -
setServiceEndpoint
-
getConfigProperty
Used to find a specific configuration property other than one of the predefined ones. This allows for any number of provider specific, or new properties to added in the future.- Parameters:
propertyName-- Returns:
-
getProvider
-
setProvider
-
getMaxBlockSizeInBytes
-
getMinBlockSizeInBytes
-
getReadBufferSizeInBytes
-
getWriteBufferSizeInBytes
-
getProviderCredentials
-
setProviderCredentials
-
validate
public void validate() -
getProviderMetadata
public org.jclouds.providers.ProviderMetadata getProviderMetadata() -
getBlobStoreLocation
-
getBlobStore
public org.jclouds.blobstore.BlobStore getBlobStore() -
getOffloadDriverMetadata
-
getOverrides
-