public class OffloadPolicies extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
OffloadPolicies.OffloadedReadPriority |
| Modifier and Type | Field and Description |
|---|---|
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 OffloadPolicies.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 |
|---|
OffloadPolicies() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bucketValid() |
static OffloadPolicies |
create(Properties properties) |
static OffloadPolicies |
create(String driver,
String region,
String bucket,
String endpoint,
String credentialId,
String credentialSecret,
Integer maxBlockSizeInBytes,
Integer readBufferSizeInBytes,
Long offloadThresholdInBytes,
Long offloadDeletionLagInMillis,
OffloadPolicies.OffloadedReadPriority readPriority) |
boolean |
driverSupported() |
boolean |
equals(Object obj) |
static String |
getSupportedDriverNames() |
int |
hashCode() |
boolean |
isFileSystemDriver() |
boolean |
isGcsDriver() |
boolean |
isS3Driver() |
static OffloadPolicies |
mergeConfiguration(OffloadPolicies topicLevelPolicies,
OffloadPolicies nsLevelPolicies,
Properties brokerProperties)
Merge different level offload policies.
|
static OffloadPolicies |
oldPoliciesCompatible(OffloadPolicies nsLevelPolicies,
Policies policies)
This method is used to make a compatible with old policies.
|
Properties |
toProperties() |
String |
toString() |
public 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 OffloadPolicies.OffloadedReadPriority DEFAULT_OFFLOADED_READ_PRIORITY
public static OffloadPolicies create(String driver, String region, String bucket, String endpoint, String credentialId, String credentialSecret, Integer maxBlockSizeInBytes, Integer readBufferSizeInBytes, Long offloadThresholdInBytes, Long offloadDeletionLagInMillis, OffloadPolicies.OffloadedReadPriority readPriority)
public static OffloadPolicies create(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 OffloadPolicies oldPoliciesCompatible(OffloadPolicies 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 OffloadPolicies mergeConfiguration(OffloadPolicies topicLevelPolicies, OffloadPolicies nsLevelPolicies, Properties brokerProperties)
policies level priority: topic > namespace > broker
topicLevelPolicies - topic level offload policiesnsLevelPolicies - namespace level offload policiesbrokerProperties - broker level offload configurationCopyright © 2017–2021 Apache Software Foundation. All rights reserved.