You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2017/06/08 12:33:18 UTC
[25/43] ignite git commit: IGNITE-5406 VisorExecutorConfiguration and
VisorGridConfiguration should use
IgniteConfiguration.sqlConnectorConfiguration instead of
IgniteConfiguration.odbcConfiguration.
IGNITE-5406 VisorExecutorConfiguration and VisorGridConfiguration should use IgniteConfiguration.sqlConnectorConfiguration instead of IgniteConfiguration.odbcConfiguration.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3ab4b9a2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3ab4b9a2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3ab4b9a2
Branch: refs/heads/ignite-5414
Commit: 3ab4b9a289e585bfa580fdf82ac0eab9fb3bfdec
Parents: 183aa80
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Wed Jun 7 14:26:29 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Jun 7 14:26:29 2017 +0700
----------------------------------------------------------------------
.../SqlConnectorConfiguration.java | 2 +-
.../node/VisorExecutorServiceConfiguration.java | 20 +--
.../visor/node/VisorGridConfiguration.java | 22 +--
.../visor/node/VisorOdbcConfiguration.java | 114 -------------
.../node/VisorSqlConnectorConfiguration.java | 166 +++++++++++++++++++
.../resources/META-INF/classnames.properties | 2 +-
.../config/VisorConfigurationCommand.scala | 1 +
modules/web-console/backend/app/mongo.js | 12 ++
.../modules/configuration/Version.service.js | 4 +
.../generator/AbstractTransformer.js | 9 +-
.../generator/ConfigurationGenerator.js | 35 +++-
.../generator/defaults/Cluster.service.js | 9 +
.../states/configuration/caches/query.pug | 3 +-
.../states/configuration/clusters/memory.pug | 9 +
.../states/configuration/clusters/odbc.pug | 2 +-
.../configuration/clusters/sql-connector.pug | 62 +++++++
.../frontend/controllers/clusters-controller.js | 5 +-
.../views/configuration/clusters.tpl.pug | 6 +
18 files changed, 338 insertions(+), 145 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/java/org/apache/ignite/configuration/SqlConnectorConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/SqlConnectorConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/SqlConnectorConfiguration.java
index 15563c8..9921974 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/SqlConnectorConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/SqlConnectorConfiguration.java
@@ -48,7 +48,7 @@ public class SqlConnectorConfiguration {
/** Port. */
private int port = DFLT_PORT;
- /** Poart range. */
+ /** Port range. */
private int portRange = DFLT_PORT_RANGE;
/** Socket send buffer size. */
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
----------------------------------------------------------------------
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.io.ObjectOutput;
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 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
/** 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 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
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 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
/**
* @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 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
out.writeInt(stripedPoolSize);
out.writeInt(svcPoolSize);
out.writeInt(utilityCachePoolSize);
- out.writeInt(odbcPoolSize);
+ out.writeInt(sqlConnCfgPoolSize);
U.writeCollection(out, executors);
}
@@ -261,7 +261,7 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
stripedPoolSize = in.readInt();
svcPoolSize = in.readInt();
utilityCachePoolSize = in.readInt();
- odbcPoolSize = in.readInt();
+ sqlConnCfgPoolSize = in.readInt();
executors = U.readList(in);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
index ea5ce9e..ef916dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
@@ -28,7 +28,7 @@ import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.HadoopConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.OdbcConfiguration;
+import org.apache.ignite.configuration.SqlConnectorConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -110,8 +110,8 @@ public class VisorGridConfiguration extends VisorDataTransferObject {
/** Hadoop configuration. */
private VisorHadoopConfiguration hadoopCfg;
- /** ODBC configuration. */
- private VisorOdbcConfiguration odbcCfg;
+ /** SQL connector configuration. */
+ private VisorSqlConnectorConfiguration sqlConnCfg;
/** List of service configurations. */
private List<VisorServiceConfiguration> srvcCfgs;
@@ -168,10 +168,10 @@ public class VisorGridConfiguration extends VisorDataTransferObject {
if (hc != null)
hadoopCfg = new VisorHadoopConfiguration(hc);
- OdbcConfiguration oc = c.getOdbcConfiguration();
+ SqlConnectorConfiguration scc = c.getSqlConnectorConfiguration();
- if (oc != null)
- odbcCfg = new VisorOdbcConfiguration(c.getOdbcConfiguration());
+ if (scc != null)
+ sqlConnCfg = new VisorSqlConnectorConfiguration(scc);
srvcCfgs = VisorServiceConfiguration.list(c.getServiceConfiguration());
}
@@ -331,10 +331,10 @@ public class VisorGridConfiguration extends VisorDataTransferObject {
}
/**
- * @return ODBC configuration.
+ * @return SQL connector configuration.
*/
- public VisorOdbcConfiguration getOdbcConfiguration() {
- return odbcCfg;
+ public VisorSqlConnectorConfiguration getSqlConnectorConfiguration() {
+ return sqlConnCfg;
}
/**
@@ -368,7 +368,7 @@ public class VisorGridConfiguration extends VisorDataTransferObject {
out.writeObject(binaryCfg);
U.writeCollection(out, cacheKeyCfgs);
out.writeObject(hadoopCfg);
- out.writeObject(odbcCfg);
+ out.writeObject(sqlConnCfg);
U.writeCollection(out, srvcCfgs);
}
@@ -396,7 +396,7 @@ public class VisorGridConfiguration extends VisorDataTransferObject {
binaryCfg = (VisorBinaryConfiguration)in.readObject();
cacheKeyCfgs = U.readList(in);
hadoopCfg = (VisorHadoopConfiguration)in.readObject();
- odbcCfg = (VisorOdbcConfiguration)in.readObject();
+ sqlConnCfg = (VisorSqlConnectorConfiguration) in.readObject();
srvcCfgs = U.readList(in);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorOdbcConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorOdbcConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorOdbcConfiguration.java
deleted file mode 100644
index e29376b..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorOdbcConfiguration.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.ignite.internal.visor.node;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import org.apache.ignite.configuration.OdbcConfiguration;
-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;
-
-/**
- * Data transfer object for configuration of ODBC data structures.
- */
-public class VisorOdbcConfiguration extends VisorDataTransferObject {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Endpoint address. */
- private String endpointAddr;
-
- /** Socket send buffer size. */
- private int sockSndBufSize;
-
- /** Socket receive buffer size. */
- private int sockRcvBufSize;
-
- /** Max number of opened cursors per connection. */
- private int maxOpenCursors;
-
- /**
- * Default constructor.
- */
- public VisorOdbcConfiguration() {
- // No-op.
- }
-
- /**
- * Create data transfer object for ODBC configuration.
- *
- * @param src ODBC configuration.
- */
- public VisorOdbcConfiguration(OdbcConfiguration src) {
- endpointAddr = src.getEndpointAddress();
- sockSndBufSize = src.getSocketSendBufferSize();
- sockRcvBufSize = src.getSocketReceiveBufferSize();
- maxOpenCursors = src.getMaxOpenCursors();
- }
-
- /**
- * @return ODBC endpoint address.
- */
- public String getEndpointAddress() {
- return endpointAddr;
- }
-
- /**
- * @return Maximum number of opened cursors.
- */
- public int getMaxOpenCursors() {
- return maxOpenCursors;
- }
-
- /**
- * @return Socket send buffer size in bytes.
- */
- public int getSocketSendBufferSize() {
- return sockSndBufSize;
- }
-
- /**
- * @return Socket receive buffer size in bytes.
- */
- public int getSocketReceiveBufferSize() {
- return sockRcvBufSize;
- }
-
- /** {@inheritDoc} */
- @Override protected void writeExternalData(ObjectOutput out) throws IOException {
- U.writeString(out, endpointAddr);
- out.writeInt(sockSndBufSize);
- out.writeInt(sockRcvBufSize);
- out.writeInt(maxOpenCursors);
- }
-
- /** {@inheritDoc} */
- @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
- endpointAddr = U.readString(in);
- sockSndBufSize = in.readInt();
- sockRcvBufSize = in.readInt();
- maxOpenCursors = in.readInt();
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(VisorOdbcConfiguration.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSqlConnectorConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSqlConnectorConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSqlConnectorConfiguration.java
new file mode 100644
index 0000000..ccde415
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSqlConnectorConfiguration.java
@@ -0,0 +1,166 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.visor.node;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+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;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Data transfer object for SQL connector configuration.
+ */
+public class VisorSqlConnectorConfiguration extends VisorDataTransferObject {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Host. */
+ private String host;
+
+ /** Port. */
+ private int port;
+
+ /** Port range. */
+ private int portRange;
+
+ /** Max number of opened cursors per connection. */
+ private int maxOpenCursorsPerConn;
+
+ /** Socket send buffer size. */
+ private int sockSndBufSize;
+
+ /** Socket receive buffer size. */
+ private int sockRcvBufSize;
+
+ /** TCP no delay. */
+ private boolean tcpNoDelay;
+
+ /** Thread pool size. */
+ private int threadPoolSize ;
+
+ /**
+ * Default constructor.
+ */
+ public VisorSqlConnectorConfiguration() {
+ // No-op.
+ }
+
+ /**
+ * Create data transfer object for Sql connector configuration.
+ *
+ * @param cfg Sql connector configuration.
+ */
+ public VisorSqlConnectorConfiguration(SqlConnectorConfiguration cfg) {
+ host = cfg.getHost();
+ port = cfg.getPort();
+ portRange = cfg.getPortRange();
+ maxOpenCursorsPerConn = cfg.getMaxOpenCursorsPerConnection();
+ sockSndBufSize = cfg.getSocketSendBufferSize();
+ sockRcvBufSize = cfg.getSocketReceiveBufferSize();
+ tcpNoDelay = cfg.isTcpNoDelay();
+ threadPoolSize = cfg.getThreadPoolSize();
+ }
+
+ /**
+ * @return Host.
+ */
+ @Nullable public String getHost() {
+ return host;
+ }
+
+ /**
+ * @return Port.
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * @return Port range.
+ */
+ public int getPortRange() {
+ return portRange;
+ }
+
+ /**
+ * @return Maximum number of opened cursors.
+ */
+ public int getMaxOpenCursorsPerConnection() {
+ return maxOpenCursorsPerConn;
+ }
+
+ /**
+ * @return Socket send buffer size in bytes.
+ */
+ public int getSocketSendBufferSize() {
+ return sockSndBufSize;
+ }
+
+ /**
+ * @return Socket receive buffer size in bytes.
+ */
+ public int getSocketReceiveBufferSize() {
+ return sockRcvBufSize;
+ }
+
+ /**
+ * @return TCP NO_DELAY flag.
+ */
+ public boolean isTcpNoDelay() {
+ return tcpNoDelay;
+ }
+ /**
+ * @return Thread pool that is in charge of processing SQL requests.
+ */
+ public int getThreadPoolSize() {
+ return threadPoolSize;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+ U.writeString(out, host);
+ out.writeInt(port);
+ out.writeInt(portRange);
+ out.writeInt(maxOpenCursorsPerConn);
+ out.writeInt(sockSndBufSize);
+ out.writeInt(sockRcvBufSize );
+ out.writeBoolean(tcpNoDelay);
+ out.writeInt(threadPoolSize);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
+ host = U.readString(in);
+ port = in.readInt();
+ portRange = in.readInt();
+ maxOpenCursorsPerConn = in.readInt();
+ sockSndBufSize = in.readInt();
+ sockRcvBufSize = in.readInt();
+ tcpNoDelay = in.readBoolean();
+ threadPoolSize = in.readInt();
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(VisorSqlConnectorConfiguration.class, this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 8349687..2218aad 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1852,13 +1852,13 @@ org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrors
org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrorsTask
org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrorsTask$VisorNodeSuppressedErrorsJob
org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrorsTaskArg
-org.apache.ignite.internal.visor.node.VisorOdbcConfiguration
org.apache.ignite.internal.visor.node.VisorPeerToPeerConfiguration
org.apache.ignite.internal.visor.node.VisorRestConfiguration
org.apache.ignite.internal.visor.node.VisorSegmentationConfiguration
org.apache.ignite.internal.visor.node.VisorServiceConfiguration
org.apache.ignite.internal.visor.node.VisorSpiDescription
org.apache.ignite.internal.visor.node.VisorSpisConfiguration
+org.apache.ignite.internal.visor.node.VisorSqlConnectorConfiguration
org.apache.ignite.internal.visor.node.VisorSuppressedError
org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
org.apache.ignite.internal.visor.query.VisorQueryCancelTask
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
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 @@ class VisorConfigurationCommand extends VisorConsoleCommand {
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()
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/backend/app/mongo.js
----------------------------------------------------------------------
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 @@ module.exports.factory = function(passportMongo, settings, pluginMongo, mongoose
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
}
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/configuration/Version.service.js
----------------------------------------------------------------------
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..5b29291 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 @@ export default class IgniteVersion {
constructor() {
this.supportedVersions = [
{
+ label: 'Ignite 2.1',
+ ignite: '2.1.0'
+ },
+ {
label: 'Ignite 2.0',
ignite: '2.0.0'
},
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/configuration/generator/AbstractTransformer.js
----------------------------------------------------------------------
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 @@ export default class AbstractTransformer {
}
// 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
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 @@ export default class IgniteConfigurationGenerator {
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 @@ export default class IgniteConfigurationGenerator {
}
// 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 @@ export default class IgniteConfigurationGenerator {
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 = [];
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cluster.service.js
----------------------------------------------------------------------
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 @@ const DFLT_CLUSTER = {
serviceConfigurations: {
maxPerNodeCount: 0,
totalCount: 0
+ },
+ longQueryWarningTimeout: 3000,
+ sqlConnectorConfiguration: {
+ port: 10800,
+ portRange: 100,
+ socketSendBufferSize: 0,
+ socketReceiveBufferSize: 0,
+ tcpNoDelay: true,
+ maxOpenCursorsPerConnection: 128
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
----------------------------------------------------------------------
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 @@ include /app/helpers/jade/mixins
+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
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
----------------------------------------------------------------------
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 @@ include /app/helpers/jade/mixins
.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')
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
----------------------------------------------------------------------
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 @@ include /app/helpers/jade/mixins
-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
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/app/modules/states/configuration/clusters/sql-connector.pug
----------------------------------------------------------------------
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')
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/controllers/clusters-controller.js
----------------------------------------------------------------------
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 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
nativeLibraryNames: []
},
serviceConfigurations: [],
- executorConfiguration: []
+ executorConfiguration: [],
+ sqlConnectorConfiguration: {
+ tcpNoDelay: true
+ }
};
const pairFields = {
http://git-wip-us.apache.org/repos/asf/ignite/blob/3ab4b9a2/modules/web-console/frontend/views/configuration/clusters.tpl.pug
----------------------------------------------------------------------
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/helpers/jade/mixins
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