IGNITE-5406 WIP.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
index 6929190..31a3713 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
@@ -23,7 +23,7 @@
import java.util.List;
import org.apache.ignite.configuration.ConnectorConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.OdbcConfiguration;
+import org.apache.ignite.configuration.SqlConnectorConfiguration;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;
@@ -74,8 +74,8 @@
/** Utility cache pool size. */
private int utilityCachePoolSize;
- /** ODBC pool size. */
- private int odbcPoolSize;
+ /** SQL connector configuration pool size. */
+ private int sqlConnCfgPoolSize;
/** List of executor configurations. */
private List<VisorExecutorConfiguration> executors;
@@ -112,10 +112,10 @@
svcPoolSize = c.getServiceThreadPoolSize();
utilityCachePoolSize = c.getUtilityCacheThreadPoolSize();
- OdbcConfiguration oc = c.getOdbcConfiguration();
+ SqlConnectorConfiguration scc = c.getSqlConnectorConfiguration();
- if (oc != null)
- odbcPoolSize = oc.getThreadPoolSize();
+ if (scc != null)
+ sqlConnCfgPoolSize = scc.getThreadPoolSize();
executors = VisorExecutorConfiguration.list(c.getExecutorConfiguration());
}
@@ -216,8 +216,8 @@
/**
* @return Thread pool that is in charge of processing ODBC tasks.
*/
- public int getOdbcThreadPoolSize() {
- return odbcPoolSize;
+ public int getSqlConnectorConfigurationThreadPoolSize() {
+ return sqlConnCfgPoolSize;
}
/**
@@ -242,7 +242,7 @@
out.writeInt(stripedPoolSize);
out.writeInt(svcPoolSize);
out.writeInt(utilityCachePoolSize);
- out.writeInt(odbcPoolSize);
+ out.writeInt(sqlConnCfgPoolSize);
U.writeCollection(out, executors);
}
@@ -261,7 +261,7 @@
stripedPoolSize = in.readInt();
svcPoolSize = in.readInt();
utilityCachePoolSize = in.readInt();
- odbcPoolSize = in.readInt();
+ sqlConnCfgPoolSize = in.readInt();
executors = U.readList(in);
}
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
index 299c300..13ab778 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
@@ -273,6 +273,7 @@
execSvcT += ("Peer-to-Peer thread pool size", safe(execCfg.getPeerClassLoadingThreadPoolSize))
execSvcT += ("Rebalance Thread Pool size", execCfg.getRebalanceThreadPoolSize)
execSvcT += ("REST thread pool size", safe(execCfg.getRestThreadPoolSize))
+ execSvcT += ("SQL processor thread pool size", safe(execCfg.getSqlConnectorConfigurationThreadPoolSize))
execSvcT.render()
diff --git a/modules/web-console/backend/app/mongo.js b/modules/web-console/backend/app/mongo.js
index d3bc4c0..8e75719 100644
--- a/modules/web-console/backend/app/mongo.js
+++ b/modules/web-console/backend/app/mongo.js
@@ -959,6 +959,18 @@
emptyPagesPoolSize: Number,
metricsEnabled: Boolean
}]
+ },
+ longQueryWarningTimeout: Number,
+ sqlConnectorConfiguration: {
+ enabled: Boolean,
+ host: String,
+ port: Number,
+ portRange: Number,
+ socketSendBufferSize: Number,
+ socketReceiveBufferSize: Number,
+ tcpNoDelay: {type: Boolean, default: true},
+ maxOpenCursorsPerConnection: Number,
+ threadPoolSize: Number
}
});
diff --git a/modules/web-console/frontend/app/modules/configuration/Version.service.js b/modules/web-console/frontend/app/modules/configuration/Version.service.js
index cf2bfc5..5b292911 100644
--- a/modules/web-console/frontend/app/modules/configuration/Version.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/Version.service.js
@@ -75,6 +75,10 @@
constructor() {
this.supportedVersions = [
{
+ label: 'Ignite 2.1',
+ ignite: '2.1.0'
+ },
+ {
label: 'Ignite 2.0',
ignite: '2.0.0'
},
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/AbstractTransformer.js b/modules/web-console/frontend/app/modules/configuration/generator/AbstractTransformer.js
index 20393c5..6451a76 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/AbstractTransformer.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/AbstractTransformer.js
@@ -154,8 +154,13 @@
}
// Generate ODBC group.
- static clusterODBC(odbc) {
- return this.toSection(this.generator.clusterODBC(odbc));
+ static clusterODBC(odbc, available) {
+ return this.toSection(this.generator.clusterODBC(odbc, available));
+ }
+
+ // Generate cluster query group.
+ static clusterQuery(odbc, available) {
+ return this.toSection(this.generator.clusterQuery(odbc, available));
}
// Generate cache node filter group.
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index 39ebced..a55fdf1 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -95,7 +95,8 @@
this.clusterMisc(cluster, available, cfg);
this.clusterMetrics(cluster, available, cfg);
- this.clusterODBC(cluster.odbc, cfg);
+ this.clusterODBC(cluster.odbc, available, cfg);
+ this.clusterQuery(cluster, available, cfg);
this.clusterServiceConfiguration(cluster.serviceConfigurations, cluster.caches, cfg);
this.clusterSsl(cluster, cfg);
@@ -1410,8 +1411,9 @@
}
// Generate ODBC group.
- static clusterODBC(odbc, cfg = this.igniteConfigurationBean()) {
- if (_.get(odbc, 'odbcEnabled') !== true)
+ static clusterODBC(odbc, available, cfg = this.igniteConfigurationBean()) {
+ // Deprecated in ignite 2.1
+ if (available('2.1.0') || _.get(odbc, 'odbcEnabled') !== true)
return cfg;
const bean = new Bean('org.apache.ignite.configuration.OdbcConfiguration', 'odbcConfiguration',
@@ -1425,6 +1427,33 @@
return cfg;
}
+ // Generate cluster query group.
+ static clusterQuery(cluster, available, cfg = this.igniteConfigurationBean(cluster)) {
+ if (available(['1.0.0', '2.1.0']))
+ return cfg;
+
+ cfg.intProperty('longQueryWarningTimeout');
+
+ if (_.get(cluster, 'sqlConnectorConfiguration.enabled') !== true)
+ return cfg;
+
+ const bean = new Bean('org.apache.ignite.configuration.SqlConnectorConfiguration', 'sqlConnCfg',
+ cluster.sqlConnectorConfiguration, clusterDflts.sqlConnectorConfiguration);
+
+ bean.stringProperty('host')
+ .intProperty('port')
+ .intProperty('portRange')
+ .intProperty('socketSendBufferSize')
+ .intProperty('socketReceiveBufferSize')
+ .intProperty('maxOpenCursorsPerConnection')
+ .intProperty('threadPoolSize')
+ .boolProperty('tcpNoDelay');
+
+ cfg.beanProperty('sqlConnectorConfiguration', bean);
+
+ return cfg;
+ }
+
// Java code generator for cluster's service configurations.
static clusterServiceConfiguration(srvs, caches, cfg = this.igniteConfigurationBean()) {
const srvBeans = [];
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cluster.service.js b/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cluster.service.js
index 2c86667..d3fafe0 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cluster.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cluster.service.js
@@ -324,6 +324,15 @@
serviceConfigurations: {
maxPerNodeCount: 0,
totalCount: 0
+ },
+ longQueryWarningTimeout: 3000,
+ sqlConnectorConfiguration: {
+ port: 10800,
+ portRange: 100,
+ socketSendBufferSize: 0,
+ socketReceiveBufferSize: 0,
+ tcpNoDelay: true,
+ maxOpenCursorsPerConnection: 128
}
};
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
index 480b0a5..0eb73d7 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
@@ -52,7 +52,8 @@
+number('On-heap cache for off-heap indexes:', `${model}.sqlOnheapRowCacheSize`, '"sqlOnheapRowCacheSize"', 'true', '10240', '1',
'Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access')
- .settings-row
+ //- Deprecated in ignite 2.1
+ .settings-row(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
+number('Long query timeout:', `${model}.longQueryWarningTimeout`, '"longQueryWarningTimeout"', 'true', '3000', '0',
'Timeout in milliseconds after which long query warning will be printed')
.settings-row
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
index 62a07c1..06f9f7b 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
@@ -110,5 +110,14 @@
.settings-row
+checkbox('Metrics enabled', 'model.metricsEnabled', '"MemoryPolicyMetricsEnabled" + $index',
'Whether memory metrics are enabled by default on node startup')
+
+ //- Since ignite 2.1
+ .div(ng-if='$ctrl.available("2.1.0")')
+ .settings-row
+ +number('Sub intervals:', 'model.subIntervals', '"MemoryPolicySubIntervals" + $index',
+ 'true', '5', '1', 'A number of sub-intervals the whole rate time interval will be split into to calculate allocation and eviction rates')
+ .settings-row
+ +number('Rate time interval:', 'model.rateTimeInterval', '"MemoryPolicyRateTimeInterval" + $index',
+ 'true', '60000', '1000', 'Time interval for allocation rate and eviction rate monitoring purposes')
.col-sm-6
+preview-xml-java(model, 'clusterMemory')
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
index a69c7ad..a1d8b89 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
@@ -20,7 +20,7 @@
-var model = 'backupItem.odbc'
-var enabled = model + '.odbcEnabled'
-.panel.panel-default(ng-form=form novalidate)
+.panel.panel-default(ng-if='$ctrl.available(["1.0.0", "2.1.0"])' ng-form=form novalidate)
.panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
label ODBC configuration
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/sql-connector.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/sql-connector.pug
new file mode 100644
index 0000000..4b4e1c0
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/sql-connector.pug
@@ -0,0 +1,62 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+include /app/helpers/jade/mixins
+
+-var form = 'query'
+-var model = 'backupItem'
+-var connectionModel = model + '.sqlConnectorConfiguration'
+-var connectionEnabled = connectionModel + '.enabled'
+
+.panel.panel-default(ng-if='$ctrl.available("2.1.0")' ng-form=form novalidate)
+ .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+ ignite-form-panel-chevron
+ label Query configuration
+ ignite-form-field-tooltip.tipLabel
+ | Query configuration
+ ignite-form-revert
+ .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+ .col-sm-6
+ .settings-row
+ +number('Long query timeout:', `${model}.longQueryWarningTimeout`, '"LongQueryWarningTimeout"', 'true', '3000', '0',
+ 'Timeout in milliseconds after which long query warning will be printed')
+ .settings-row
+ +checkbox('Enable SQL connection configuration', connectionEnabled, '"SqlConnectorEnabled"', 'Enable SQL connector configuration')
+ .settings-row
+ +text-enabled('Host:', `${connectionModel}.host`, '"SqlConnectorHost"', connectionEnabled, 'false', 'localhost', 'Host')
+ .settings-row
+ +number('Port:', `${connectionModel}.port`, '"SqlConnectorPort"', connectionEnabled, '10800', '1025', 'Port')
+ .settings-row
+ +number('Port range:', `${connectionModel}.portRange`, '"SqlConnectorPortRange"', connectionEnabled, '100', '0', 'Port range')
+ .settings-row
+ +number('Socket send buffer:', `${connectionModel}.socketSendBufferSize`, '"SqlConnectorSocketSendBufferSize"', connectionEnabled, '0', '0',
+ 'Socket send buffer size.<br/>\ ' +
+ 'When set to <b>0</b>, operation system default will be used')
+ .settings-row
+ +number('Socket receive buffer:', `${connectionModel}.socketReceiveBufferSize`, '"SqlConnectorSocketReceiveBufferSize"', connectionEnabled, '0', '0',
+ 'Socket receive buffer size.<br/>\ ' +
+ 'When set to <b>0</b>, operation system default will be used')
+ .settings-row
+ +number('Max connection cursors:', `${connectionModel}.maxOpenCursorsPerConnection`, '"SqlConnectorMaxOpenCursorsPerConnection"', connectionEnabled, '128', '0',
+ 'Max number of opened cursors per connection')
+ .settings-row
+ +number('Pool size:', `${connectionModel}.threadPoolSize`, '"SqlConnectorThreadPoolSize"', connectionEnabled, 'max(8, availableProcessors)', '1',
+ 'Size of thread pool that is in charge of processing SQL requests')
+ .settings-row
+ +checkbox-enabled('TCP_NODELAY option', `${connectionModel}.tcpNoDelay`, '"SqlConnectorTcpNoDelay"', connectionEnabled, 'Value for TCP_NODELAY socket option')
+ .col-sm-6
+ +preview-xml-java(model, 'clusterQuery')
diff --git a/modules/web-console/frontend/controllers/clusters-controller.js b/modules/web-console/frontend/controllers/clusters-controller.js
index 6861fe7..6333009 100644
--- a/modules/web-console/frontend/controllers/clusters-controller.js
+++ b/modules/web-console/frontend/controllers/clusters-controller.js
@@ -110,7 +110,10 @@
nativeLibraryNames: []
},
serviceConfigurations: [],
- executorConfiguration: []
+ executorConfiguration: [],
+ sqlConnectorConfiguration: {
+ tcpNoDelay: true
+ }
};
const pairFields = {
diff --git a/modules/web-console/frontend/views/configuration/clusters.tpl.pug b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
index 744ec7c..68698a3 100644
--- a/modules/web-console/frontend/views/configuration/clusters.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
@@ -63,7 +63,13 @@
include /app/modules/states/configuration/clusters/misc
include /app/modules/states/configuration/clusters/metrics
+
+ //- Deprecated in ignite 2.1
include /app/modules/states/configuration/clusters/odbc
+
+ //- Since ignite 2.1
+ include /app/modules/states/configuration/clusters/sql-connector
+
include /app/modules/states/configuration/clusters/service
include /app/modules/states/configuration/clusters/ssl