Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SqlStatisticsHolderMemoryQuotas(QueryMemoryManager memMgr, GridMetricManager metricMgr) {
- MetricRegistry quotasMetrics = metricMgr.registry(SQL_QUOTAS_REG_NAME);
- quotaRequestedCnt = quotasMetrics.longAdderMetric("requests",
- "How many times memory quota have been requested on this node by all the queries in total. " +
- "Always 0 if sql memory quotas are disabled.");
- quotasMetrics.register("maxMem",
- new LongSupplier() {
- @Override public long getAsLong() {
- return memMgr.maxMemory();
- }
- },
- "How much memory in bytes it is possible to reserve by all the queries in total on this node. " +
- "Negative value if sql memory quotas are disabled. " +
- "Individual queries have additional per query quotas."
- );
- quotasMetrics.register("freeMem",
- new LongSupplier() {
- @Override public long getAsLong() {
- return memMgr.maxMemory() - memMgr.memoryReserved();
- }
- },
- "How much memory in bytes currently left available for the queries on this node. " +
- "Negative value if sql memory quotas are disabled."
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement