public class OffloadPoliciesImpl extends Object implements Serializable, OffloadPolicies
| Modifier and Type | Class and Description |
|---|---|
static class |
OffloadPoliciesImpl.OffloadPoliciesImplBuilder |
OffloadPolicies.Builder| Modifier and Type | Field and Description |
|---|---|
static List<Field> |
CONFIGURATION_FIELDS |
static int |
DEFAULT_MAX_BLOCK_SIZE_IN_BYTES |
static Long |
DEFAULT_OFFLOAD_DELETION_LAG_IN_MILLIS |
static int |
DEFAULT_OFFLOAD_MAX_PREFETCH_ROUNDS |
static int |
DEFAULT_OFFLOAD_MAX_THREADS |
static Long |
DEFAULT_OFFLOAD_THRESHOLD_IN_BYTES |
static OffloadedReadPriority |
DEFAULT_OFFLOADED_READ_PRIORITY |
static String |
DEFAULT_OFFLOADER_DIRECTORY |
static int |
DEFAULT_READ_BUFFER_SIZE_IN_BYTES |
static String |
DELETION_LAG_NAME_IN_CONF_FILE |
static com.google.common.collect.ImmutableList<String> |
DRIVER_NAMES |
static String |
OFFLOAD_THRESHOLD_NAME_IN_CONF_FILE |
| Constructor and Description |
|---|
OffloadPoliciesImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bucketValid() |
static OffloadPoliciesImpl.OffloadPoliciesImplBuilder |
builder() |
void |
compatibleWithBrokerConfigFile(Properties properties) |
static OffloadPoliciesImpl |
create(Properties properties) |
static OffloadPoliciesImpl |
create(String driver,
String region,
String bucket,
String endpoint,
String role,
String roleSessionName,
String credentialId,
String credentialSecret,
Integer maxBlockSizeInBytes,
Integer readBufferSizeInBytes,
Long offloadThresholdInBytes,
Long offloadDeletionLagInMillis,
OffloadedReadPriority readPriority) |
boolean |
driverSupported() |
static String |
getSupportedDriverNames() |
boolean |
isFileSystemDriver() |
boolean |
isGcsDriver() |
boolean |
isS3Driver() |
static OffloadPoliciesImpl |
mergeConfiguration(OffloadPoliciesImpl topicLevelPolicies,
OffloadPoliciesImpl nsLevelPolicies,
Properties brokerProperties)
Merge different level offload policies.
|
static OffloadPoliciesImpl |
oldPoliciesCompatible(OffloadPoliciesImpl nsLevelPolicies,
Policies policies)
This method is used to make a compatible with old policies.
|
Properties |
toProperties() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileSystemProfilePath, getFileSystemURI, getGcsManagedLedgerOffloadBucket, getGcsManagedLedgerOffloadMaxBlockSizeInBytes, getGcsManagedLedgerOffloadReadBufferSizeInBytes, getGcsManagedLedgerOffloadRegion, getGcsManagedLedgerOffloadServiceAccountKeyFile, getManagedLedgerOffloadBucket, getManagedLedgerOffloadDeletionLagInMillis, getManagedLedgerOffloadDriver, getManagedLedgerOffloadedReadPriority, getManagedLedgerOffloadMaxBlockSizeInBytes, getManagedLedgerOffloadMaxThreads, getManagedLedgerOffloadPrefetchRounds, getManagedLedgerOffloadReadBufferSizeInBytes, getManagedLedgerOffloadRegion, getManagedLedgerOffloadServiceEndpoint, getManagedLedgerOffloadThresholdInBytes, getOffloadersDirectory, getS3ManagedLedgerOffloadBucket, getS3ManagedLedgerOffloadCredentialId, getS3ManagedLedgerOffloadCredentialSecret, getS3ManagedLedgerOffloadMaxBlockSizeInBytes, getS3ManagedLedgerOffloadReadBufferSizeInBytes, getS3ManagedLedgerOffloadRegion, getS3ManagedLedgerOffloadRole, getS3ManagedLedgerOffloadRoleSessionName, getS3ManagedLedgerOffloadServiceEndpointpublic static final int DEFAULT_MAX_BLOCK_SIZE_IN_BYTES
public static final int DEFAULT_READ_BUFFER_SIZE_IN_BYTES
public static final int DEFAULT_OFFLOAD_MAX_THREADS
public static final int DEFAULT_OFFLOAD_MAX_PREFETCH_ROUNDS
public static final com.google.common.collect.ImmutableList<String> DRIVER_NAMES
public static final String DEFAULT_OFFLOADER_DIRECTORY
public static final Long DEFAULT_OFFLOAD_THRESHOLD_IN_BYTES
public static final Long DEFAULT_OFFLOAD_DELETION_LAG_IN_MILLIS
public static final String OFFLOAD_THRESHOLD_NAME_IN_CONF_FILE
public static final String DELETION_LAG_NAME_IN_CONF_FILE
public static final OffloadedReadPriority DEFAULT_OFFLOADED_READ_PRIORITY
public static OffloadPoliciesImpl create(String driver, String region, String bucket, String endpoint, String role, String roleSessionName, String credentialId, String credentialSecret, Integer maxBlockSizeInBytes, Integer readBufferSizeInBytes, Long offloadThresholdInBytes, Long offloadDeletionLagInMillis, OffloadedReadPriority readPriority)
public static OffloadPoliciesImpl create(Properties properties)
public static OffloadPoliciesImpl.OffloadPoliciesImplBuilder builder()
builder in interface OffloadPoliciespublic void compatibleWithBrokerConfigFile(Properties properties)
public boolean driverSupported()
public static String getSupportedDriverNames()
public boolean isS3Driver()
public boolean isGcsDriver()
public boolean isFileSystemDriver()
public boolean bucketValid()
public Properties toProperties()
public static OffloadPoliciesImpl oldPoliciesCompatible(OffloadPoliciesImpl nsLevelPolicies, Policies policies)
The filed Policies.offload_threshold is primitive, so it can't be known whether it had been set.
In the old logic, if the field value is -1, it could be thought that the field had not been set.
nsLevelPolicies - namespace level offload policiespolicies - namespace policiespublic static OffloadPoliciesImpl mergeConfiguration(OffloadPoliciesImpl topicLevelPolicies, OffloadPoliciesImpl nsLevelPolicies, Properties brokerProperties)
policies level priority: topic > namespace > broker
topicLevelPolicies - topic level offload policiesnsLevelPolicies - namespace level offload policiesbrokerProperties - broker level offload configurationCopyright © 2017–2022 Apache Software Foundation. All rights reserved.