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 9c721f7 IGNITE-11283 Web console: Actualized cluster configuration. 9c721f7 is described below commit 9c721f7f053f80558444fb38fe638c50018dabe3 Author: Vasiliy Sisko <vsi...@gridgain.com> AuthorDate: Fri Apr 5 17:17:34 2019 +0700 IGNITE-11283 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 8 +++- .../cluster-edit-form/templates/persistence.pug | 31 ++++++++++++ .../cluster-edit-form/templates/transactions.pug | 25 ++++++++++ .../generator/generator/AbstractTransformer.js | 4 +- .../generator/generator/ConfigurationGenerator.js | 17 +++++-- .../generator/generator/defaults/Cache.service.js | 1 - .../generator/defaults/Cluster.service.js | 12 ++++- .../WebConsoleConfigurationSelfTest.java | 55 ++++++++++++++++------ .../ignite/console/configuration/WrongFields.java | 2 +- 9 files changed, 129 insertions(+), 26 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index ce48932..4741776 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -769,7 +769,10 @@ module.exports.factory = function(mongoose) { pessimisticTxLogLinger: Number, pessimisticTxLogSize: Number, txSerializableEnabled: Boolean, - txManagerFactory: String + txManagerFactory: String, + useJtaSynchronization: Boolean, + txTimeoutOnPartitionMapExchange: Number, // 2.5 + deadlockTimeout: Number // 2.8 }, sslEnabled: Boolean, sslContextFactory: { @@ -1187,7 +1190,8 @@ module.exports.factory = function(mongoose) { lockWaitTime: Number, rateTimeInterval: Number, tlbSize: Number, - subIntervals: Number + subIntervals: Number, + walAutoArchiveAfterInactivity: Number }, mvccVacuumThreadCount: Number, mvccVacuumFrequency: Number diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug index a8ddd97..e0f5955 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug @@ -95,6 +95,27 @@ panel-collapsible( tip: 'A number of threads to use for the checkpointing purposes' }) .pc-form-grid-col-60 + +form-field__dropdown({ + label: 'WAL mode:', + model: `${model}.walMode`, + name: '"PersistenceWalMode"', + disabled: `!(${enabled})`, + placeholder: 'DEFAULT', + options: '[\ + {value: "DEFAULT", label: "DEFAULT"},\ + {value: "LOG_ONLY", label: "LOG_ONLY"},\ + {value: "BACKGROUND", label: "BACKGROUND"},\ + {value: "NONE", label: "NONE"}\ + ]', + tip: 'Type define behavior wal fsync.\ + <ul>\ + <li>DEFAULT - full-sync disk writes</li>\ + <li>LOG_ONLY - flushes application buffers</li>\ + <li>BACKGROUND - does not force application's buffer flush</li>\ + <li>NONE - WAL is disabled</li>\ + </ul>' + }) + .pc-form-grid-col-60 +form-field__text({ label: 'WAL store path:', model: `${model}.walStorePath`, @@ -212,5 +233,15 @@ panel-collapsible( min: '1', tip: 'Number of sub - intervals the whole rate time interval will be split into to calculate rate - based metrics' }) + .pc-form-grid-col-60 + +form-field__number({ + label: 'WAL auto archive after inactivity:', + model: `${model}.walAutoArchiveAfterInactivity`, + name: '"PersistenceWalAutoArchiveAfterInactivity"', + disabled: `!(${enabled})`, + placeholder: '-1', + min: '-1', + tip: 'Time in millis to run auto archiving segment after last record logging' + }) .pca-form-column-6 +preview-xml-java(model, 'clusterPersistence') diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/transactions.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/transactions.pug index f69aa51..29b6e28 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/transactions.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/transactions.pug @@ -95,5 +95,30 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) name: '"txManagerFactory"', tip: 'Class name of transaction manager factory for integration with JEE app servers' }) + .pc-form-grid-col-60(ng-if='$ctrl.available("2.5.0")') + +form-field__number({ + label: 'Partition map exchange timeout:', + model: `${model}.txTimeoutOnPartitionMapExchange`, + name: '"txTimeoutOnPartitionMapExchange"', + placeholder: '0', + min: '0', + tip: 'Transaction timeout for partition map synchronization in milliseconds' + }) + .pc-form-grid-col-60(ng-if='$ctrl.available("2.8.0")') + +form-field__number({ + label: 'Deadlock timeout:', + model: `${model}.deadlockTimeout`, + name: '"deadlockTimeout"', + placeholder: '10000', + min: '0', + tip: 'Timeout before starting deadlock detection for caches configured with TRANSACTIONAL_SNAPSHOT atomicity mode in milliseconds' + }) + .pc-form-grid-col-60 + +form-field__checkbox({ + label: 'Use JTA synchronization', + model: `${model}.useJtaSynchronization`, + name: '"useJtaSynchronization"', + tip: 'Use lightweight JTA synchronization callback to enlist into JTA transaction instead of creating a separate XA resource' + }) .pca-form-column-6 +preview-xml-java(model, 'clusterTransactions') diff --git a/modules/web-console/frontend/app/configuration/generator/generator/AbstractTransformer.js b/modules/web-console/frontend/app/configuration/generator/generator/AbstractTransformer.js index 2a81b4d..17ecf7f 100644 --- a/modules/web-console/frontend/app/configuration/generator/generator/AbstractTransformer.js +++ b/modules/web-console/frontend/app/configuration/generator/generator/AbstractTransformer.js @@ -211,8 +211,8 @@ export default class AbstractTransformer { } // Generate transactions group. - static clusterTransactions(transactionConfiguration) { - return this.toSection(this.generator.clusterTransactions(transactionConfiguration)); + static clusterTransactions(transactionConfiguration, available) { + return this.toSection(this.generator.clusterTransactions(transactionConfiguration, available)); } // Generate user attributes group. diff --git a/modules/web-console/frontend/app/configuration/generator/generator/ConfigurationGenerator.js b/modules/web-console/frontend/app/configuration/generator/generator/ConfigurationGenerator.js index 26833be..a71f518 100644 --- a/modules/web-console/frontend/app/configuration/generator/generator/ConfigurationGenerator.js +++ b/modules/web-console/frontend/app/configuration/generator/generator/ConfigurationGenerator.js @@ -131,7 +131,7 @@ export default class IgniteConfigurationGenerator { this.clusterPools(cluster, available, cfg); this.clusterTime(cluster, available, cfg); - this.clusterTransactions(cluster.transactionConfiguration, cfg); + this.clusterTransactions(cluster.transactionConfiguration, available, cfg); this.clusterUserAttributes(cluster, cfg); this.clusterCaches(cluster, cluster.caches, cluster.igfss, available, client, cfg); @@ -1742,6 +1742,7 @@ export default class IgniteConfigurationGenerator { .longProperty('checkpointingFrequency') .longProperty('checkpointingPageBufferSize') .intProperty('checkpointingThreads') + .enumProperty('walMode') .stringProperty('walStorePath') .stringProperty('walArchivePath') .intProperty('walSegments') @@ -1753,7 +1754,8 @@ export default class IgniteConfigurationGenerator { .longProperty('lockWaitTime') .longProperty('rateTimeInterval') .intProperty('tlbSize') - .intProperty('subIntervals'); + .intProperty('subIntervals') + .longProperty('walAutoArchiveAfterInactivity'); cfg.beanProperty('persistentStoreConfiguration', bean); @@ -1892,7 +1894,7 @@ export default class IgniteConfigurationGenerator { } // Generate transactions group. - static clusterTransactions(transactionConfiguration, cfg = this.igniteConfigurationBean()) { + static clusterTransactions(transactionConfiguration, available, cfg = this.igniteConfigurationBean()) { const bean = new Bean('org.apache.ignite.configuration.TransactionConfiguration', 'transactionConfiguration', transactionConfiguration, clusterDflts.transactionConfiguration); @@ -1904,6 +1906,14 @@ export default class IgniteConfigurationGenerator { .boolProperty('txSerializableEnabled') .emptyBeanProperty('txManagerFactory'); + if (available('2.5.0')) + bean.longProperty('txTimeoutOnPartitionMapExchange'); + + if (available('2.8.0')) + bean.longProperty('deadlockTimeout'); + + bean.boolProperty('useJtaSynchronization'); + if (bean.nonEmpty()) cfg.beanProperty('transactionConfiguration', bean); @@ -2425,7 +2435,6 @@ export default class IgniteConfigurationGenerator { static cacheRebalance(cache, ccfg = this.cacheConfigurationBean(cache)) { if (ccfg.valueOf('cacheMode') !== 'LOCAL') { ccfg.enumProperty('rebalanceMode') - .intProperty('rebalanceThreadPoolSize') .intProperty('rebalanceBatchSize') .longProperty('rebalanceBatchesPrefetchCount') .intProperty('rebalanceOrder') diff --git a/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cache.service.js b/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cache.service.js index ff06400..2e818ba 100644 --- a/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cache.service.js +++ b/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cache.service.js @@ -70,7 +70,6 @@ const DFLT_CACHE = { clsName: 'org.apache.ignite.cache.CacheRebalanceMode', value: 'ASYNC' }, - rebalanceThreadPoolSize: 1, rebalanceBatchSize: 524288, rebalanceBatchesPrefetchCount: 2, rebalanceOrder: 0, diff --git a/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cluster.service.js b/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cluster.service.js index 0457bc9..fac2cc5 100644 --- a/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cluster.service.js +++ b/modules/web-console/frontend/app/configuration/generator/generator/defaults/Cluster.service.js @@ -210,7 +210,10 @@ const DFLT_CLUSTER = { value: 'REPEATABLE_READ' }, defaultTxTimeout: 0, - pessimisticTxLogLinger: 10000 + pessimisticTxLogLinger: 10000, + useJtaSynchronization: false, + txTimeoutOnPartitionMapExchange: 0, + deadlockTimeout: 10000 }, attributes: { keyClsName: 'java.lang.String', @@ -402,7 +405,12 @@ const DFLT_CLUSTER = { lockWaitTime: 10000, rateTimeInterval: 60000, tlbSize: 131072, - subIntervals: 5 + subIntervals: 5, + walMode: { + clsName: 'org.apache.ignite.configuration.WALMode', + value: 'DEFAULT' + }, + walAutoArchiveAfterInactivity: -1 }, sqlConnectorConfiguration: { port: 10800, 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 index 4665fee..66a4ac7 100644 --- 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 @@ -245,7 +245,8 @@ public class WebConsoleConfigurationSelfTest { Set<String> sharedFsCheckpointProps = new HashSet<>(); sharedFsCheckpointProps.add("directoryPaths"); - metadata.put(SharedFsCheckpointSpi.class, new MetadataInfo(sharedFsCheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); + metadata.put(SharedFsCheckpointSpi.class, + new MetadataInfo(sharedFsCheckpointProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); Set<String> s3CheckpointProps = new HashSet<>(); s3CheckpointProps.add("bucketNameSuffix"); @@ -405,7 +406,10 @@ public class WebConsoleConfigurationSelfTest { connectorProps.add("sslEnabled"); connectorProps.add("sslClientAuth"); connectorProps.add("sslFactory"); - metadata.put(ConnectorConfiguration.class, new MetadataInfo(connectorProps, EMPTY_FIELDS, EMPTY_FIELDS)); + + Set<String> connectorPropsDep = new HashSet<>(); + connectorPropsDep.add("sslContextFactory"); + metadata.put(ConnectorConfiguration.class, new MetadataInfo(connectorProps, connectorPropsDep, EMPTY_FIELDS)); Set<String> dataStorageProps = new HashSet<>(); dataStorageProps.add("pageSize"); @@ -472,7 +476,8 @@ public class WebConsoleConfigurationSelfTest { memoryEvtStorageProps.add("expireAgeMs"); memoryEvtStorageProps.add("expireCount"); memoryEvtStorageProps.add("filter"); - metadata.put(MemoryEventStorageSpi.class, new MetadataInfo(memoryEvtStorageProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); + metadata.put(MemoryEventStorageSpi.class, + new MetadataInfo(memoryEvtStorageProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); Set<String> alwaysFailoverProps = new HashSet<>(); alwaysFailoverProps.add("maximumFailoverAttempts"); @@ -480,7 +485,8 @@ public class WebConsoleConfigurationSelfTest { Set<String> jobStealingFailoverProps = new HashSet<>(); jobStealingFailoverProps.add("maximumFailoverAttempts"); - metadata.put(JobStealingFailoverSpi.class, new MetadataInfo(jobStealingFailoverProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); + metadata.put(JobStealingFailoverSpi.class, + new MetadataInfo(jobStealingFailoverProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); Set<String> hadoopCfgProps = new HashSet<>(); hadoopCfgProps.add("mapReducePlanner"); @@ -517,7 +523,8 @@ public class WebConsoleConfigurationSelfTest { Set<String> jobCntProbeProps = new HashSet<>(); jobCntProbeProps.add("useAverage"); - metadata.put(AdaptiveJobCountLoadProbe.class, new MetadataInfo(jobCntProbeProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); + metadata.put(AdaptiveJobCountLoadProbe.class, + new MetadataInfo(jobCntProbeProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); Set<String> cpuLoadProbeProps = new HashSet<>(); cpuLoadProbeProps.add("useAverage"); @@ -590,7 +597,14 @@ public class WebConsoleConfigurationSelfTest { persistenceCfgProps.add("rateTimeInterval"); persistenceCfgProps.add("tlbSize"); persistenceCfgProps.add("subIntervals"); - metadata.put(PersistentStoreConfiguration.class, new MetadataInfo(EMPTY_FIELDS, persistenceCfgProps, EMPTY_FIELDS)); + persistenceCfgProps.add("walMode"); + persistenceCfgProps.add("walAutoArchiveAfterInactivity"); + persistenceCfgProps.add("writeThrottlingEnabled"); + persistenceCfgProps.add("checkpointWriteOrder"); + persistenceCfgProps.add("fileIOFactory"); + persistenceCfgProps.add("walBufferSize"); + metadata.put(PersistentStoreConfiguration.class, + new MetadataInfo(EMPTY_FIELDS, persistenceCfgProps, EMPTY_FIELDS)); Set<String> srvcCfgProps = new HashSet<>(); srvcCfgProps.add("name"); @@ -615,7 +629,8 @@ public class WebConsoleConfigurationSelfTest { sqlConnectorCfgProps.add("maxOpenCursorsPerConnection"); sqlConnectorCfgProps.add("threadPoolSize"); sqlConnectorCfgProps.add("tcpNoDelay"); - metadata.put(SqlConnectorConfiguration.class, new MetadataInfo(EMPTY_FIELDS, sqlConnectorCfgProps, EMPTY_FIELDS)); + metadata.put(SqlConnectorConfiguration.class, + new MetadataInfo(EMPTY_FIELDS, sqlConnectorCfgProps, EMPTY_FIELDS)); Set<String> sslCfgProps = new HashSet<>(); sslCfgProps.add("keyAlgorithm"); @@ -645,7 +660,12 @@ public class WebConsoleConfigurationSelfTest { transactionCfgProps.add("pessimisticTxLogLinger"); transactionCfgProps.add("pessimisticTxLogSize"); transactionCfgProps.add("txManagerFactory"); - metadata.put(TransactionConfiguration.class, new MetadataInfo(transactionCfgProps, EMPTY_FIELDS, EMPTY_FIELDS)); + + Set<String> transactionCfgPropsDep = new HashSet<>(); + transactionCfgPropsDep.add("txSerializableEnabled"); + transactionCfgPropsDep.add("txManagerLookupClassName"); + metadata.put(TransactionConfiguration.class, + new MetadataInfo(transactionCfgProps, transactionCfgPropsDep, EMPTY_FIELDS)); // Cache configuration. @@ -746,7 +766,11 @@ public class WebConsoleConfigurationSelfTest { rendezvousAffinityProps.add("partitions"); rendezvousAffinityProps.add("affinityBackupFilter"); rendezvousAffinityProps.add("excludeNeighbors"); - metadata.put(RendezvousAffinityFunction.class, new MetadataInfo(rendezvousAffinityProps, EMPTY_FIELDS, EMPTY_FIELDS)); + + Set<String> rendezvousAffinityPropsDep = new HashSet<>(); + rendezvousAffinityPropsDep.add("backupFilter"); + metadata.put(RendezvousAffinityFunction.class, + new MetadataInfo(rendezvousAffinityProps, rendezvousAffinityPropsDep, EMPTY_FIELDS)); Set<String> nearCfgProps = new HashSet<>(); nearCfgProps.add("nearStartSize"); @@ -774,8 +798,8 @@ public class WebConsoleConfigurationSelfTest { jdbcPojoStorePropsExcl.add("dataSourceBean"); jdbcPojoStorePropsExcl.add("dataSourceFactory"); - metadata.put(CacheJdbcPojoStoreFactory.class, new MetadataInfo(jdbcPojoStoreProps, EMPTY_FIELDS, - jdbcPojoStorePropsExcl)); + metadata.put(CacheJdbcPojoStoreFactory.class, + new MetadataInfo(jdbcPojoStoreProps, EMPTY_FIELDS, jdbcPojoStorePropsExcl)); Set<String> jdbcBlobStoreProps = new HashSet<>(); jdbcBlobStoreProps.add("connectionUrl"); @@ -793,7 +817,8 @@ public class WebConsoleConfigurationSelfTest { Set<String> hibernateBlobStoreProps = new HashSet<>(); hibernateBlobStoreProps.add("hibernateProperties"); - metadata.put(CacheHibernateBlobStore.class, new MetadataInfo(hibernateBlobStoreProps, EMPTY_FIELDS, EMPTY_FIELDS)); + metadata.put(CacheHibernateBlobStore.class, + new MetadataInfo(hibernateBlobStoreProps, EMPTY_FIELDS, EMPTY_FIELDS)); Set<String> igfsCfgProps = new HashSet<>(); igfsCfgProps.add("name"); @@ -837,7 +862,8 @@ public class WebConsoleConfigurationSelfTest { Set<String> igfsBlocMapperProps = new HashSet<>(); igfsBlocMapperProps.add("groupSize"); - metadata.put(IgfsGroupDataBlocksKeyMapper.class, new MetadataInfo(igfsBlocMapperProps, EMPTY_FIELDS, EMPTY_FIELDS)); + metadata.put(IgfsGroupDataBlocksKeyMapper.class, + new MetadataInfo(igfsBlocMapperProps, EMPTY_FIELDS, EMPTY_FIELDS)); Set<String> secHadoopIgfsCfgProps = new HashSet<>(); secHadoopIgfsCfgProps.add("defaultUserName"); @@ -851,7 +877,8 @@ public class WebConsoleConfigurationSelfTest { cachingIgfsCfgProps.add("configPaths"); cachingIgfsCfgProps.add("userNameMapper"); - metadata.put(CachingHadoopFileSystemFactory.class, new MetadataInfo(cachingIgfsCfgProps, EMPTY_FIELDS, EMPTY_FIELDS)); + metadata.put(CachingHadoopFileSystemFactory.class, + new MetadataInfo(cachingIgfsCfgProps, EMPTY_FIELDS, EMPTY_FIELDS)); Set<String> kerberosIgfsCfgProps = new HashSet<>(); kerberosIgfsCfgProps.add("uri"); 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 index 2a1680e..1efe394 100644 --- 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 @@ -34,7 +34,7 @@ public class WrongFields { private final Set<String> rmvFields; /** - * @param fields Missinig fields. + * @param fields Missing fields. * @param deprecatedFields Deprecated fields. * @param rmvFields Removed fields. */