public class ProducerConfig extends Object
LogProducer. See each each individual set method for details about each
parameter.| 限定符和类型 | 类和说明 |
|---|---|
static class |
ProducerConfig.LogFormat |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BUCKETS_LOWER_LIMIT |
static int |
BUCKETS_UPPER_LIMIT |
static long |
DEFAULT_BASE_RETRY_BACKOFF_MS |
static int |
DEFAULT_BATCH_COUNT_THRESHOLD |
static int |
DEFAULT_BATCH_SIZE_THRESHOLD_IN_BYTES |
static int |
DEFAULT_BUCKETS |
static int |
DEFAULT_IO_THREAD_COUNT |
static int |
DEFAULT_LINGER_MS |
static ProducerConfig.LogFormat |
DEFAULT_LOG_FORMAT |
static long |
DEFAULT_MAX_BLOCK_MS |
static long |
DEFAULT_MAX_RETRY_BACKOFF_MS |
static int |
DEFAULT_RETRIES |
static int |
DEFAULT_TOTAL_SIZE_IN_BYTES |
static int |
LINGER_MS_LOWER_LIMIT |
static int |
MAX_BATCH_COUNT |
static int |
MAX_BATCH_SIZE_IN_BYTES |
| 构造器和说明 |
|---|
ProducerConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getBaseRetryBackoffMs() |
int |
getBatchCountThreshold() |
int |
getBatchSizeThresholdInBytes() |
int |
getBuckets() |
int |
getIoThreadCount() |
int |
getLingerMs() |
ProducerConfig.LogFormat |
getLogFormat() |
long |
getMaxBlockMs() |
int |
getMaxReservedAttempts() |
long |
getMaxRetryBackoffMs() |
int |
getRetries() |
int |
getTotalSizeInBytes() |
boolean |
isAdjustShardHash() |
void |
setAdjustShardHash(boolean adjustShardHash)
Specify whether to adjust shard hash.
|
void |
setBaseRetryBackoffMs(long baseRetryBackoffMs)
Set the amount of time to wait before attempting to retry a failed request for the first time.
|
void |
setBatchCountThreshold(int batchCountThreshold)
Set the batch count threshold.
|
void |
setBatchSizeThresholdInBytes(int batchSizeThresholdInBytes)
Set the batch size threshold.
|
void |
setBuckets(int buckets)
Set the buckets of the shard hash.
|
void |
setIoThreadCount(int ioThreadCount)
Set the thread count of the background I/O thread pool.
|
void |
setLingerMs(int lingerMs)
Set the max linger time of a log.
|
void |
setLogFormat(ProducerConfig.LogFormat logFormat)
Set the content type of the request.
|
void |
setMaxBlockMs(long maxBlockMs)
Set how long
LogProducer.send() will block. |
void |
setMaxReservedAttempts(int maxReservedAttempts)
|
void |
setMaxRetryBackoffMs(long maxRetryBackoffMs)
Set the upper limit of time to wait before attempting to retry a failed request.
|
void |
setRetries(int retries)
Set the retry times for transient error.
|
void |
setTotalSizeInBytes(int totalSizeInBytes)
Set the total bytes of memory the producer can use to buffer logs waiting to be sent to the
server.
|
public static final int DEFAULT_TOTAL_SIZE_IN_BYTES
public static final long DEFAULT_MAX_BLOCK_MS
public static final int DEFAULT_IO_THREAD_COUNT
public static final int DEFAULT_BATCH_SIZE_THRESHOLD_IN_BYTES
public static final int MAX_BATCH_SIZE_IN_BYTES
public static final int DEFAULT_BATCH_COUNT_THRESHOLD
public static final int MAX_BATCH_COUNT
public static final int DEFAULT_LINGER_MS
public static final int LINGER_MS_LOWER_LIMIT
public static final int DEFAULT_RETRIES
public static final long DEFAULT_BASE_RETRY_BACKOFF_MS
public static final long DEFAULT_MAX_RETRY_BACKOFF_MS
public static final int DEFAULT_BUCKETS
public static final int BUCKETS_LOWER_LIMIT
public static final int BUCKETS_UPPER_LIMIT
public static final ProducerConfig.LogFormat DEFAULT_LOG_FORMAT
public int getTotalSizeInBytes()
public void setTotalSizeInBytes(int totalSizeInBytes)
public long getMaxBlockMs()
LogProducer.send() will block.public void setMaxBlockMs(long maxBlockMs)
LogProducer.send() will block.public int getIoThreadCount()
public void setIoThreadCount(int ioThreadCount)
public int getBatchSizeThresholdInBytes()
public void setBatchSizeThresholdInBytes(int batchSizeThresholdInBytes)
public int getBatchCountThreshold()
public void setBatchCountThreshold(int batchCountThreshold)
public int getLingerMs()
public void setLingerMs(int lingerMs)
public int getRetries()
public void setRetries(int retries)
public int getMaxReservedAttempts()
public void setMaxReservedAttempts(int maxReservedAttempts)
public long getBaseRetryBackoffMs()
public void setBaseRetryBackoffMs(long baseRetryBackoffMs)
public long getMaxRetryBackoffMs()
public void setMaxRetryBackoffMs(long maxRetryBackoffMs)
public boolean isAdjustShardHash()
public void setAdjustShardHash(boolean adjustShardHash)
public int getBuckets()
public void setBuckets(int buckets)
public ProducerConfig.LogFormat getLogFormat()
public void setLogFormat(ProducerConfig.LogFormat logFormat)
Copyright © 2019. All rights reserved.