public class SqlConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DFLT_LONG_QRY_WARN_TIMEOUT
Default timeout after which long query warning will be printed.
|
static long |
DFLT_QRY_TIMEOUT
Default query timeout.
|
static String |
DFLT_SQL_QUERY_GLOBAL_MEMORY_QUOTA
Default SQL query global memory quota.
|
static int |
DFLT_SQL_QUERY_HISTORY_SIZE
Default SQL query history size.
|
static String |
DFLT_SQL_QUERY_MEMORY_QUOTA
Default SQL per query memory quota.
|
static boolean |
DFLT_SQL_QUERY_OFFLOADING_ENABLED
Default value for SQL offloading flag.
|
Constructor and Description |
---|
SqlConfiguration() |
Modifier and Type | Method and Description |
---|---|
long |
getDefaultQueryTimeout()
Deprecated.
Since 8.7.26. Please use distributed default query timeout.
|
long |
getLongQueryWarningTimeout()
Gets timeout in milliseconds after which long query warning will be printed.
|
String |
getSqlGlobalMemoryQuota()
Returns global memory pool size for SQL queries.
|
int |
getSqlQueryHistorySize()
Number of SQL query history elements to keep in memory.
|
String |
getSqlQueryMemoryQuota()
Returns per-query memory quota.
|
String[] |
getSqlSchemas()
Gets SQL schemas to be created on node startup.
|
boolean |
isSqlOffloadingEnabled()
Returns flag whether disk offloading is enabled.
|
SqlConfiguration |
setDefaultQueryTimeout(long dfltQryTimeout)
Deprecated.
Since 8.7.26. Please use distributed default query timeout.
|
SqlConfiguration |
setLongQueryWarningTimeout(long longQryWarnTimeout)
Sets timeout in milliseconds after which long query warning will be printed.
|
SqlConfiguration |
setSqlGlobalMemoryQuota(String size)
Sets global memory pool size for SQL queries.
|
SqlConfiguration |
setSqlOffloadingEnabled(boolean offloadingEnabled)
Sets the SQL query offloading enabled flag.
|
SqlConfiguration |
setSqlQueryHistorySize(int size)
Sets number of SQL query history elements kept in memory.
|
SqlConfiguration |
setSqlQueryMemoryQuota(String size)
Sets per-query memory quota.
|
SqlConfiguration |
setSqlSchemas(String... sqlSchemas)
Sets SQL schemas to be created on node startup.
|
String |
toString() |
public static final int DFLT_SQL_QUERY_HISTORY_SIZE
public static final long DFLT_LONG_QRY_WARN_TIMEOUT
public static final String DFLT_SQL_QUERY_GLOBAL_MEMORY_QUOTA
public static final String DFLT_SQL_QUERY_MEMORY_QUOTA
public static final boolean DFLT_SQL_QUERY_OFFLOADING_ENABLED
public static final long DFLT_QRY_TIMEOUT
public int getSqlQueryHistorySize()
DFLT_SQL_QUERY_HISTORY_SIZE
is used. If provided value is less or equals 0, then gathering SQL query history
will be switched off.public SqlConfiguration setSqlQueryHistorySize(int size)
DFLT_SQL_QUERY_HISTORY_SIZE
.size
- Number of SQL query history elements kept in memory.this
for chaining.public String[] getSqlSchemas()
See setSqlSchemas(String...)
for more information.
public SqlConfiguration setSqlSchemas(String... sqlSchemas)
By default schema names are case-insensitive, i.e. my_schema
and My_Schema
represents the same
object. Use quotes to enforce case sensitivity (e.g. "My_Schema"
).
Property is ignored if ignite-indexing
module is not in classpath.
sqlSchemas
- SQL schemas to be created on node startup.this
for chaining.public long getLongQueryWarningTimeout()
public SqlConfiguration setLongQueryWarningTimeout(long longQryWarnTimeout)
longQryWarnTimeout
- Timeout in milliseconds.this
for chaining.public String getSqlGlobalMemoryQuota()
See setSqlGlobalMemoryQuota(String)
for details.
public SqlConfiguration setSqlGlobalMemoryQuota(String size)
Global SQL query memory pool size or SQL query memory quota - is an upper bound for the heap memory part
which might be occupied by the SQL query execution engine. This quota is shared among all simultaneously
running queries, hence it be easily consumed by the single heavy analytics query. If you want to control
memory quota on per-query basis consider setSqlQueryMemoryQuota(String)
.
There are two options of query behaviour when either query or global memory quota is exceeded:
setSqlOffloadingEnabled(boolean)
for details.
If not provided, the default value is defined by DFLT_SQL_QUERY_GLOBAL_MEMORY_QUOTA
.
The value is specified as string value of size of in bytes.
Value 0
means no quota at all.
Quota may be specified also in:
10k, 400K
60m, 420M
7g, 2G
45%, 80%
size
- Size of global memory pool for SQL queries in bytes, kilobytes, megabytes,
or percentage of the max heap.this
for chaining.public String getSqlQueryMemoryQuota()
setSqlQueryMemoryQuota(String)
for details.public SqlConfiguration setSqlQueryMemoryQuota(String size)
It is the maximum amount of memory intended for the particular single query execution. If a query execution exceeds this bound, the either would happen:
setSqlOffloadingEnabled(boolean)
for details.
If not provided, the default value is defined by DFLT_SQL_QUERY_MEMORY_QUOTA
.
The value is specified as string value of size of in bytes.
Value 0
means no quota at all.
Quota may be specified also in:
10k, 400K
60m, 420M
7g, 2G
45%, 80%
size
- Size of per-query memory quota in bytes, kilobytes, megabytes, or percentage of the max heap.this
for chaining.public boolean isSqlOffloadingEnabled()
setSqlOffloadingEnabled(boolean)
for details.public SqlConfiguration setSqlOffloadingEnabled(boolean offloadingEnabled)
Offloading flag specifies the query execution behavior on memory quota excess - either global quota
(see setSqlGlobalMemoryQuota(String)
) or per query quota (see setSqlQueryMemoryQuota(String)
).
Possible options on quota excess are:
offloadingEnabled
flag set to false
, the exception will be thrown when
memory quota is exceeded.
offloadingEnabled
flag set to true
, the intermediate query results will be
offloaded to disk. It may slow down the query execution time by orders of magnitude, but eventually
the query will be executed and the caller will get a result.
false
.offloadingEnabled
- Offloading enabled flag.this
for chaining.@Deprecated public long getDefaultQueryTimeout()
DFLT_QRY_TIMEOUT
.
0
means there is no timeout (this
is a default value)@Deprecated public SqlConfiguration setDefaultQueryTimeout(long dfltQryTimeout)
0
means there is no timeout (this
is a default value)dfltQryTimeout
- Timeout in milliseconds.this
for chaining.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024