IGNITE-11354 Web console: Actualized cluster configuration.
diff --git a/backend/app/schemas.js b/backend/app/schemas.js
index 29493a5..50b97f3 100644
--- a/backend/app/schemas.js
+++ b/backend/app/schemas.js
@@ -494,6 +494,9 @@
authenticator: String,
forceServerMode: Boolean,
clientReconnectDisabled: Boolean,
+ connectionRecoveryTimeout: Number,
+ reconnectDelay: Number,
+ soLinger: Number,
kind: {
type: String,
enum: ['Vm', 'Multicast', 'S3', 'Cloud', 'GoogleStorage', 'Jdbc', 'SharedFs', 'ZooKeeper', 'Kubernetes']
@@ -655,7 +658,8 @@
Custom: {
className: String
}
- }
+ },
+ groupName: String
},
binaryConfiguration: {
idMapper: String,
@@ -730,7 +734,11 @@
unacknowledgedMessagesBufferSize: Number,
socketWriteTimeout: Number,
selectorsCount: Number,
- addressResolver: String
+ addressResolver: String,
+ selectorSpins: Number,
+ connectionsPerNode: Number,
+ usePairedConnections: Boolean,
+ filterReachableAddresses: Boolean
},
connector: {
enabled: Boolean,
@@ -1146,7 +1154,9 @@
walAutoArchiveAfterInactivity: Number,
writeThrottlingEnabled: Boolean,
walCompactionEnabled: Boolean,
- checkpointReadLockTimeout: Number
+ checkpointReadLockTimeout: Number,
+ maxWalArchiveSize: Number,
+ walCompactionLevel: Number
},
memoryConfiguration: {
systemCacheInitialSize: Number,
diff --git a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug
index d227c27..b27ada9 100644
--- a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug
+++ b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug
@@ -38,16 +38,16 @@
name: '"cacheMode"',
placeholder: 'PARTITIONED',
options: '[\
- {value: "LOCAL", label: "LOCAL"},\
- {value: "REPLICATED", label: "REPLICATED"},\
- {value: "PARTITIONED", label: "PARTITIONED"}\
- ]',
+ {value: "LOCAL", label: "LOCAL"},\
+ {value: "REPLICATED", label: "REPLICATED"},\
+ {value: "PARTITIONED", label: "PARTITIONED"}\
+ ]',
tip: 'Cache modes:\
- <ul>\
- <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes</li>\
- <li>Replicated - in this mode all the keys are distributed to all participating nodes</li>\
- <li>Local - in this mode caches residing on different grid nodes will not know about each other</li>\
- </ul>'
+ <ul>\
+ <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes</li>\
+ <li>Replicated - in this mode all the keys are distributed to all participating nodes</li>\
+ <li>Local - in this mode caches residing on different grid nodes will not know about each other</li>\
+ </ul>'
})
.pc-form-grid-col-30
+form-field__number({
@@ -77,11 +77,11 @@
placeholder: 'Default',
options: '$ctrl.Clusters.affinityFunctions',
tip: 'Key topology resolver to provide mapping from keys to nodes\
- <ul>\
- <li>Rendezvous - Based on Highest Random Weight algorithm<br/></li>\
- <li>Custom - Custom implementation of key affinity function<br/></li>\
- <li>Default - By default rendezvous affinity function with 1024 partitions is used<br/></li>\
- </ul>'
+ <ul>\
+ <li>Rendezvous - Based on Highest Random Weight algorithm<br/></li>\
+ <li>Custom - Custom implementation of key affinity function<br/></li>\
+ <li>Default - By default rendezvous affinity function with 1024 partitions is used<br/></li>\
+ </ul>'
})
.pc-form-group(ng-if-end ng-if=rendezvousAff + ' || ' + customAff)
.pc-form-grid-row
@@ -117,5 +117,13 @@
required: customAff,
tip: 'Custom key affinity function implementation class name'
})
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.1.0")')
+ +form-field__text({
+ label: 'Default group name:',
+ model: `${model}.groupName`,
+ name: '"AtomicGroupName"',
+ placeholder: 'Input group name',
+ tip: 'Group name'
+ })
.pca-form-column-6
+preview-xml-java(model, 'clusterAtomics')
diff --git a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug
index 6a3de5b..0f7ce23 100644
--- a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug
+++ b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug
@@ -236,6 +236,24 @@
min: '1',
tip: 'Count of selectors te be used in TCP server'
})
+ .pc-form-grid-col-30
+ +form-field__number({
+ label: 'Selectors spins:',
+ model: `${communication}.selectorSpins`,
+ name: '"selectorSpins"',
+ placeholder: '0',
+ min: '0',
+ tip: 'Defines how many non-blocking selector.selectNow() should be made before falling into selector.select(long) in NIO server'
+ })
+ .pc-form-grid-col-30
+ +form-field__number({
+ label: 'Connections per node:',
+ model: `${communication}.connectionsPerNode`,
+ name: '"connectionsPerNode"',
+ placeholder: '1',
+ min: '1',
+ tip: 'Number of connections to each remote node'
+ })
.pc-form-grid-col-60
+form-field__java-class({
label: 'Address resolver:',
@@ -265,5 +283,19 @@
name: '"tcpNoDelay"',
tip: 'Value for TCP_NODELAY socket option'
})
+ .pc-form-grid-col-60
+ +form-field__checkbox({
+ label: 'Use paired connections',
+ model: `${communication}.usePairedConnections`,
+ name: '"usePairedConnections"',
+ tip: 'Maintain connection for outgoing and incoming messages separately'
+ })
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.3.0")')
+ +form-field__checkbox({
+ label: 'Filter reachable addresses',
+ model: `${communication}.filterReachableAddresses`,
+ name: '"filterReachableAddresses"',
+ tip: 'Filter for reachable addresses on creating tcp client'
+ })
.pca-form-column-6
+preview-xml-java(model, 'clusterCommunication')
diff --git a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/data-storage.pug b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/data-storage.pug
index a7f0891..caab4ea 100644
--- a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/data-storage.pug
+++ b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/data-storage.pug
@@ -319,14 +319,6 @@
placeholder: 'db/wal',
tip: 'A path to the directory where WAL is stored'
})
- .pc-form-grid-col-60
- +form-field__text({
- label: 'WAL archive path:',
- model: `${model}.walArchivePath`,
- name: '"DataStorageWalArchivePath"',
- placeholder: 'db/wal/archive',
- tip: 'A path to the WAL archive directory'
- })
.pc-form-grid-col-20
+form-field__number({
label: 'WAL segments:',
@@ -354,6 +346,44 @@
min: '1',
tip: 'A total number of checkpoints to keep in the WAL history'
})
+ .pc-form-grid-col-60
+ +form-field__text({
+ label: 'WAL archive path:',
+ model: `${model}.walArchivePath`,
+ name: '"DataStorageWalArchivePath"',
+ placeholder: 'db/wal/archive',
+ tip: 'A path to the WAL archive directory'
+ })
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.7.0")')
+ form-field-size(
+ label='Max allowed size of WAL archives:'
+ ng-model=`${model}.maxWalArchiveSize`
+ name='DataStorageMaxWalArchiveSize'
+ placeholder='1'
+ min='1'
+ tip='Max allowed size of WAL archives'
+ size-scale-label='gb'
+ size-type='bytes'
+ )
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.7.0")')
+ +form-field__number({
+ label: 'WAL compaction level:',
+ model: `${model}.walCompactionLevel`,
+ name: '"DataStorageWalCompactionLevel"',
+ placeholder: '1',
+ min: '0',
+ max: '9',
+ tip: 'ZIP level to WAL compaction (0-9)'
+ })
+ .pc-form-grid-col-60
+ +form-field__number({
+ label: 'WAL auto archive after inactivity:',
+ model: `${model}.walAutoArchiveAfterInactivity`,
+ name: '"DataStorageWalAutoArchiveAfterInactivity"',
+ placeholder: '-1',
+ min: '-1',
+ tip: 'Time in millis to run auto archiving segment after last record logging'
+ })
.pc-form-grid-col-60(ng-if='$ctrl.available("2.4.0")')
+form-field__number({
label: 'WAL buffer size:',
@@ -426,7 +456,7 @@
min: '1000',
tip: 'The length of the time interval for rate - based metrics. This interval defines a window over which hits will be tracked'
})
- .pc-form-grid-col-30
+ .pc-form-grid-col-60
+form-field__dropdown({
label: 'File IO factory:',
model: `${model}.fileIOFactory`,
@@ -443,16 +473,6 @@
<li>SEQUENTIAL - All checkpoint pages are collected into single list and sorted by page index</li>\
</ul>'
})
-
- .pc-form-grid-col-30
- +form-field__number({
- label: 'WAL auto archive after inactivity:',
- model: `${model}.walAutoArchiveAfterInactivity`,
- name: '"DataStorageWalAutoArchiveAfterInactivity"',
- placeholder: '-1',
- min: '-1',
- tip: 'Time in millis to run auto archiving segment after last record logging'
- })
.pc-form-grid-col-60
+form-field__checkbox({
label: 'Metrics enabled',
diff --git a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/discovery.pug b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/discovery.pug
index 0ff6313..2d5b017 100644
--- a/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/discovery.pug
+++ b/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/discovery.pug
@@ -214,6 +214,33 @@
name: '"authenticator"',
tip: 'Class name of node authenticator implementation'
})
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.4.0")')
+ +form-field__number({
+ label: 'Reconnect delay:',
+ model: `${model}.reconnectDelay`,
+ name: '"reconnectDelay"',
+ placeholder: '2000',
+ min: '0',
+ tip: 'Amount of time in milliseconds that node waits before retrying to (re)connect to the cluster'
+ })
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.7.0")')
+ +form-field__number({
+ label: 'Connection recovery timeout:',
+ model: `${model}.connectionRecoveryTimeout`,
+ name: '"connectionRecoveryTimeout"',
+ placeholder: '10000',
+ min: '0',
+ tip: 'Defines how long server node would try to recovery connection'
+ })
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.8.0")')
+ +form-field__number({
+ label: 'SO Linger timeout:',
+ model: `${model}.soLinger`,
+ name: '"soLinger"',
+ placeholder: '5',
+ min: '-1',
+ tip: 'SO_LINGER timeout for socket'
+ })
.pc-form-grid-col-60
+form-field__checkbox({
label: 'Force server mode',
diff --git a/frontend/app/configuration/generator/generator/ConfigurationGenerator.js b/frontend/app/configuration/generator/generator/ConfigurationGenerator.js
index 98bfaf2..3b24f14 100644
--- a/frontend/app/configuration/generator/generator/ConfigurationGenerator.js
+++ b/frontend/app/configuration/generator/generator/ConfigurationGenerator.js
@@ -220,8 +220,7 @@
if (isNil(cluster.discovery))
return cfg;
- const discovery = new Bean('org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi', 'discovery',
- cluster.discovery, clusterDflts.discovery);
+ const discovery = IgniteConfigurationGenerator.discoveryConfigurationBean(cluster.discovery);
let ipFinder;
@@ -483,6 +482,8 @@
// Generate atomics group.
static clusterAtomics(atomics, available, cfg = this.igniteConfigurationBean()) {
+ const available2_1 = available('2.1.0');
+
const acfg = new Bean('org.apache.ignite.configuration.AtomicConfiguration', 'atomicCfg',
atomics, clusterDflts.atomics);
@@ -492,9 +493,12 @@
if (acfg.valueOf('cacheMode') === 'PARTITIONED')
acfg.intProperty('backups');
- if (available('2.1.0') && nonNil(atomics))
+ if (available2_1 && nonNil(atomics))
this.affinity(atomics.affinity, acfg);
+ if (available2_1)
+ acfg.stringProperty('groupName');
+
if (acfg.isEmpty())
return cfg;
@@ -960,7 +964,13 @@
.intProperty('unacknowledgedMessagesBufferSize')
.longProperty('socketWriteTimeout')
.intProperty('selectorsCount')
- .emptyBeanProperty('addressResolver');
+ .longProperty('selectorSpins')
+ .intProperty('connectionsPerNode')
+ .emptyBeanProperty('addressResolver')
+ .boolProperty('usePairedConnections');
+
+ if (available('2.3.0'))
+ commSpi.boolProperty('filterReachableAddresses');
if (commSpi.nonEmpty())
cfg.beanProperty('communicationSpi', commSpi);
@@ -1096,8 +1106,18 @@
.intProperty('reconnectCount')
.longProperty('statisticsPrintFrequency')
.longProperty('ipFinderCleanFrequency')
- .emptyBeanProperty('authenticator')
- .intProperty('forceServerMode')
+ .emptyBeanProperty('authenticator');
+
+ if (available('2.4.0'))
+ discoSpi.longProperty('reconnectDelay');
+
+ if (available('2.7.0'))
+ discoSpi.longProperty('connectionRecoveryTimeout');
+
+ if (available('2.8.0'))
+ discoSpi.intProperty('soLinger');
+
+ discoSpi.intProperty('forceServerMode')
.intProperty('clientReconnectDisabled');
if (discoSpi.nonEmpty())
@@ -1495,6 +1515,8 @@
if (!available('2.3.0'))
return cfg;
+ const available2_4 = available('2.4.0');
+ const available2_7 = available('2.7.0');
const storageBean = new Bean('org.apache.ignite.configuration.DataStorageConfiguration', 'dataStorageCfg', dataStorageCfg, clusterDflts.dataStorageConfiguration);
storageBean.intProperty('pageSize')
@@ -1524,7 +1546,7 @@
storageBean.stringProperty('storagePath')
.longProperty('checkpointFrequency');
- if (available('2.7.0')) {
+ if (available2_7) {
storageBean
.longProperty('checkpointReadLockTimeout');
}
@@ -1533,12 +1555,19 @@
.enumProperty('checkpointWriteOrder')
.enumProperty('walMode')
.stringProperty('walPath')
- .stringProperty('walArchivePath')
+ .stringProperty('walArchivePath');
+
+ if (available2_7) {
+ storageBean.longProperty('maxWalArchiveSize')
+ .intProperty('walCompactionLevel');
+ }
+
+ storageBean.longProperty('walAutoArchiveAfterInactivity')
.intProperty('walSegments')
.intProperty('walSegmentSize')
.intProperty('walHistorySize');
- if (available('2.4.0'))
+ if (available2_4)
storageBean.intProperty('walBufferSize');
storageBean.longProperty('walFlushFrequency')
@@ -1548,12 +1577,11 @@
.intProperty('walThreadLocalBufferSize')
.intProperty('metricsSubIntervalCount')
.longProperty('metricsRateTimeInterval')
- .longProperty('walAutoArchiveAfterInactivity')
.boolProperty('metricsEnabled')
.boolProperty('alwaysWriteFullPages')
.boolProperty('writeThrottlingEnabled');
- if (available('2.4.0'))
+ if (available2_4)
storageBean.boolProperty('walCompactionEnabled');
const fileIOFactory = _.get(dataStorageCfg, 'fileIOFactory');
diff --git a/frontend/app/configuration/generator/generator/defaults/Cluster.service.js b/frontend/app/configuration/generator/generator/defaults/Cluster.service.js
index fac2cc5..e486ee6 100644
--- a/frontend/app/configuration/generator/generator/defaults/Cluster.service.js
+++ b/frontend/app/configuration/generator/generator/defaults/Cluster.service.js
@@ -37,6 +37,9 @@
ipFinderCleanFrequency: 60000,
forceServerMode: false,
clientReconnectDisabled: false,
+ reconnectDelay: 2000,
+ connectionRecoveryTimeout: 10000,
+ soLinger: 5,
Multicast: {
multicastGroup: '228.1.2.4',
multicastPort: 47400,
@@ -87,7 +90,6 @@
},
atomics: {
atomicSequenceReserveSize: 1000,
- backups: 0,
cacheMode: {
clsName: 'org.apache.ignite.cache.CacheMode',
value: 'PARTITIONED'
@@ -142,7 +144,11 @@
tcpNoDelay: true,
ackSendThreshold: 16,
unacknowledgedMessagesBufferSize: 0,
- socketWriteTimeout: 2000
+ socketWriteTimeout: 2000,
+ selectorSpins: 0,
+ connectionsPerNode: 1,
+ usePairedConnections: false,
+ filterReachableAddresses: false
},
networkTimeout: 5000,
networkSendRetryDelay: 1000,
@@ -369,7 +375,9 @@
lockWaitTime: 10000,
walThreadLocalBufferSize: 131072,
metricsSubIntervalCount: 5,
- metricsRateTimeInterval: 60000
+ metricsRateTimeInterval: 60000,
+ maxWalArchiveSize: 1073741824,
+ walCompactionLevel: 1
},
utilityCacheKeepAliveTime: 60000,
hadoopConfiguration: {
diff --git a/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java b/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java
index a163a39..a7fbc25 100644
--- a/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java
+++ b/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java
@@ -223,6 +223,7 @@
atomicCfgProps.add("atomicSequenceReserveSize");
atomicCfgProps.add("backups");
atomicCfgProps.add("affinity");
+ atomicCfgProps.add("groupName");
metadata.put(AtomicConfiguration.class, new MetadataInfo(atomicCfgProps, EMPTY_FIELDS, EMPTY_FIELDS));
@@ -346,17 +347,13 @@
commProps.add("directBuffer");
commProps.add("directSendBuffer");
commProps.add("tcpNoDelay");
+ commProps.add("selectorSpins");
+ commProps.add("connectionsPerNode");
+ commProps.add("usePairedConnections");
+ commProps.add("filterReachableAddresses");
+ commProps.add("soLinger");
- 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));
+ metadata.put(TcpCommunicationSpi.class, new MetadataInfo(commProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
Set<String> discoverySpiProps = new HashSet<>();
discoverySpiProps.add("ipFinder");
@@ -384,7 +381,13 @@
discoverySpiProps.add("authenticator");
discoverySpiProps.add("forceServerMode");
discoverySpiProps.add("clientReconnectDisabled");
- metadata.put(TcpDiscoverySpi.class, new MetadataInfo(discoverySpiProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS));
+ discoverySpiProps.add("connectionRecoveryTimeout");
+ discoverySpiProps.add("reconnectDelay");
+
+ Set<String> discoverySpiExclProps = new HashSet<>();
+ discoverySpiExclProps.addAll(SPI_EXCLUDED_FIELDS);
+ discoverySpiExclProps.add("nodeAttributes");
+ metadata.put(TcpDiscoverySpi.class, new MetadataInfo(discoverySpiProps, EMPTY_FIELDS, discoverySpiExclProps));
Set<String> connectorProps = new HashSet<>();
connectorProps.add("jettyPath");
@@ -441,7 +444,10 @@
dataStorageProps.add("metricsEnabled");
dataStorageProps.add("alwaysWriteFullPages");
dataStorageProps.add("writeThrottlingEnabled");
+ dataStorageProps.add("checkpointReadLockTimeout");
+ dataStorageProps.add("maxWalArchiveSize");
dataStorageProps.add("walCompactionEnabled");
+ dataStorageProps.add("walCompactionLevel");
metadata.put(DataStorageConfiguration.class, new MetadataInfo(dataStorageProps, EMPTY_FIELDS, EMPTY_FIELDS));
Set<String> dataRegionProps = new HashSet<>();