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 2019/01/30 09:22:28 UTC
[ignite] branch master updated: IGNITE-8145 Web Console: Added test
to check difference between Ignite configuration and Web Console
"Configuration" screen.
This is an automated email from the ASF dual-hosted git repository.
akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 3f889a3 IGNITE-8145 Web Console: Added test to check difference between Ignite configuration and Web Console "Configuration" screen.
3f889a3 is described below
commit 3f889a3086de14c79d0dd462aeb4707788548ab7
Author: Vasiliy Sisko <vs...@gridgain.com>
AuthorDate: Wed Jan 30 16:22:09 2019 +0700
IGNITE-8145 Web Console: Added test to check difference between Ignite configuration and Web Console "Configuration" screen.
---
modules/platforms/dotnet/Apache.Ignite.ndproj | 6 +-
modules/web-console/pom.xml | 29 +
.../console/configuration/FieldProcessingInfo.java | 89 ++
.../ignite/console/configuration/MetadataInfo.java | 69 ++
.../WebConsoleConfigurationSelfTest.java | 979 +++++++++++++++++++++
.../ignite/console/configuration/WrongFields.java | 76 ++
.../console/testsuites/WebConsoleTestSuite.java | 32 +
7 files changed, 1277 insertions(+), 3 deletions(-)
diff --git a/modules/platforms/dotnet/Apache.Ignite.ndproj b/modules/platforms/dotnet/Apache.Ignite.ndproj
index ae99617..6689af7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.ndproj
+++ b/modules/platforms/dotnet/Apache.Ignite.ndproj
@@ -1795,7 +1795,7 @@ from t in JustMyCode.Types where
where newFields.Count > oldFields.Count
let addedFields = newFields.Where(f => f.WasAdded())
- let removedFields = oldFields.Where(f => f.WasRemoved())
+ let rmvFields = oldFields.Where(f => f.WasRemoved())
orderby addedFields.Count() descending
@@ -1804,7 +1804,7 @@ select new {
nbOldFields = oldFields.Count,
nbNewFields = newFields.Count,
addedFields,
- removedFields,
+ rmvFields,
Debt = (10*addedFields.Count()).ToMinutes().ToDebt(),
AnnualInterest = addedFields.Count().Linear(
@@ -11138,4 +11138,4 @@ select new {
</Queries>
<WarnFilter>
</WarnFilter>
-</NDepend>
\ No newline at end of file
+</NDepend>
diff --git a/modules/web-console/pom.xml b/modules/web-console/pom.xml
index 17c5f0b..c72e32d 100644
--- a/modules/web-console/pom.xml
+++ b/modules/web-console/pom.xml
@@ -50,6 +50,35 @@
<artifactId>ignite-web-agent</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-hadoop</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-aws</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-hibernate_4.2</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-urideploy</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/FieldProcessingInfo.java b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/FieldProcessingInfo.java
new file mode 100644
index 0000000..8637c99
--- /dev/null
+++ b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/FieldProcessingInfo.java
@@ -0,0 +1,89 @@
+/*
+ * 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.console.configuration;
+
+/**
+ * Service class with information about property in configuration state.
+ */
+public class FieldProcessingInfo {
+ /** Property name. */
+ private final String name;
+
+ /** Count of occurrence in configuration class. */
+ private int occurrence;
+
+ /** Deprecated sign of property getter or setter method. */
+ private boolean deprecated;
+
+ /**
+ * Constructor.
+ *
+ * @param name Property name.
+ * @param occurrence Count of occurrence in configuration class.
+ * @param deprecated Deprecated sign of property getter or setter method.
+ */
+ public FieldProcessingInfo(String name, int occurrence, boolean deprecated) {
+ this.name = name;
+ this.occurrence = occurrence;
+ this.deprecated = deprecated;
+ }
+
+ /**
+ * @return Property name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return Count of occurrence in configuration class.
+ */
+ public int getOccurrence() {
+ return occurrence;
+ }
+
+ /**
+ * @return Deprecated sign of property getter or setter method.
+ */
+ public boolean isDeprecated() {
+ return deprecated;
+ }
+
+ /**
+ * Increase occurrence count.
+ *
+ * @return {@code this} for chaining.
+ */
+ public FieldProcessingInfo next() {
+ occurrence += 1;
+
+ return this;
+ }
+
+ /**
+ * Set deprecated state.
+ *
+ * @param state Deprecated state of checked method.
+ * @return {@code this} for chaining.
+ */
+ public FieldProcessingInfo deprecated(boolean state) {
+ deprecated = deprecated || state;
+
+ return this;
+ }
+}
diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/MetadataInfo.java b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/MetadataInfo.java
new file mode 100644
index 0000000..ff81c33
--- /dev/null
+++ b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/MetadataInfo.java
@@ -0,0 +1,69 @@
+/*
+ * 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.console.configuration;
+
+import java.util.Set;
+
+/**
+ * Service class with list of generated by configurator, known deprecated, and excluded from configurator fields.
+ */
+@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
+public class MetadataInfo {
+ /** List of generated fields. */
+ private final Set<String> generatedFields;
+
+ /** List of deprecated fields. */
+ private final Set<String> deprecatedFields;
+
+ /** List of excluded fields. */
+ private final Set<String> excludedFields;
+
+ /**
+ * Constructor.
+ *
+ * @param generatedFields List of generated fields.
+ * @param deprecatedFields List of deprecated fields.
+ * @param excludedFields List of excluded fields.
+ */
+ public MetadataInfo(Set<String> generatedFields, Set<String> deprecatedFields, Set<String> excludedFields) {
+ this.generatedFields = generatedFields;
+ this.deprecatedFields = deprecatedFields;
+ this.excludedFields = excludedFields;
+ }
+
+ /**
+ * @return List of generated fields.
+ */
+ public Set<String> getGeneratedFields() {
+ return generatedFields;
+ }
+
+ /**
+ * @return List of deprecated fields.
+ */
+ public Set<String> getDeprecatedFields() {
+ return deprecatedFields;
+ }
+
+ /**
+ * @return List of excluded fields.
+ */
+ public Set<String> getExcludedFields() {
+ return excludedFields;
+ }
+}
diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java
new file mode 100644
index 0000000..cb8d5d7
--- /dev/null
+++ b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java
@@ -0,0 +1,979 @@
+/*
+ * 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.console.configuration;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import org.apache.ignite.binary.BinaryTypeConfiguration;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
+import org.apache.ignite.cache.eviction.sorted.SortedEvictionPolicy;
+import org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
+import org.apache.ignite.cache.store.jdbc.JdbcType;
+import org.apache.ignite.configuration.AtomicConfiguration;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.ClientConnectorConfiguration;
+import org.apache.ignite.configuration.ConnectorConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.ExecutorConfiguration;
+import org.apache.ignite.configuration.FileSystemConfiguration;
+import org.apache.ignite.configuration.HadoopConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.configuration.OdbcConfiguration;
+import org.apache.ignite.configuration.PersistentStoreConfiguration;
+import org.apache.ignite.configuration.SqlConnectorConfiguration;
+import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory;
+import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
+import org.apache.ignite.hadoop.mapreduce.IgniteHadoopWeightedMapReducePlanner;
+import org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper;
+import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration;
+import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller;
+import org.apache.ignite.services.ServiceConfiguration;
+import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpi;
+import org.apache.ignite.spi.checkpoint.jdbc.JdbcCheckpointSpi;
+import org.apache.ignite.spi.checkpoint.s3.S3CheckpointSpi;
+import org.apache.ignite.spi.checkpoint.sharedfs.SharedFsCheckpointSpi;
+import org.apache.ignite.spi.collision.fifoqueue.FifoQueueCollisionSpi;
+import org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi;
+import org.apache.ignite.spi.collision.priorityqueue.PriorityQueueCollisionSpi;
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
+import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi;
+import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
+import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi;
+import org.apache.ignite.spi.failover.jobstealing.JobStealingFailoverSpi;
+import org.apache.ignite.spi.loadbalancing.adaptive.AdaptiveCpuLoadProbe;
+import org.apache.ignite.spi.loadbalancing.adaptive.AdaptiveJobCountLoadProbe;
+import org.apache.ignite.spi.loadbalancing.adaptive.AdaptiveLoadBalancingSpi;
+import org.apache.ignite.spi.loadbalancing.adaptive.AdaptiveProcessingTimeLoadProbe;
+import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi;
+import org.apache.ignite.spi.loadbalancing.weightedrandom.WeightedRandomLoadBalancingSpi;
+import org.apache.ignite.ssl.SslContextFactory;
+import org.junit.Test;
+
+/**
+ * Check difference of Ignite configuration with Ignite Web Console "Configuration" screen.
+ */
+public class WebConsoleConfigurationSelfTest {
+ /** */
+ protected static final Set<String> EMPTY_FIELDS = Collections.emptySet();
+
+ /** */
+ protected static final Set<String> SPI_EXCLUDED_FIELDS = Collections.singleton("name");
+
+ /** Map of properties metadata by class. */
+ protected final Map<Class<?>, MetadataInfo> metadata = new HashMap<>();
+
+ /**
+ * @param msg Message to log.
+ */
+ protected void log(String msg) {
+ System.out.println(msg);
+ }
+
+ /**
+ * Prepare metadata for properties, which are possible to configure.
+ */
+ @SuppressWarnings("deprecation")
+ protected void prepareMetadata() {
+ // Cluster configuration.
+ Set<String> igniteCfgProps = new HashSet<>();
+ igniteCfgProps.add("cacheConfiguration");
+ igniteCfgProps.add("discoverySpi");
+ igniteCfgProps.add("localHost");
+ igniteCfgProps.add("atomicConfiguration");
+ igniteCfgProps.add("userAttributes");
+ igniteCfgProps.add("binaryConfiguration");
+ igniteCfgProps.add("cacheKeyConfiguration");
+ igniteCfgProps.add("checkpointSpi");
+ igniteCfgProps.add("collisionSpi");
+ igniteCfgProps.add("communicationSpi");
+ igniteCfgProps.add("networkTimeout");
+ igniteCfgProps.add("networkSendRetryDelay");
+ igniteCfgProps.add("networkSendRetryCount");
+ igniteCfgProps.add("connectorConfiguration");
+ igniteCfgProps.add("dataStorageConfiguration");
+ igniteCfgProps.add("deploymentMode");
+ igniteCfgProps.add("peerClassLoadingEnabled");
+ igniteCfgProps.add("peerClassLoadingMissedResourcesCacheSize");
+ igniteCfgProps.add("peerClassLoadingThreadPoolSize");
+ igniteCfgProps.add("peerClassLoadingLocalClassPathExclude");
+ igniteCfgProps.add("classLoader");
+ igniteCfgProps.add("deploymentSpi");
+ igniteCfgProps.add("eventStorageSpi");
+ igniteCfgProps.add("includeEventTypes");
+ igniteCfgProps.add("failureDetectionTimeout");
+ igniteCfgProps.add("clientFailureDetectionTimeout");
+ igniteCfgProps.add("failoverSpi");
+ igniteCfgProps.add("hadoopConfiguration");
+ igniteCfgProps.add("loadBalancingSpi");
+ igniteCfgProps.add("marshalLocalJobs");
+
+ // Removed since 2.0.
+ // igniteCfgProps.add("marshallerCacheKeepAliveTime");
+ // igniteCfgProps.add("marshallerCacheThreadPoolSize");
+
+ igniteCfgProps.add("metricsExpireTime");
+ igniteCfgProps.add("metricsHistorySize");
+ igniteCfgProps.add("metricsLogFrequency");
+ igniteCfgProps.add("metricsUpdateFrequency");
+ igniteCfgProps.add("workDirectory");
+ igniteCfgProps.add("consistentId");
+ igniteCfgProps.add("warmupClosure");
+ igniteCfgProps.add("activeOnStart");
+ igniteCfgProps.add("cacheSanityCheckEnabled");
+ igniteCfgProps.add("longQueryWarningTimeout");
+ igniteCfgProps.add("odbcConfiguration");
+ igniteCfgProps.add("serviceConfiguration");
+ igniteCfgProps.add("sqlConnectorConfiguration");
+ igniteCfgProps.add("sslContextFactory");
+
+ // Removed since 2.0.
+ // igniteCfgProps.add("swapSpaceSpi");
+
+ igniteCfgProps.add("publicThreadPoolSize");
+ igniteCfgProps.add("systemThreadPoolSize");
+ igniteCfgProps.add("serviceThreadPoolSize");
+ igniteCfgProps.add("managementThreadPoolSize");
+ igniteCfgProps.add("igfsThreadPoolSize");
+ igniteCfgProps.add("rebalanceThreadPoolSize");
+ igniteCfgProps.add("utilityCacheThreadPoolSize");
+ igniteCfgProps.add("utilityCacheKeepAliveTime");
+ igniteCfgProps.add("asyncCallbackPoolSize");
+ igniteCfgProps.add("stripedPoolSize");
+ igniteCfgProps.add("dataStreamerThreadPoolSize");
+ igniteCfgProps.add("queryThreadPoolSize");
+ igniteCfgProps.add("executorConfiguration");
+
+ // Removed since 2.0.
+ // igniteCfgProps.add("clockSyncSamples");
+ // igniteCfgProps.add("clockSyncFrequency");
+
+ igniteCfgProps.add("timeServerPortBase");
+ igniteCfgProps.add("timeServerPortRange");
+ igniteCfgProps.add("transactionConfiguration");
+ igniteCfgProps.add("clientConnectorConfiguration");
+ igniteCfgProps.add("fileSystemConfiguration");
+ igniteCfgProps.add("gridLogger");
+ igniteCfgProps.add("pluginConfigurations");
+ igniteCfgProps.add("mvccVacuumFrequency");
+ igniteCfgProps.add("mvccVacuumThreadCount");
+
+ Set<String> igniteCfgPropsDep = new HashSet<>();
+ igniteCfgPropsDep.add("gridName");
+ igniteCfgPropsDep.add("lateAffinityAssignment");
+ igniteCfgPropsDep.add("persistentStoreConfiguration");
+ igniteCfgPropsDep.add("memoryConfiguration");
+ igniteCfgPropsDep.add("marshaller");
+ igniteCfgPropsDep.add("discoveryStartupDelay");
+
+ Set<String> igniteCfgPropsExcl = new HashSet<>();
+ // igniteCfgPropsExcl.add("lifecycleBeans");
+ igniteCfgPropsExcl.add("daemon");
+ igniteCfgPropsExcl.add("clientMode");
+ igniteCfgPropsExcl.add("indexingSpi");
+ igniteCfgPropsExcl.add("nodeId");
+
+ metadata.put(IgniteConfiguration.class,
+ new MetadataInfo(igniteCfgProps, igniteCfgPropsDep, igniteCfgPropsExcl));
+
+ Set<String> atomicCfgProps = new HashSet<>();
+ atomicCfgProps.add("cacheMode");
+ atomicCfgProps.add("atomicSequenceReserveSize");
+ atomicCfgProps.add("backups");
+ atomicCfgProps.add("affinity");
+
+ metadata.put(AtomicConfiguration.class, new MetadataInfo(atomicCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> binaryCfgProps = new HashSet<>();
+ binaryCfgProps.add("idMapper");
+ binaryCfgProps.add("nameMapper");
+ binaryCfgProps.add("serializer");
+ binaryCfgProps.add("typeConfigurations");
+ binaryCfgProps.add("compactFooter");
+ metadata.put(BinaryConfiguration.class, new MetadataInfo(binaryCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> binaryTypeCfgProps = new HashSet<>();
+ binaryTypeCfgProps.add("typeName");
+ binaryTypeCfgProps.add("idMapper");
+ binaryTypeCfgProps.add("nameMapper");
+ binaryTypeCfgProps.add("serializer");
+ binaryTypeCfgProps.add("enum");
+ metadata.put(BinaryTypeConfiguration.class, new MetadataInfo(binaryTypeCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> sharedFsCheckpointProps = new HashSet<>();
+ sharedFsCheckpointProps.add("directoryPaths");
+ metadata.put(SharedFsCheckpointSpi.class, new MetadataInfo(sharedFsCheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> s3CheckpointProps = new HashSet<>();
+ s3CheckpointProps.add("bucketNameSuffix");
+ s3CheckpointProps.add("bucketEndpoint");
+ s3CheckpointProps.add("sSEAlgorithm");
+ s3CheckpointProps.add("checkpointListener");
+ metadata.put(S3CheckpointSpi.class, new MetadataInfo(s3CheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> cacheCheckpointProps = new HashSet<>();
+ cacheCheckpointProps.add("cacheName");
+ metadata.put(CacheCheckpointSpi.class, new MetadataInfo(cacheCheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> jdbcCheckpointProps = new HashSet<>();
+ // Only setter for dataSource.
+ // jdbcCheckpointProps.add("dataSourceBean");
+ // jdbcCheckpointProps.add("dialect");
+ jdbcCheckpointProps.add("checkpointListener");
+ jdbcCheckpointProps.add("user");
+ // Only on code generation.
+ jdbcCheckpointProps.add("pwd");
+ jdbcCheckpointProps.add("checkpointTableName");
+ jdbcCheckpointProps.add("numberOfRetries");
+ jdbcCheckpointProps.add("keyFieldName");
+ jdbcCheckpointProps.add("keyFieldType");
+ jdbcCheckpointProps.add("valueFieldName");
+ jdbcCheckpointProps.add("valueFieldType");
+ jdbcCheckpointProps.add("expireDateFieldName");
+ jdbcCheckpointProps.add("expireDateFieldType");
+ metadata.put(JdbcCheckpointSpi.class, new MetadataInfo(jdbcCheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> cliConProps = new HashSet<>();
+ cliConProps.add("host");
+ cliConProps.add("port");
+ cliConProps.add("portRange");
+ cliConProps.add("socketSendBufferSize");
+ cliConProps.add("socketReceiveBufferSize");
+ cliConProps.add("maxOpenCursorsPerConnection");
+ cliConProps.add("threadPoolSize");
+ cliConProps.add("tcpNoDelay");
+ cliConProps.add("idleTimeout");
+ cliConProps.add("sslEnabled");
+ cliConProps.add("sslClientAuth");
+ cliConProps.add("useIgniteSslContextFactory");
+ cliConProps.add("sslContextFactory");
+ cliConProps.add("jdbcEnabled");
+ cliConProps.add("odbcEnabled");
+ cliConProps.add("thinClientEnabled");
+ metadata.put(ClientConnectorConfiguration.class, new MetadataInfo(cliConProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> jobStealingCollisionProps = new HashSet<>();
+ jobStealingCollisionProps.add("activeJobsThreshold");
+ jobStealingCollisionProps.add("waitJobsThreshold");
+ jobStealingCollisionProps.add("messageExpireTime");
+ jobStealingCollisionProps.add("maximumStealingAttempts");
+ jobStealingCollisionProps.add("stealingEnabled");
+ jobStealingCollisionProps.add("externalCollisionListener");
+ jobStealingCollisionProps.add("stealingAttributes");
+ metadata.put(JobStealingCollisionSpi.class,
+ new MetadataInfo(jobStealingCollisionProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> priQueueCollisionProps = new HashSet<>();
+ priQueueCollisionProps.add("parallelJobsNumber");
+ priQueueCollisionProps.add("waitingJobsNumber");
+ priQueueCollisionProps.add("priorityAttributeKey");
+ priQueueCollisionProps.add("jobPriorityAttributeKey");
+ priQueueCollisionProps.add("defaultPriority");
+ priQueueCollisionProps.add("starvationIncrement");
+ priQueueCollisionProps.add("starvationPreventionEnabled");
+ metadata.put(PriorityQueueCollisionSpi.class, new MetadataInfo(priQueueCollisionProps, EMPTY_FIELDS,
+ SPI_EXCLUDED_FIELDS));
+
+ Set<String> fifoQueueCollisionProps = new HashSet<>();
+ fifoQueueCollisionProps.add("parallelJobsNumber");
+ fifoQueueCollisionProps.add("waitingJobsNumber");
+ metadata.put(FifoQueueCollisionSpi.class,
+ new MetadataInfo(fifoQueueCollisionProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> commProps = new HashSet<>();
+ commProps.add("listener");
+ commProps.add("localAddress");
+ commProps.add("localPort");
+ commProps.add("localPortRange");
+ commProps.add("sharedMemoryPort");
+ commProps.add("idleConnectionTimeout");
+ commProps.add("connectTimeout");
+ commProps.add("maxConnectTimeout");
+ commProps.add("reconnectCount");
+ commProps.add("socketSendBuffer");
+ commProps.add("socketReceiveBuffer");
+ commProps.add("slowClientQueueLimit");
+ commProps.add("ackSendThreshold");
+ commProps.add("messageQueueLimit");
+ commProps.add("unacknowledgedMessagesBufferSize");
+ commProps.add("socketWriteTimeout");
+ commProps.add("selectorsCount");
+ commProps.add("addressResolver");
+ commProps.add("directBuffer");
+ commProps.add("directSendBuffer");
+ commProps.add("tcpNoDelay");
+
+ Set<String> commPropsDep = new HashSet<>();
+ commPropsDep.add("discoveryStartupDelay");
+
+ // Removed from configuration since ignite 2.3
+ Set<String> commPropsExcl = new HashSet<>();
+ commPropsExcl.add("discoveryStartupDelay");
+ commPropsExcl.addAll(SPI_EXCLUDED_FIELDS);
+
+ metadata.put(TcpCommunicationSpi.class,
+ new MetadataInfo(commProps, commPropsDep, commPropsExcl));
+
+ Set<String> discoverySpiProps = new HashSet<>();
+ discoverySpiProps.add("ipFinder");
+ discoverySpiProps.add("localAddress");
+ discoverySpiProps.add("localPort");
+ discoverySpiProps.add("localPortRange");
+ discoverySpiProps.add("addressResolver");
+ discoverySpiProps.add("socketTimeout");
+ discoverySpiProps.add("ackTimeout");
+ discoverySpiProps.add("maxAckTimeout");
+ discoverySpiProps.add("networkTimeout");
+ discoverySpiProps.add("joinTimeout");
+ discoverySpiProps.add("threadPriority");
+ // Removed since 2.0.
+ // discoverySpiProps.add("heartbeatFrequency");
+ // discoverySpiProps.add("maxMissedHeartbeats");
+ // discoverySpiProps.add("maxMissedClientHeartbeats");
+ discoverySpiProps.add("topHistorySize");
+ discoverySpiProps.add("listener");
+ discoverySpiProps.add("dataExchange");
+ discoverySpiProps.add("metricsProvider");
+ discoverySpiProps.add("reconnectCount");
+ discoverySpiProps.add("statisticsPrintFrequency");
+ discoverySpiProps.add("ipFinderCleanFrequency");
+ discoverySpiProps.add("authenticator");
+ discoverySpiProps.add("forceServerMode");
+ discoverySpiProps.add("clientReconnectDisabled");
+ metadata.put(TcpDiscoverySpi.class, new MetadataInfo(discoverySpiProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> connectorProps = new HashSet<>();
+ connectorProps.add("jettyPath");
+ connectorProps.add("host");
+ connectorProps.add("port");
+ connectorProps.add("portRange");
+ connectorProps.add("idleQueryCursorTimeout");
+ connectorProps.add("idleQueryCursorCheckFrequency");
+ connectorProps.add("idleTimeout");
+ connectorProps.add("receiveBufferSize");
+ connectorProps.add("sendBufferSize");
+ connectorProps.add("sendQueueLimit");
+ connectorProps.add("directBuffer");
+ connectorProps.add("noDelay");
+ connectorProps.add("selectorCount");
+ connectorProps.add("threadPoolSize");
+ connectorProps.add("messageInterceptor");
+ connectorProps.add("secretKey");
+ connectorProps.add("sslEnabled");
+ connectorProps.add("sslClientAuth");
+ connectorProps.add("sslFactory");
+ metadata.put(ConnectorConfiguration.class, new MetadataInfo(connectorProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> dataStorageProps = new HashSet<>();
+ dataStorageProps.add("pageSize");
+ dataStorageProps.add("concurrencyLevel");
+ dataStorageProps.add("systemRegionInitialSize");
+ dataStorageProps.add("systemRegionMaxSize");
+ dataStorageProps.add("defaultDataRegionConfiguration");
+ dataStorageProps.add("dataRegionConfigurations");
+ dataStorageProps.add("storagePath");
+ dataStorageProps.add("checkpointFrequency");
+ dataStorageProps.add("checkpointThreads");
+ dataStorageProps.add("checkpointWriteOrder");
+ dataStorageProps.add("walMode");
+ dataStorageProps.add("walPath");
+ dataStorageProps.add("walArchivePath");
+ dataStorageProps.add("walSegments");
+ dataStorageProps.add("walSegmentSize");
+ dataStorageProps.add("walHistorySize");
+ dataStorageProps.add("walBufferSize");
+ dataStorageProps.add("walFlushFrequency");
+ dataStorageProps.add("walFsyncDelayNanos");
+ dataStorageProps.add("walRecordIteratorBufferSize");
+ dataStorageProps.add("lockWaitTime");
+ dataStorageProps.add("walThreadLocalBufferSize");
+ dataStorageProps.add("metricsSubIntervalCount");
+ dataStorageProps.add("metricsRateTimeInterval");
+ dataStorageProps.add("fileIOFactory");
+ dataStorageProps.add("walAutoArchiveAfterInactivity");
+ dataStorageProps.add("metricsEnabled");
+ dataStorageProps.add("alwaysWriteFullPages");
+ dataStorageProps.add("writeThrottlingEnabled");
+ dataStorageProps.add("walCompactionEnabled");
+ metadata.put(DataStorageConfiguration.class, new MetadataInfo(dataStorageProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> dataRegionProps = new HashSet<>();
+ dataRegionProps.add("name");
+ dataRegionProps.add("initialSize");
+ dataRegionProps.add("maxSize");
+ dataRegionProps.add("swapPath");
+ dataRegionProps.add("checkpointPageBufferSize");
+ dataRegionProps.add("pageEvictionMode");
+ dataRegionProps.add("evictionThreshold");
+ dataRegionProps.add("emptyPagesPoolSize");
+ dataRegionProps.add("metricsSubIntervalCount");
+ dataRegionProps.add("metricsRateTimeInterval");
+ dataRegionProps.add("metricsEnabled");
+ dataRegionProps.add("persistenceEnabled");
+ metadata.put(DataRegionConfiguration.class, new MetadataInfo(dataRegionProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> uriDeploymentProps = new HashSet<>();
+ uriDeploymentProps.add("uriList");
+ uriDeploymentProps.add("temporaryDirectoryPath");
+ uriDeploymentProps.add("scanners");
+ uriDeploymentProps.add("listener");
+ uriDeploymentProps.add("checkMd5");
+ uriDeploymentProps.add("encodeUri");
+ metadata.put(UriDeploymentSpi.class, new MetadataInfo(uriDeploymentProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> locDeploymentProps = new HashSet<>();
+ locDeploymentProps.add("listener");
+ metadata.put(LocalDeploymentSpi.class, new MetadataInfo(locDeploymentProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> memoryEvtStorageProps = new HashSet<>();
+ memoryEvtStorageProps.add("expireAgeMs");
+ memoryEvtStorageProps.add("expireCount");
+ memoryEvtStorageProps.add("filter");
+ metadata.put(MemoryEventStorageSpi.class, new MetadataInfo(memoryEvtStorageProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> alwaysFailoverProps = new HashSet<>();
+ alwaysFailoverProps.add("maximumFailoverAttempts");
+ metadata.put(AlwaysFailoverSpi.class, new MetadataInfo(alwaysFailoverProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> jobStealingFailoverProps = new HashSet<>();
+ jobStealingFailoverProps.add("maximumFailoverAttempts");
+ metadata.put(JobStealingFailoverSpi.class, new MetadataInfo(jobStealingFailoverProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> hadoopCfgProps = new HashSet<>();
+ hadoopCfgProps.add("mapReducePlanner");
+ hadoopCfgProps.add("finishedJobInfoTtl");
+ hadoopCfgProps.add("maxParallelTasks");
+ hadoopCfgProps.add("maxTaskQueueSize");
+ hadoopCfgProps.add("nativeLibraryNames");
+ metadata.put(HadoopConfiguration.class, new MetadataInfo(hadoopCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> hadoopWeightMapReduceCfgProps = new HashSet<>();
+ hadoopWeightMapReduceCfgProps.add("localMapperWeight");
+ hadoopWeightMapReduceCfgProps.add("remoteMapperWeight");
+ hadoopWeightMapReduceCfgProps.add("localReducerWeight");
+ hadoopWeightMapReduceCfgProps.add("remoteReducerWeight");
+ hadoopWeightMapReduceCfgProps.add("preferLocalReducerThresholdWeight");
+ metadata.put(IgniteHadoopWeightedMapReducePlanner.class,
+ new MetadataInfo(hadoopWeightMapReduceCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> weightedRndLoadBalancingProps = new HashSet<>();
+ weightedRndLoadBalancingProps.add("nodeWeight");
+ weightedRndLoadBalancingProps.add("useWeights");
+ metadata.put(WeightedRandomLoadBalancingSpi.class,
+ new MetadataInfo(weightedRndLoadBalancingProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> adaptiveLoadBalancingProps = new HashSet<>();
+ adaptiveLoadBalancingProps.add("loadProbe");
+ metadata.put(AdaptiveLoadBalancingSpi.class,
+ new MetadataInfo(adaptiveLoadBalancingProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> roundRobinLoadBalancingProps = new HashSet<>();
+ roundRobinLoadBalancingProps.add("perTask");
+ metadata.put(RoundRobinLoadBalancingSpi.class,
+ new MetadataInfo(roundRobinLoadBalancingProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> jobCntProbeProps = new HashSet<>();
+ jobCntProbeProps.add("useAverage");
+ metadata.put(AdaptiveJobCountLoadProbe.class, new MetadataInfo(jobCntProbeProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> cpuLoadProbeProps = new HashSet<>();
+ cpuLoadProbeProps.add("useAverage");
+ cpuLoadProbeProps.add("useProcessors");
+ cpuLoadProbeProps.add("processorCoefficient");
+ metadata.put(AdaptiveCpuLoadProbe.class, new MetadataInfo(cpuLoadProbeProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> adaptiveTimeProbeProps = new HashSet<>();
+ adaptiveTimeProbeProps.add("useAverage");
+ metadata.put(AdaptiveProcessingTimeLoadProbe.class,
+ new MetadataInfo(adaptiveTimeProbeProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+
+ Set<String> optimizedMarshallerProps = new HashSet<>();
+ optimizedMarshallerProps.add("poolSize");
+ optimizedMarshallerProps.add("requireSerializable");
+
+ Set<String> optimizedMarshallerPropsExcl = new HashSet<>();
+ optimizedMarshallerPropsExcl.add("context");
+
+ metadata.put(OptimizedMarshaller.class,
+ new MetadataInfo(optimizedMarshallerProps, EMPTY_FIELDS, optimizedMarshallerPropsExcl));
+
+ Set<String> memoryCfgProps = new HashSet<>();
+ memoryCfgProps.add("pageSize");
+ memoryCfgProps.add("concurrencyLevel");
+ memoryCfgProps.add("systemCacheInitialSize");
+ memoryCfgProps.add("systemCacheMaxSize");
+ memoryCfgProps.add("defaultMemoryPolicyName");
+ memoryCfgProps.add("defaultMemoryPolicySize");
+ memoryCfgProps.add("memoryPolicies");
+ metadata.put(MemoryConfiguration.class, new MetadataInfo(EMPTY_FIELDS, memoryCfgProps, EMPTY_FIELDS));
+
+ Set<String> memoryPlcCfgProps = new HashSet<>();
+ memoryPlcCfgProps.add("name");
+ memoryPlcCfgProps.add("initialSize");
+ memoryPlcCfgProps.add("maxSize");
+ memoryPlcCfgProps.add("swapFilePath");
+ memoryPlcCfgProps.add("pageEvictionMode");
+ memoryPlcCfgProps.add("evictionThreshold");
+ memoryPlcCfgProps.add("emptyPagesPoolSize");
+ memoryPlcCfgProps.add("subIntervals");
+ memoryPlcCfgProps.add("rateTimeInterval");
+ memoryPlcCfgProps.add("metricsEnabled");
+ metadata.put(MemoryPolicyConfiguration.class, new MetadataInfo(EMPTY_FIELDS, memoryPlcCfgProps, EMPTY_FIELDS));
+
+ Set<String> odbcCfgProps = new HashSet<>();
+ odbcCfgProps.add("endpointAddress");
+ odbcCfgProps.add("socketSendBufferSize");
+ odbcCfgProps.add("socketReceiveBufferSize");
+ odbcCfgProps.add("maxOpenCursors");
+ odbcCfgProps.add("threadPoolSize");
+ metadata.put(OdbcConfiguration.class, new MetadataInfo(EMPTY_FIELDS, odbcCfgProps, EMPTY_FIELDS));
+
+ Set<String> persistenceCfgProps = new HashSet<>();
+ persistenceCfgProps.add("persistentStorePath");
+ persistenceCfgProps.add("metricsEnabled");
+ persistenceCfgProps.add("alwaysWriteFullPages");
+ persistenceCfgProps.add("checkpointingFrequency");
+ persistenceCfgProps.add("checkpointingPageBufferSize");
+ persistenceCfgProps.add("checkpointingThreads");
+ persistenceCfgProps.add("walStorePath");
+ persistenceCfgProps.add("walArchivePath");
+ persistenceCfgProps.add("walSegments");
+ persistenceCfgProps.add("walSegmentSize");
+ persistenceCfgProps.add("walHistorySize");
+ persistenceCfgProps.add("walFlushFrequency");
+ persistenceCfgProps.add("walFsyncDelayNanos");
+ persistenceCfgProps.add("walRecordIteratorBufferSize");
+ persistenceCfgProps.add("lockWaitTime");
+ persistenceCfgProps.add("rateTimeInterval");
+ persistenceCfgProps.add("tlbSize");
+ persistenceCfgProps.add("subIntervals");
+ metadata.put(PersistentStoreConfiguration.class, new MetadataInfo(EMPTY_FIELDS, persistenceCfgProps, EMPTY_FIELDS));
+
+ Set<String> srvcCfgProps = new HashSet<>();
+ srvcCfgProps.add("name");
+ srvcCfgProps.add("service");
+ srvcCfgProps.add("maxPerNodeCount");
+ srvcCfgProps.add("totalCount");
+ // Field cache in model.
+ srvcCfgProps.add("cacheName");
+ srvcCfgProps.add("affinityKey");
+
+ Set<String> srvcCfgPropsExclude = new HashSet<>();
+ srvcCfgPropsExclude.add("nodeFilter");
+
+ metadata.put(ServiceConfiguration.class, new MetadataInfo(srvcCfgProps, EMPTY_FIELDS, srvcCfgPropsExclude));
+
+ Set<String> sqlConnectorCfgProps = new HashSet<>();
+ sqlConnectorCfgProps.add("host");
+ sqlConnectorCfgProps.add("port");
+ sqlConnectorCfgProps.add("portRange");
+ sqlConnectorCfgProps.add("socketSendBufferSize");
+ sqlConnectorCfgProps.add("socketReceiveBufferSize");
+ sqlConnectorCfgProps.add("maxOpenCursorsPerConnection");
+ sqlConnectorCfgProps.add("threadPoolSize");
+ sqlConnectorCfgProps.add("tcpNoDelay");
+ metadata.put(SqlConnectorConfiguration.class, new MetadataInfo(EMPTY_FIELDS, sqlConnectorCfgProps, EMPTY_FIELDS));
+
+ Set<String> sslCfgProps = new HashSet<>();
+ sslCfgProps.add("keyAlgorithm");
+ sslCfgProps.add("keyStoreFilePath");
+ // Only on code generation.
+ sslCfgProps.add("keyStorePassword");
+ sslCfgProps.add("keyStoreType");
+ sslCfgProps.add("protocol");
+ sslCfgProps.add("trustManagers");
+ sslCfgProps.add("trustStoreFilePath");
+ // Only on code generation.
+ sslCfgProps.add("trustStorePassword");
+ sslCfgProps.add("trustStoreType");
+ metadata.put(SslContextFactory.class, new MetadataInfo(sslCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> executorProps = new HashSet<>();
+ executorProps.add("name");
+ executorProps.add("size");
+ metadata.put(ExecutorConfiguration.class, new MetadataInfo(executorProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> transactionCfgProps = new HashSet<>();
+ transactionCfgProps.add("defaultTxConcurrency");
+ transactionCfgProps.add("defaultTxIsolation");
+ transactionCfgProps.add("defaultTxTimeout");
+ transactionCfgProps.add("pessimisticTxLogLinger");
+ transactionCfgProps.add("pessimisticTxLogSize");
+ transactionCfgProps.add("txManagerFactory");
+ metadata.put(TransactionConfiguration.class, new MetadataInfo(transactionCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ // Cache configuration.
+
+ Set<String> cacheCfgProps = new HashSet<>();
+ cacheCfgProps.add("name");
+ cacheCfgProps.add("groupName");
+ cacheCfgProps.add("cacheMode");
+ cacheCfgProps.add("atomicityMode");
+ cacheCfgProps.add("backups");
+ cacheCfgProps.add("partitionLossPolicy");
+ cacheCfgProps.add("readFromBackup");
+ cacheCfgProps.add("copyOnRead");
+ cacheCfgProps.add("isInvalidate");
+ cacheCfgProps.add("affinityMapper");
+ cacheCfgProps.add("topologyValidator");
+ cacheCfgProps.add("maxConcurrentAsyncOperations");
+ cacheCfgProps.add("defaultLockTimeout");
+ cacheCfgProps.add("writeSynchronizationMode");
+ cacheCfgProps.add("onheapCacheEnabled");
+ cacheCfgProps.add("dataRegionName");
+ // Removed since 2.0.
+ // cacheCfgProps.add("memoryMode");
+ // cacheCfgProps.add("offHeapMode");
+ // cacheCfgProps.add("offHeapMaxMemory");
+ cacheCfgProps.add("evictionPolicy");
+ cacheCfgProps.add("evictionFilter");
+ // Removed since 2.0.
+ // cacheCfgProps.add("startSize");
+ // cacheCfgProps.add("swapEnabled");
+ cacheCfgProps.add("nearConfiguration");
+ cacheCfgProps.add("sqlSchema");
+ // Removed since 2.0.
+ // cacheCfgProps.add("sqlOnheapRowCacheSize");
+ cacheCfgProps.add("queryDetailMetricsSize");
+ cacheCfgProps.add("sqlFunctionClasses");
+ // Removed since 2.0
+ // cacheCfgProps.add("snapshotableIndex");
+ cacheCfgProps.add("sqlEscapeAll");
+ cacheCfgProps.add("queryParallelism");
+ cacheCfgProps.add("rebalanceMode");
+ cacheCfgProps.add("rebalanceBatchSize");
+ cacheCfgProps.add("rebalanceBatchesPrefetchCount");
+ cacheCfgProps.add("rebalanceOrder");
+ cacheCfgProps.add("rebalanceDelay");
+ cacheCfgProps.add("rebalanceTimeout");
+ cacheCfgProps.add("rebalanceThrottle");
+ cacheCfgProps.add("statisticsEnabled");
+ cacheCfgProps.add("managementEnabled");
+ cacheCfgProps.add("cacheStoreFactory");
+ cacheCfgProps.add("storeKeepBinary");
+ cacheCfgProps.add("loadPreviousValue");
+ cacheCfgProps.add("readThrough");
+ cacheCfgProps.add("writeThrough");
+ cacheCfgProps.add("writeBehindEnabled");
+ cacheCfgProps.add("writeBehindBatchSize");
+ cacheCfgProps.add("writeBehindFlushSize");
+ cacheCfgProps.add("writeBehindFlushFrequency");
+ cacheCfgProps.add("writeBehindFlushThreadCount");
+ cacheCfgProps.add("writeBehindCoalescing");
+ cacheCfgProps.add("indexedTypes");
+ cacheCfgProps.add("queryEntities");
+ cacheCfgProps.add("pluginConfigurations");
+
+ Set<String> cacheCfgPropsDep = new HashSet<>();
+ // Removed since 2.0.
+ // cacheCfgPropsDep.add("atomicWriteOrderMode");
+ cacheCfgPropsDep.add("memoryPolicyName");
+ cacheCfgPropsDep.add("longQueryWarningTimeout");
+
+ Set<String> cacheCfgPropsExcl = new HashSet<>();
+ cacheCfgPropsExcl.add("nodeFilter");
+
+ metadata.put(CacheConfiguration.class, new MetadataInfo(cacheCfgProps, cacheCfgPropsDep, cacheCfgPropsExcl));
+
+ Set<String> rendezvousAffinityProps = new HashSet<>();
+ rendezvousAffinityProps.add("partitions");
+ rendezvousAffinityProps.add("affinityBackupFilter");
+ rendezvousAffinityProps.add("excludeNeighbors");
+ metadata.put(RendezvousAffinityFunction.class, new MetadataInfo(rendezvousAffinityProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> nearCfgProps = new HashSet<>();
+ nearCfgProps.add("nearStartSize");
+ nearCfgProps.add("nearEvictionPolicyFactory");
+
+ Set<String> nearCfgPropsDep = new HashSet<>();
+ nearCfgPropsDep.add("nearEvictionPolicy");
+
+ metadata.put(NearCacheConfiguration.class, new MetadataInfo(nearCfgProps, nearCfgPropsDep, EMPTY_FIELDS));
+
+ Set<String> jdbcPojoStoreProps = new HashSet<>();
+ // Only setter for dataSource field.
+ // jdbcPojoStoreProps.add("dataSourceBean");
+ jdbcPojoStoreProps.add("dialect");
+ jdbcPojoStoreProps.add("batchSize");
+ jdbcPojoStoreProps.add("maximumPoolSize");
+ jdbcPojoStoreProps.add("maximumWriteAttempts");
+ jdbcPojoStoreProps.add("parallelLoadCacheMinimumThreshold");
+ jdbcPojoStoreProps.add("hasher");
+ jdbcPojoStoreProps.add("transformer");
+ jdbcPojoStoreProps.add("sqlEscapeAll");
+
+ // Configured via dataSource property.
+ Set<String> jdbcPojoStorePropsExcl = new HashSet<>();
+ jdbcPojoStorePropsExcl.add("dataSourceBean");
+ jdbcPojoStorePropsExcl.add("dataSourceFactory");
+
+ metadata.put(CacheJdbcPojoStoreFactory.class, new MetadataInfo(jdbcPojoStoreProps, EMPTY_FIELDS,
+ jdbcPojoStorePropsExcl));
+
+ Set<String> jdbcBlobStoreProps = new HashSet<>();
+ jdbcBlobStoreProps.add("connectionUrl");
+ jdbcBlobStoreProps.add("user");
+ // Only setter for dataSource.
+ // jdbcBlobStoreProps.add("dataSourceBean");
+ // jdbcBlobStoreProps.add("dialect");
+ jdbcBlobStoreProps.add("initSchema");
+ jdbcBlobStoreProps.add("createTableQuery");
+ jdbcBlobStoreProps.add("loadQuery");
+ jdbcBlobStoreProps.add("insertQuery");
+ jdbcBlobStoreProps.add("updateQuery");
+ jdbcBlobStoreProps.add("deleteQuery");
+ metadata.put(CacheJdbcBlobStore.class, new MetadataInfo(jdbcBlobStoreProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> hibernateBlobStoreProps = new HashSet<>();
+ hibernateBlobStoreProps.add("hibernateProperties");
+ metadata.put(CacheHibernateBlobStore.class, new MetadataInfo(hibernateBlobStoreProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> igfsCfgProps = new HashSet<>();
+ igfsCfgProps.add("name");
+ igfsCfgProps.add("defaultMode");
+ // Removed since 2.0.
+ // igfsCfgProps.add("dualModeMaxPendingPutsSize");
+ // igfsCfgProps.add("dualModePutExecutorService");
+ // igfsCfgProps.add("dualModePutExecutorServiceShutdown");
+ igfsCfgProps.add("fragmentizerEnabled");
+ igfsCfgProps.add("fragmentizerConcurrentFiles");
+ igfsCfgProps.add("fragmentizerThrottlingBlockLength");
+ igfsCfgProps.add("fragmentizerThrottlingDelay");
+ igfsCfgProps.add("ipcEndpointEnabled");
+ igfsCfgProps.add("ipcEndpointConfiguration");
+ igfsCfgProps.add("blockSize");
+ // streamBufferSize field in model.
+ igfsCfgProps.add("bufferSize");
+ // Removed since 2.0.
+ // igfsCfgProps.add("streamBufferSize");
+ // igfsCfgProps.add("maxSpaceSize");
+ igfsCfgProps.add("maximumTaskRangeLength");
+ igfsCfgProps.add("managementPort");
+ igfsCfgProps.add("perNodeBatchSize");
+ igfsCfgProps.add("perNodeParallelBatchCount");
+ igfsCfgProps.add("prefetchBlocks");
+ igfsCfgProps.add("sequentialReadsBeforePrefetch");
+ // Removed since 2.0.
+ // igfsCfgProps.add("trashPurgeTimeout");
+ igfsCfgProps.add("colocateMetadata");
+ igfsCfgProps.add("relaxedConsistency");
+ igfsCfgProps.add("updateFileLengthOnFlush");
+ igfsCfgProps.add("pathModes");
+ igfsCfgProps.add("secondaryFileSystem");
+
+ Set<String> igfsCfgPropsExclude = new HashSet<>();
+ igfsCfgPropsExclude.add("dataCacheConfiguration");
+ igfsCfgPropsExclude.add("metaCacheConfiguration");
+
+ metadata.put(FileSystemConfiguration.class, new MetadataInfo(igfsCfgProps, EMPTY_FIELDS, igfsCfgPropsExclude));
+
+ Set<String> igfsBlocMapperProps = new HashSet<>();
+ igfsBlocMapperProps.add("groupSize");
+
+ metadata.put(IgfsGroupDataBlocksKeyMapper.class, new MetadataInfo(igfsBlocMapperProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> secHadoopIgfsCfgProps = new HashSet<>();
+ secHadoopIgfsCfgProps.add("defaultUserName");
+ secHadoopIgfsCfgProps.add("fileSystemFactory");
+
+ metadata.put(IgniteHadoopIgfsSecondaryFileSystem.class, new MetadataInfo(secHadoopIgfsCfgProps, EMPTY_FIELDS,
+ EMPTY_FIELDS));
+
+ Set<String> cachingIgfsCfgProps = new HashSet<>();
+ cachingIgfsCfgProps.add("uri");
+ cachingIgfsCfgProps.add("configPaths");
+
+ metadata.put(CachingHadoopFileSystemFactory.class, new MetadataInfo(cachingIgfsCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> ipcEndpointProps = new HashSet<>();
+ ipcEndpointProps.add("type");
+ ipcEndpointProps.add("host");
+ ipcEndpointProps.add("port");
+ ipcEndpointProps.add("memorySize");
+ ipcEndpointProps.add("threadCount");
+ ipcEndpointProps.add("tokenDirectoryPath");
+ metadata.put(IgfsIpcEndpointConfiguration.class, new MetadataInfo(ipcEndpointProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> qryEntityProps = new HashSet<>();
+ qryEntityProps.add("keyType");
+ qryEntityProps.add("valueType");
+ qryEntityProps.add("aliases");
+ qryEntityProps.add("fields");
+ qryEntityProps.add("indexes");
+ qryEntityProps.add("tableName");
+ qryEntityProps.add("keyFieldName");
+ qryEntityProps.add("valueFieldName");
+ qryEntityProps.add("keyFields");
+ metadata.put(QueryEntity.class, new MetadataInfo(qryEntityProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> qryIdxProps = new HashSet<>();
+ qryIdxProps.add("name");
+ qryIdxProps.add("indexType");
+ qryIdxProps.add("fields");
+
+ Set<String> qryIdxPropsExcl = new HashSet<>();
+ qryIdxPropsExcl.add("fieldNames");
+
+ metadata.put(QueryIndex.class, new MetadataInfo(qryIdxProps, EMPTY_FIELDS, qryIdxPropsExcl));
+
+ Set<String> jdbcTypeProps = new HashSet<>();
+ jdbcTypeProps.add("cacheName");
+ jdbcTypeProps.add("keyType");
+ jdbcTypeProps.add("valueType");
+ jdbcTypeProps.add("databaseSchema");
+ jdbcTypeProps.add("databaseTable");
+ jdbcTypeProps.add("keyFields");
+ jdbcTypeProps.add("valueFields");
+
+ metadata.put(JdbcType.class, new MetadataInfo(jdbcTypeProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> sorterEvictionProps = new HashSet<>();
+ sorterEvictionProps.add("batchSize");
+ sorterEvictionProps.add("maxMemorySize");
+ sorterEvictionProps.add("maxSize");
+ metadata.put(SortedEvictionPolicy.class, new MetadataInfo(sorterEvictionProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> lruEvictionProps = new HashSet<>();
+ lruEvictionProps.add("batchSize");
+ lruEvictionProps.add("maxMemorySize");
+ lruEvictionProps.add("maxSize");
+ metadata.put(LruEvictionPolicy.class, new MetadataInfo(lruEvictionProps, EMPTY_FIELDS, EMPTY_FIELDS));
+
+ Set<String> fifoEvictionProps = new HashSet<>();
+ fifoEvictionProps.add("batchSize");
+ fifoEvictionProps.add("maxMemorySize");
+ fifoEvictionProps.add("maxSize");
+ metadata.put(FifoEvictionPolicy.class, new MetadataInfo(fifoEvictionProps, EMPTY_FIELDS, EMPTY_FIELDS));
+ }
+
+ /**
+ * Check an accordance of possible to configure properties and configuration classes.
+ */
+ @Test
+ public void testConfiguration() {
+ prepareMetadata();
+
+ HashMap<Class<?>, WrongFields> diff = new HashMap<>();
+
+ for(Map.Entry<Class<?>, MetadataInfo> ent: metadata.entrySet()) {
+ Class<?> cls = ent.getKey();
+ MetadataInfo meta = ent.getValue();
+
+ Set<String> props = meta.getGeneratedFields();
+ Set<String> knownDeprecated = meta.getDeprecatedFields();
+ Set<String> excludeFields = meta.getExcludedFields();
+
+ boolean clsDeprecated = cls.getAnnotation(Deprecated.class) != null;
+ Map<String, FieldProcessingInfo> clsProps = new HashMap<>();
+
+ for (Method m: cls.getMethods()) {
+ String mtdName = m.getName();
+
+ String propName = mtdName.length() > 3 && (mtdName.startsWith("get") || mtdName.startsWith("set")) ?
+ mtdName.toLowerCase().charAt(3) + mtdName.substring(4) :
+ mtdName.length() > 2 && mtdName.startsWith("is") ?
+ mtdName.toLowerCase().charAt(2) + mtdName.substring(3) : null;
+
+ boolean deprecated = clsDeprecated || m.getAnnotation(Deprecated.class) != null;
+
+ if (propName != null && !excludeFields.contains(propName)) {
+ clsProps.put(propName,
+ clsProps
+ .getOrDefault(propName, new FieldProcessingInfo(propName, 0, deprecated))
+ .deprecated(deprecated)
+ .next());
+ }
+ }
+
+ Set<String> missedFields = new HashSet<>();
+ Set<String> deprecatedFields = new HashSet<>();
+
+ for(Map.Entry<String, FieldProcessingInfo> e: clsProps.entrySet()) {
+ String prop = e.getKey();
+ FieldProcessingInfo info = e.getValue();
+
+ if (info.getOccurrence() > 1 && !info.isDeprecated() && !props.contains(prop))
+ missedFields.add(prop);
+
+ if (info.getOccurrence() > 1 && info.isDeprecated() && !props.contains(prop) && !knownDeprecated.contains(prop))
+ deprecatedFields.add(prop);
+ }
+
+ Set<String> rmvFields = new HashSet<>();
+
+ for (String p: props)
+ if (!clsProps.containsKey(p))
+ rmvFields.add(p);
+
+ for (String p: knownDeprecated)
+ if (!clsProps.containsKey(p))
+ rmvFields.add(p);
+
+ WrongFields fields = new WrongFields(missedFields, deprecatedFields, rmvFields);
+
+ if (fields.nonEmpty()) {
+ diff.put(cls, fields);
+
+ log("Result for class: " + cls.getName());
+
+ if (!missedFields.isEmpty()) {
+ log(" Missed");
+
+ for (String fld: missedFields)
+ log(" " + fld);
+ }
+
+ if (!deprecatedFields.isEmpty()) {
+ log(" Deprecated");
+
+ for (String fld: deprecatedFields)
+ log(" " + fld);
+ }
+
+ if (!rmvFields.isEmpty()) {
+ log(" Removed");
+
+ for (String fld: rmvFields)
+ log(" " + fld);
+ }
+
+ log("");
+ }
+ }
+
+ // Test will pass only if no difference found between IgniteConfiguration and Web Console generated configuration.
+ assert diff.isEmpty() : "Found difference between IgniteConfiguration and Web Console";
+ }
+}
diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WrongFields.java b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WrongFields.java
new file mode 100644
index 0000000..2a1680e
--- /dev/null
+++ b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WrongFields.java
@@ -0,0 +1,76 @@
+/*
+ * 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.console.configuration;
+
+import java.util.Set;
+
+/**
+ * Service class with information about class fields, which have problems in configurator.
+ */
+@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
+public class WrongFields {
+ /** Missing in configuration fields. */
+ private final Set<String> fields;
+
+ /** Deprecated in configuration classes fields. */
+ private final Set<String> deprecatedFields;
+
+ /** Removed in configuration classes fields. */
+ private final Set<String> rmvFields;
+
+ /**
+ * @param fields Missinig fields.
+ * @param deprecatedFields Deprecated fields.
+ * @param rmvFields Removed fields.
+ */
+ public WrongFields(Set<String> fields, Set<String> deprecatedFields, Set<String> rmvFields) {
+ this.fields = fields;
+ this.deprecatedFields = deprecatedFields;
+ this.rmvFields = rmvFields;
+ }
+
+ /**
+ * @return Missed at configurator fields.
+ */
+ public Set<String> getFields() {
+ return fields;
+ }
+
+ /**
+ * @return Deprecated in configuration classes fields.
+ */
+ public Set<String> getDeprecatedFields() {
+ return deprecatedFields;
+ }
+
+ /**
+ * @return Removed in configuration classes fields.
+ */
+ public Set<String> getRemovedFields() {
+ return rmvFields;
+ }
+
+ /**
+ * Check that wrong fields are exists.
+ *
+ * @return {@code true} when problems in configurator are exist or {@code false} otherwise.
+ */
+ public boolean nonEmpty() {
+ return !fields.isEmpty() || !deprecatedFields.isEmpty() || !rmvFields.isEmpty();
+ }
+}
diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/testsuites/WebConsoleTestSuite.java b/modules/web-console/src/test/java/org/apache/ignite/console/testsuites/WebConsoleTestSuite.java
new file mode 100644
index 0000000..249d5fb
--- /dev/null
+++ b/modules/web-console/src/test/java/org/apache/ignite/console/testsuites/WebConsoleTestSuite.java
@@ -0,0 +1,32 @@
+/*
+ * 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.console.testsuites;
+
+import org.apache.ignite.console.configuration.WebConsoleConfigurationSelfTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Ignite Web Console test suite.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ WebConsoleConfigurationSelfTest.class,
+})
+public class WebConsoleTestSuite {
+}