Package com.clickhouse.client.config
Enum ClickHouseClientOption
- java.lang.Object
-
- java.lang.Enum<ClickHouseClientOption>
-
- com.clickhouse.client.config.ClickHouseClientOption
-
- All Implemented Interfaces:
ClickHouseOption,Serializable,Comparable<ClickHouseClientOption>
public enum ClickHouseClientOption extends Enum<ClickHouseClientOption> implements ClickHouseOption
Generic client options.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASYNCWhether the client should run in async mode(e.g.AUTO_DISCOVERYWhether the client should discover more nodes from system tables and/or clickhouse-keeper/zookeeper.BUFFER_QUEUE_VARIATIONNumber of times the buffer queue is filled up before increasing capacity of buffer queue.BUFFER_SIZEDefault buffer size in byte for both request and response.CHECK_ALL_NODESWhether to perform health check against all nodes or just faulty ones.CLIENT_NAMEClient name.COMPRESSWhether server will compress response to client or not.COMPRESS_ALGORITHMCompression algorithm server will use to compress response, whenCOMPRESSistrue.COMPRESS_LEVELCompression level for compressing server response.CONNECTION_TIMEOUTConnection timeout in milliseconds.DATABASEDefault database.DECOMPRESSWhether server will decompress request from client or not.DECOMPRESS_ALGORITHMCompression algorithm server will use to decompress request, whenDECOMPRESSistrue.DECOMPRESS_LEVELCompression level for decompress client request.FAILOVERMaximum number of times failover can happen for a request.FORMATDefault format.HEALTH_CHECK_INTERVALHealth check interval in milliseconds.HEALTH_CHECK_METHODHealth check method.LOAD_BALANCING_POLICYLoad balancing policy.LOAD_BALANCING_TAGSLoad balancing tags for filtering out nodes.LOG_LEADING_COMMENTWhether to log leading comment(as log_comment in system.query_log) of the query.MAX_BUFFER_SIZEMaximum buffer size in byte can be used for streaming.MAX_COMPRESS_BLOCK_SIZEDeprecated.will be removed in v0.3.3MAX_EXECUTION_TIMEMaximum query execution time in seconds.MAX_QUEUED_BUFFERSMaximum queued in-memory buffers.MAX_QUEUED_REQUESTSMaxium queued requests.MAX_RESULT_ROWSMaximum rows allowed in the result.MAX_THREADS_PER_CLIENTMaximum size of thread pool for each client.NODE_CHECK_INTERVALNode check interval in milliseconds.NODE_DISCOVERY_INTERVALNode discovery interval in milliseconds.NODE_DISCOVERY_LIMITMaximum number of nodes can be discovered at a time.NODE_GROUP_SIZEMaximum number of nodes can be used for operation at a time.READ_BUFFER_SIZERead buffer size in byte.RENAME_RESPONSE_COLUMNMethod to rename response columns.REPEAT_ON_SESSION_LOCKWhether to repeat execution when session is locked, until timed out(according toSESSION_TIMEOUTorCONNECTION_TIMEOUT).REQUEST_BUFFERINGRequest buffering mode.REQUEST_CHUNK_SIZEMaximum request chunk size in byte.RESPONSE_BUFFERINGResponse buffering mode.RETRYMaximum number of times retry can happen for a request.REUSE_VALUE_WRAPPERWhether to reuse wrapper of value(e.g.SERVER_REVISIONServer revision.SERVER_TIME_ZONEServer timezone.SERVER_VERSIONServer version.SERVER_WEIGHTDeprecated.will be removed in v0.3.3SESSION_CHECKWhether to check if session id is validate.SESSION_IDSession id.SESSION_TIMEOUTSession timeout in seconds.SOCKET_TIMEOUTSocket timeout in milliseconds.SSLWhether to enable SSL for the connection.SSL_CERTIFICATESSL certificiate.SSL_KEYSSL key.SSL_MODESSL mode.SSL_ROOT_CERTIFICATESSL root certificiate.TRANSACTION_TIMEOUTTransaction timeout in seconds.USE_BLOCKING_QUEUEWhether to use blocking queue for buffering.USE_NO_PROXYWhether to access ClickHouse server directly without using system wide proxy including the one defined in JVM system properties.USE_OBJECTS_IN_ARRAYSWhether to use objects in array or not.USE_SERVER_TIME_ZONEWhether to use server time zone.USE_SERVER_TIME_ZONE_FOR_DATESWhether to use time zone from server for Date.USE_TIME_ZONECustom time zone.WRITE_BUFFER_SIZEWrite buffer size in byte.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClickHouseClientOptionfromKey(String key)Gets client option by key.SerializablegetDefaultValue()Gets default value of the option.StringgetDescription()Gets description of the option.StringgetKey()Gets key of the option.Class<? extends Serializable>getValueType()Gets value type of the option.static ClickHouseClientOptionvalueOf(String name)Returns the enum constant of this type with the specified name.static ClickHouseClientOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.clickhouse.client.config.ClickHouseOption
getDefaultValueFromEnvVar, getDefaultValueFromSysProp, getEffectiveDefaultValue, getEffectiveValue, getEnvironmentVariable, getPrefix, getSystemProperty, name
-
-
-
-
Enum Constant Detail
-
ASYNC
public static final ClickHouseClientOption ASYNC
Whether the client should run in async mode(e.g.ClickHouseClient.execute(com.clickhouse.client.ClickHouseRequest)in a separate thread).
-
AUTO_DISCOVERY
public static final ClickHouseClientOption AUTO_DISCOVERY
Whether the client should discover more nodes from system tables and/or clickhouse-keeper/zookeeper.
-
LOAD_BALANCING_POLICY
public static final ClickHouseClientOption LOAD_BALANCING_POLICY
Load balancing policy.
-
LOAD_BALANCING_TAGS
public static final ClickHouseClientOption LOAD_BALANCING_TAGS
Load balancing tags for filtering out nodes.
-
HEALTH_CHECK_INTERVAL
public static final ClickHouseClientOption HEALTH_CHECK_INTERVAL
Health check interval in milliseconds.
-
HEALTH_CHECK_METHOD
public static final ClickHouseClientOption HEALTH_CHECK_METHOD
Health check method.
-
NODE_DISCOVERY_INTERVAL
public static final ClickHouseClientOption NODE_DISCOVERY_INTERVAL
Node discovery interval in milliseconds.
-
NODE_DISCOVERY_LIMIT
public static final ClickHouseClientOption NODE_DISCOVERY_LIMIT
Maximum number of nodes can be discovered at a time.
-
NODE_CHECK_INTERVAL
public static final ClickHouseClientOption NODE_CHECK_INTERVAL
Node check interval in milliseconds.
-
NODE_GROUP_SIZE
public static final ClickHouseClientOption NODE_GROUP_SIZE
Maximum number of nodes can be used for operation at a time.
-
CHECK_ALL_NODES
public static final ClickHouseClientOption CHECK_ALL_NODES
Whether to perform health check against all nodes or just faulty ones.
-
BUFFER_SIZE
public static final ClickHouseClientOption BUFFER_SIZE
Default buffer size in byte for both request and response. It will be reset toMAX_BUFFER_SIZEif it's too large.
-
BUFFER_QUEUE_VARIATION
public static final ClickHouseClientOption BUFFER_QUEUE_VARIATION
Number of times the buffer queue is filled up before increasing capacity of buffer queue. Zero or negative value means the queue length is fixed.
-
READ_BUFFER_SIZE
public static final ClickHouseClientOption READ_BUFFER_SIZE
Read buffer size in byte. It's mainly for input stream(e.g. reading data from server response). Its value defaults toBUFFER_SIZE, and it will be reset toMAX_BUFFER_SIZEwhen it's too large.
-
WRITE_BUFFER_SIZE
public static final ClickHouseClientOption WRITE_BUFFER_SIZE
Write buffer size in byte. It's mainly for output stream(e.g. writing data into request). Its value defaults toBUFFER_SIZE, and it will be reset toMAX_BUFFER_SIZEwhen it's too large.
-
REQUEST_CHUNK_SIZE
public static final ClickHouseClientOption REQUEST_CHUNK_SIZE
Maximum request chunk size in byte.
-
REQUEST_BUFFERING
public static final ClickHouseClientOption REQUEST_BUFFERING
Request buffering mode.
-
RESPONSE_BUFFERING
public static final ClickHouseClientOption RESPONSE_BUFFERING
Response buffering mode.
-
CLIENT_NAME
public static final ClickHouseClientOption CLIENT_NAME
Client name.
-
COMPRESS
public static final ClickHouseClientOption COMPRESS
Whether server will compress response to client or not.
-
DECOMPRESS
public static final ClickHouseClientOption DECOMPRESS
Whether server will decompress request from client or not.
-
COMPRESS_ALGORITHM
public static final ClickHouseClientOption COMPRESS_ALGORITHM
Compression algorithm server will use to compress response, whenCOMPRESSistrue.
-
DECOMPRESS_ALGORITHM
public static final ClickHouseClientOption DECOMPRESS_ALGORITHM
Compression algorithm server will use to decompress request, whenDECOMPRESSistrue.
-
COMPRESS_LEVEL
public static final ClickHouseClientOption COMPRESS_LEVEL
Compression level for compressing server response.
-
DECOMPRESS_LEVEL
public static final ClickHouseClientOption DECOMPRESS_LEVEL
Compression level for decompress client request.
-
CONNECTION_TIMEOUT
public static final ClickHouseClientOption CONNECTION_TIMEOUT
Connection timeout in milliseconds.
-
DATABASE
public static final ClickHouseClientOption DATABASE
Default database.
-
FAILOVER
public static final ClickHouseClientOption FAILOVER
Maximum number of times failover can happen for a request.
-
FORMAT
public static final ClickHouseClientOption FORMAT
Default format.
-
LOG_LEADING_COMMENT
public static final ClickHouseClientOption LOG_LEADING_COMMENT
Whether to log leading comment(as log_comment in system.query_log) of the query.
-
MAX_BUFFER_SIZE
public static final ClickHouseClientOption MAX_BUFFER_SIZE
Maximum buffer size in byte can be used for streaming. It's not supposed to be larger thanInteger.MAX_VALUE - 8.
-
MAX_COMPRESS_BLOCK_SIZE
@Deprecated public static final ClickHouseClientOption MAX_COMPRESS_BLOCK_SIZE
Deprecated.will be removed in v0.3.3Maximum comression block size in byte, only useful whenDECOMPRESSistrue.
-
MAX_EXECUTION_TIME
public static final ClickHouseClientOption MAX_EXECUTION_TIME
Maximum query execution time in seconds.
-
MAX_QUEUED_BUFFERS
public static final ClickHouseClientOption MAX_QUEUED_BUFFERS
Maximum queued in-memory buffers.
-
MAX_QUEUED_REQUESTS
public static final ClickHouseClientOption MAX_QUEUED_REQUESTS
Maxium queued requests. WhenMAX_THREADS_PER_CLIENTis greater than zero, this will also be applied to client's thread pool as well.
-
MAX_RESULT_ROWS
public static final ClickHouseClientOption MAX_RESULT_ROWS
Maximum rows allowed in the result.
-
MAX_THREADS_PER_CLIENT
public static final ClickHouseClientOption MAX_THREADS_PER_CLIENT
Maximum size of thread pool for each client.
-
RENAME_RESPONSE_COLUMN
public static final ClickHouseClientOption RENAME_RESPONSE_COLUMN
Method to rename response columns.
-
RETRY
public static final ClickHouseClientOption RETRY
Maximum number of times retry can happen for a request.
-
REPEAT_ON_SESSION_LOCK
public static final ClickHouseClientOption REPEAT_ON_SESSION_LOCK
Whether to repeat execution when session is locked, until timed out(according toSESSION_TIMEOUTorCONNECTION_TIMEOUT).
-
REUSE_VALUE_WRAPPER
public static final ClickHouseClientOption REUSE_VALUE_WRAPPER
Whether to reuse wrapper of value(e.g. ClickHouseValue or ClickHouseRecord) for memory efficiency.
-
SERVER_REVISION
public static final ClickHouseClientOption SERVER_REVISION
Server revision.
-
SERVER_TIME_ZONE
public static final ClickHouseClientOption SERVER_TIME_ZONE
Server timezone.
-
SERVER_VERSION
public static final ClickHouseClientOption SERVER_VERSION
Server version.
-
SERVER_WEIGHT
@Deprecated public static final ClickHouseClientOption SERVER_WEIGHT
Deprecated.will be removed in v0.3.3Server weight.
-
SESSION_ID
public static final ClickHouseClientOption SESSION_ID
Session id.
-
SESSION_CHECK
public static final ClickHouseClientOption SESSION_CHECK
Whether to check if session id is validate.
-
SESSION_TIMEOUT
public static final ClickHouseClientOption SESSION_TIMEOUT
Session timeout in seconds.
-
SOCKET_TIMEOUT
public static final ClickHouseClientOption SOCKET_TIMEOUT
Socket timeout in milliseconds.
-
SSL
public static final ClickHouseClientOption SSL
Whether to enable SSL for the connection.
-
SSL_MODE
public static final ClickHouseClientOption SSL_MODE
SSL mode.
-
SSL_ROOT_CERTIFICATE
public static final ClickHouseClientOption SSL_ROOT_CERTIFICATE
SSL root certificiate.
-
SSL_CERTIFICATE
public static final ClickHouseClientOption SSL_CERTIFICATE
SSL certificiate.
-
SSL_KEY
public static final ClickHouseClientOption SSL_KEY
SSL key.
-
TRANSACTION_TIMEOUT
public static final ClickHouseClientOption TRANSACTION_TIMEOUT
Transaction timeout in seconds.
-
USE_BLOCKING_QUEUE
public static final ClickHouseClientOption USE_BLOCKING_QUEUE
Whether to use blocking queue for buffering.
-
USE_OBJECTS_IN_ARRAYS
public static final ClickHouseClientOption USE_OBJECTS_IN_ARRAYS
Whether to use objects in array or not.
-
USE_NO_PROXY
public static final ClickHouseClientOption USE_NO_PROXY
Whether to access ClickHouse server directly without using system wide proxy including the one defined in JVM system properties.
-
USE_SERVER_TIME_ZONE
public static final ClickHouseClientOption USE_SERVER_TIME_ZONE
Whether to use server time zone.
-
USE_SERVER_TIME_ZONE_FOR_DATES
public static final ClickHouseClientOption USE_SERVER_TIME_ZONE_FOR_DATES
Whether to use time zone from server for Date.
-
USE_TIME_ZONE
public static final ClickHouseClientOption USE_TIME_ZONE
Custom time zone. Only works whenuse_server_time_zoneis set to false.
-
-
Method Detail
-
values
public static ClickHouseClientOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClickHouseClientOption c : ClickHouseClientOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClickHouseClientOption valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromKey
public static ClickHouseClientOption fromKey(String key)
Gets client option by key.- Parameters:
key- key of the option- Returns:
- client option object, or null if not found
-
getDefaultValue
public Serializable getDefaultValue()
Description copied from interface:ClickHouseOptionGets default value of the option.- Specified by:
getDefaultValuein interfaceClickHouseOption- Returns:
- default value of the option
-
getDescription
public String getDescription()
Description copied from interface:ClickHouseOptionGets description of the option.- Specified by:
getDescriptionin interfaceClickHouseOption- Returns:
- description of the option
-
getKey
public String getKey()
Description copied from interface:ClickHouseOptionGets key of the option.- Specified by:
getKeyin interfaceClickHouseOption- Returns:
- key of the option
-
getValueType
public Class<? extends Serializable> getValueType()
Description copied from interface:ClickHouseOptionGets value type of the option.- Specified by:
getValueTypein interfaceClickHouseOption- Returns:
- value type of the option, defaults to String
-
-