You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/10/24 08:47:21 UTC
[14/50] [abbrv] ignite git commit: IGNITE-6030 Allow enabling
persistence per data region
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/app/modules/states/configuration/clusters/data-storage.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/data-storage.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/data-storage.pug
new file mode 100644
index 0000000..9c2dca1
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/data-storage.pug
@@ -0,0 +1,255 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+include /app/helpers/jade/mixins
+
+-var form = 'dataStorageConfiguration'
+-var model = 'backupItem.dataStorageConfiguration'
+-var dfltRegionModel = model + '.defaultDataRegionConfiguration'
+-var dataRegionConfigurations = model + '.dataRegionConfigurations'
+
+.panel.panel-default(ng-show='$ctrl.available("2.3.0")' ng-form=form novalidate)
+ .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+ ignite-form-panel-chevron
+ label Data storage configuration
+ ignite-form-field-tooltip.tipLabel
+ | Page memory is a manageable off-heap based memory architecture that is split into pages of fixed size#[br]
+ | #[a(href="https://apacheignite.readme.io/docs/distributed-persistent-store" target="_blank") More info]
+ ignite-form-revert
+ .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .panel-body(ng-if=`$ctrl.available("2.3.0") && ui.isPanelLoaded('${form}')`)
+ .col-sm-6
+ .settings-row
+ +number-min-max('Page size:', model + '.pageSize', '"DataStorageConfigurationPageSize"',
+ 'true', '2048', '1024', '16384', 'Every memory region is split on pages of fixed size')
+ .settings-row
+ +number('Concurrency level:', model + '.concurrencyLevel', '"DataStorageConfigurationConcurrencyLevel"',
+ 'true', 'availableProcessors', '2', 'The number of concurrent segments in Ignite internal page mapping tables')
+ .settings-row
+ +ignite-form-group
+ ignite-form-field-label
+ | System region
+ ignite-form-group-tooltip
+ | System region properties
+ .group-content
+ .details-row
+ +number('Initial size:', model + '.systemRegionInitialSize', '"DataStorageSystemRegionInitialSize"',
+ 'true', '41943040', '10485760', 'Initial size of a data region reserved for system cache')
+ .details-row
+ +number('Maximum size:', model + '.systemRegionMaxSize', '"DataStorageSystemRegionMaxSize"',
+ 'true', '104857600', '10485760', 'Maximum data region size reserved for system cache')
+ .settings-row
+ +ignite-form-group
+ ignite-form-field-label
+ | Data regions
+ ignite-form-group-tooltip
+ | Data region configurations
+ .group-content
+ .details-row
+ +ignite-form-group
+ ignite-form-field-label
+ | Default data region
+ ignite-form-group-tooltip
+ | Default data region properties
+ .group-content
+ .details-row
+ +text('Name:', dfltRegionModel + '.name', '"DfltRegionName" + $index', 'false', 'default', 'Default data region name')
+ .details-row
+ +number('Initial size:', dfltRegionModel + '.initialSize', '"DfltRegionInitialSize" + $index',
+ 'true', '268435456', '10485760', 'Default data region initial size')
+ .details-row
+ +number('Maximum size:', dfltRegionModel + '.maxSize', '"DfltRegionMaxSize" + $index',
+ 'true', '0.2 * totalMemoryAvailable', '10485760', 'Default data region maximum size')
+ .details-row
+ +text('Swap file path:', dfltRegionModel + '.swapPath', '"DfltRegionSwapFilePath" + $index', 'false',
+ 'Input swap file path', 'An optional path to a memory mapped file for default data region')
+ .details-row
+ +dropdown('Eviction mode:', dfltRegionModel + '.pageEvictionMode', '"DfltRegionPageEvictionMode"', 'true', 'DISABLED',
+ '[\
+ {value: "DISABLED", label: "DISABLED"},\
+ {value: "RANDOM_LRU", label: "RANDOM_LRU"},\
+ {value: "RANDOM_2_LRU", label: "RANDOM_2_LRU"}\
+ ]',
+ 'An algorithm for memory pages eviction\
+ <ul>\
+ <li>DISABLED - Eviction is disabled</li>\
+ <li>RANDOM_LRU - Once a memory region defined by a memory policy is configured, an off - heap array is allocated to track last usage timestamp for every individual data page</li>\
+ <li>RANDOM_2_LRU - Differs from Random - LRU only in a way that two latest access timestamps are stored for every data page</li>\
+ </ul>')
+ .details-row
+ +number-min-max-step('Eviction threshold:', dfltRegionModel + '.evictionThreshold', '"DfltRegionEvictionThreshold" + $index',
+ 'true', '0.9', '0.5', '0.999', '0.05', 'A threshold for memory pages eviction initiation')
+ .details-row
+ +number('Empty pages pool size:', dfltRegionModel + '.emptyPagesPoolSize', '"DfltRegionEmptyPagesPoolSize" + $index',
+ 'true', '100', '11', 'The minimal number of empty pages to be present in reuse lists for default data region')
+ .details-row
+ +number('Metrics sub interval count:', dfltRegionModel + '.metricsSubIntervalCount', '"DfltRegionSubIntervals" + $index',
+ 'true', '5', '1', 'A number of sub-intervals the whole rate time interval will be split into to calculate allocation and eviction rates')
+ .details-row
+ +number('Metrics rate time interval:', dfltRegionModel + '.metricsRateTimeInterval', '"DfltRegionRateTimeInterval" + $index',
+ 'true', '60000', '1000', 'Time interval for allocation rate and eviction rate monitoring purposes')
+ .details-row
+ +checkbox('Metrics enabled', dfltRegionModel + '.metricsEnabled', '"DfltRegionMetricsEnabled" + $index',
+ 'Whether memory metrics are enabled by default on node startup')
+ .details-row
+ +checkbox('Persistence enabled', dfltRegionModel + '.persistenceEnabled', '"DfltRegionPersistenceEnabled" + $index',
+ 'Enable Ignite Native Persistence')
+ .details-row(ng-init='dataRegionTbl={type: "dataRegions", model: "dataRegionConfigurations", focusId: "name", ui: "data-region-table"}')
+ +ignite-form-group()
+ ignite-form-field-label
+ | Configured data regions
+ ignite-form-group-tooltip
+ | List of configured data regions
+ ignite-form-group-add(ng-click='tableNewItem(dataRegionTbl)')
+ | Add data region configuration
+ .group-content-empty(ng-if=`!(${dataRegionConfigurations} && ${dataRegionConfigurations}.length > 0)`)
+ | Not defined
+ .group-content(ng-show=`${dataRegionConfigurations} && ${dataRegionConfigurations}.length > 0` ng-repeat=`model in ${dataRegionConfigurations} track by $index`)
+ hr(ng-if='$index != 0')
+ .settings-row
+ +text-enabled-autofocus('Name:', 'model.name', '"DataRegionName" + $index', 'true', 'false', 'default', 'Data region name')
+ +table-remove-button(dataRegionConfigurations, 'Remove memory configuration')
+ .settings-row
+ +number('Initial size:', 'model.initialSize', '"DataRegionInitialSize" + $index',
+ 'true', '268435456', '10485760', 'Initial memory region size defined by this data region')
+ .settings-row
+ +number('Maximum size:', 'model.maxSize', '"DataRegionMaxSize" + $index',
+ 'true', '0.2 * totalMemoryAvailable', '10485760', 'Maximum memory region size defined by this data region')
+ .settings-row
+ +text('Swap file path:', 'model.swapPath', '"DataRegionSwapPath" + $index', 'false',
+ 'Input swap file path', 'An optional path to a memory mapped file for this data region')
+ .settings-row
+ +dropdown('Eviction mode:', 'model.pageEvictionMode', '"DataRegionPageEvictionMode"', 'true', 'DISABLED',
+ '[\
+ {value: "DISABLED", label: "DISABLED"},\
+ {value: "RANDOM_LRU", label: "RANDOM_LRU"},\
+ {value: "RANDOM_2_LRU", label: "RANDOM_2_LRU"}\
+ ]',
+ 'An algorithm for memory pages eviction\
+ <ul>\
+ <li>DISABLED - Eviction is disabled</li>\
+ <li>RANDOM_LRU - Once a memory region defined by a memory policy is configured, an off - heap array is allocated to track last usage timestamp for every individual data page</li>\
+ <li>RANDOM_2_LRU - Differs from Random - LRU only in a way that two latest access timestamps are stored for every data page</li>\
+ </ul>')
+ .settings-row
+ +number-min-max-step('Eviction threshold:', 'model.evictionThreshold', '"DataRegionEvictionThreshold" + $index',
+ 'true', '0.9', '0.5', '0.999', '0.05', 'A threshold for memory pages eviction initiation')
+ .settings-row
+ +number('Empty pages pool size:', 'model.emptyPagesPoolSize', '"DataRegionEmptyPagesPoolSize" + $index',
+ 'true', '100', '11', 'The minimal number of empty pages to be present in reuse lists for this data region')
+ .settings-row
+ +number('Metrics sub interval count:', 'model.metricsSubIntervalCount', '"DataRegionSubIntervals" + $index',
+ 'true', '5', '1', 'A number of sub-intervals the whole rate time interval will be split into to calculate allocation and eviction rates')
+ .settings-row
+ +number('Metrics rate time interval:', 'model.metricsRateTimeInterval', '"DataRegionRateTimeInterval" + $index',
+ 'true', '60000', '1000', 'Time interval for allocation rate and eviction rate monitoring purposes')
+ .settings-row
+ +checkbox('Metrics enabled', 'model.metricsEnabled', '"DataRegionMetricsEnabled" + $index',
+ 'Whether memory metrics are enabled by default on node startup')
+ .settings-row
+ +checkbox('Persistence enabled', 'model.persistenceEnabled', '"DataRegionPersistenceEnabled" + $index',
+ 'Enable Ignite Native Persistence')
+ .settings-row
+ +text-enabled('Storage path:', `${model}.storagePath`, '"DataStoragePath"', 'true', 'false', 'db',
+ 'Directory where index and partition files are stored')
+ .settings-row
+ +number('Checkpoint frequency:', `${model}.checkpointFrequency`, '"DataStorageCheckpointFrequency"', 'true', '180000', '1',
+ 'Frequency which is a minimal interval when the dirty pages will be written to the Persistent Store')
+ .settings-row
+ +number('Checkpoint page buffer size:', `${model}.checkpointPageBufferSize`, '"DataStorageCheckpointPageBufferSize"', 'true', '268435456', '0',
+ 'Amount of memory allocated for a checkpointing temporary buffer')
+ .settings-row
+ +number('Checkpoint threads:', `${model}.checkpointThreads`, '"DataStorageCheckpointThreads"', 'true', '4', '1', 'A number of threads to use for the checkpoint purposes')
+ .settings-row
+ +dropdown('Checkpoint write order:', `${model}.checkpointWriteOrder`, '"DataStorageCheckpointWriteOrder"', 'true', 'SEQUENTIAL',
+ '[\
+ {value: "RANDOM", label: "RANDOM"},\
+ {value: "SEQUENTIAL", label: "SEQUENTIAL"}\
+ ]',
+ 'Order of writing pages to disk storage during checkpoint.\
+ <ul>\
+ <li>RANDOM - Pages are written in order provided by checkpoint pages collection iterator</li>\
+ <li>SEQUENTIAL - All checkpoint pages are collected into single list and sorted by page index</li>\
+ </ul>')
+ .settings-row
+ +dropdown('WAL mode:', `${model}.walMode`, '"DataStorageWalMode"', 'true', 'DEFAULT',
+ '[\
+ {value: "DEFAULT", label: "DEFAULT"},\
+ {value: "LOG_ONLY", label: "LOG_ONLY"},\
+ {value: "BACKGROUND", label: "BACKGROUND"},\
+ {value: "NONE", label: "NONE"}\
+ ]',
+ '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>')
+ .settings-row
+ +text-enabled('WAL path:', `${model}.walPath`, '"DataStorageWalPath"', 'true', 'false', 'db/wal', 'A path to the directory where WAL is stored')
+ .settings-row
+ +text-enabled('WAL archive path:', `${model}.walArchivePath`, '"DataStorageWalArchivePath"', 'true', 'false', 'db/wal/archive', 'A path to the WAL archive directory')
+ .settings-row
+ +number('WAL segments:', `${model}.walSegments`, '"DataStorageWalSegments"', 'true', '10', '1', 'A number of WAL segments to work with')
+ .settings-row
+ +number('WAL segment size:', `${model}.walSegmentSize`, '"DataStorageWalSegmentSize"', 'true', '67108864', '0', 'Size of a WAL segment')
+ .settings-row
+ +number('WAL history size:', `${model}.walHistorySize`, '"DataStorageWalHistorySize"', 'true', '20', '1', 'A total number of checkpoints to keep in the WAL history')
+ .settings-row
+ +number('WAL flush frequency:', `${model}.walFlushFrequency`, '"DataStorageWalFlushFrequency"', 'true', '2000', '1',
+ 'How often will be fsync, in milliseconds. In background mode, exist thread which do fsync by timeout')
+ .settings-row
+ +number('WAL fsync delay:', `${model}.walFsyncDelayNanos`, '"DataStorageWalFsyncDelay"', 'true', '1000', '1', 'WAL fsync delay, in nanoseconds')
+ .settings-row
+ +number('WAL record iterator buffer size:', `${model}.walRecordIteratorBufferSize`, '"DataStorageWalRecordIteratorBufferSize"', 'true', '67108864', '1',
+ 'How many bytes iterator read from disk(for one reading), during go ahead WAL')
+ .settings-row
+ +number('Lock wait time:', `${model}.lockWaitTime`, '"DataStorageLockWaitTime"', 'true', '10000', '1',
+ 'Time out in milliseconds, while wait and try get file lock for start persist manager')
+ .settings-row
+ +number('WAL thread local buffer size:', `${model}.walThreadLocalBufferSize`, '"DataStorageWalThreadLocalBufferSize"', 'true', '131072', '1',
+ 'Define size thread local buffer. Each thread which write to WAL have thread local buffer for serialize recode before write in WAL')
+ .settings-row
+ +number('Metrics sub interval count:', `${model}.metricsSubIntervalCount`, '"DataStorageMetricsSubIntervalCount"', 'true', '5', '1',
+ 'Number of sub - intervals the whole rate time interval will be split into to calculate rate - based metrics')
+ .settings-row
+ +number('Metrics rate time interval:', `${model}.metricsRateTimeInterval`, '"DataStorageMetricsRateTimeInterval"', 'true', '60000', '1000',
+ 'The length of the time interval for rate - based metrics. This interval defines a window over which hits will be tracked')
+ .settings-row
+ +dropdown('File IO factory:', `${model}.fileIOFactory`, '"DataStorageFileIOFactory"', 'true', 'Default',
+ '[\
+ {value: "RANDOM", label: "RANDOM"},\
+ {value: "ASYNC", label: "ASYNC"},\
+ {value: null, label: "Default"},\
+ ]',
+ 'Order of writing pages to disk storage during checkpoint.\
+ <ul>\
+ <li>RANDOM - Pages are written in order provided by checkpoint pages collection iterator</li>\
+ <li>SEQUENTIAL - All checkpoint pages are collected into single list and sorted by page index</li>\
+ </ul>')
+ .settings-row
+ +number('WAL auto archive after inactivity:', `${model}.walAutoArchiveAfterInactivity`, '"DataStorageWalAutoArchiveAfterInactivity"', 'true', '-1', '-1',
+ 'Time in millis to run auto archiving segment after last record logging')
+ .settings-row
+ +checkbox-enabled('Metrics enabled', `${model}.metricsEnabled`, '"DataStorageMetricsEnabled"', 'true', 'Flag indicating whether persistence metrics collection is enabled')
+ .settings-row
+ +checkbox-enabled('Always write full pages', `${model}.alwaysWriteFullPages`, '"DataStorageAlwaysWriteFullPages"', 'true', 'Flag indicating whether always write full pages')
+ .settings-row
+ +checkbox('Write throttling enabled', `${model}.writeThrottlingEnabled`, '"DataStorageWriteThrottlingEnabled"',
+ 'Throttle threads that generate dirty pages too fast during ongoing checkpoint')
+ .col-sm-6
+ +preview-xml-java(model, 'clusterDataStorageConfiguration')
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
index e22afe2..705ba91 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
@@ -20,7 +20,7 @@ include /app/helpers/jade/mixins
-var model = 'backupItem.memoryConfiguration'
-var memoryPolicies = model + '.memoryPolicies'
-.panel.panel-default(ng-show='$ctrl.available("2.0.0")' ng-form=form novalidate)
+.panel.panel-default(ng-show='$ctrl.available(["2.0.0", "2.3.0"])' ng-form=form novalidate)
.panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
label Memory configuration
@@ -29,7 +29,7 @@ include /app/helpers/jade/mixins
| #[a(href="https://apacheignite.readme.io/docs/durable-memory" target="_blank") More info]
ignite-form-revert
.panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`$ctrl.available("2.0.0") && ui.isPanelLoaded('${form}')`)
+ .panel-body(ng-if=`$ctrl.available(["2.0.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`)
.col-sm-6
.settings-row
+number-min-max('Page size:', model + '.pageSize', '"MemoryConfigurationPageSize"',
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
index 50a569b..fcc170e 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
@@ -20,7 +20,7 @@ include /app/helpers/jade/mixins
-var model = 'backupItem.persistenceStoreConfiguration'
-var enabled = model + '.enabled'
-.panel.panel-default(ng-show='$ctrl.available("2.1.0")' ng-form=form novalidate)
+.panel.panel-default(ng-show='$ctrl.available(["2.1.0", "2.3.0"])' ng-form=form novalidate)
.panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
label Persistence store
@@ -29,7 +29,7 @@ include /app/helpers/jade/mixins
//- TODO IGNITE-5415 Add link to documentation.
ignite-form-revert
.panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`$ctrl.available("2.1.0") && ui.isPanelLoaded('${form}')`)
+ .panel-body(ng-if=`$ctrl.available(["2.1.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`)
.col-sm-6
.settings-row
+checkbox('Enabled', enabled, '"PersistenceEnabled"', 'Flag indicating whether to configure persistent configuration')
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/app/services/Clusters.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Clusters.js b/modules/web-console/frontend/app/services/Clusters.js
index 4e38a58..dd2f598 100644
--- a/modules/web-console/frontend/app/services/Clusters.js
+++ b/modules/web-console/frontend/app/services/Clusters.js
@@ -60,6 +60,12 @@ export default class Clusters {
},
swapSpaceSpi: {},
transactionConfiguration: {},
+ dataStorageConfiguration: {
+ defaultDataRegionConfiguration: {
+ name: 'default'
+ },
+ dataRegionConfigurations: []
+ },
memoryConfiguration: {
memoryPolicies: [{
name: 'default',
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/app/services/Version.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Version.service.js b/modules/web-console/frontend/app/services/Version.service.js
index beb27fa..8b67eb7 100644
--- a/modules/web-console/frontend/app/services/Version.service.js
+++ b/modules/web-console/frontend/app/services/Version.service.js
@@ -77,7 +77,11 @@ export default class IgniteVersion {
this.supportedVersions = [
{
- label: 'Ignite 2.x',
+ label: 'Ignite 2.3',
+ ignite: '2.3.0'
+ },
+ {
+ label: 'Ignite 2.1',
ignite: '2.2.0'
},
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/controllers/clusters-controller.js b/modules/web-console/frontend/controllers/clusters-controller.js
index 8340b4d..2485fa6 100644
--- a/modules/web-console/frontend/controllers/clusters-controller.js
+++ b/modules/web-console/frontend/controllers/clusters-controller.js
@@ -176,6 +176,8 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
}
else if (field.type === 'memoryPolicies')
$scope.backupItem.memoryConfiguration.memoryPolicies.push({});
+ else if (field.type === 'dataRegions')
+ $scope.backupItem.dataStorageConfiguration.dataRegionConfigurations.push({});
else if (field.type === 'serviceConfigurations')
$scope.backupItem.serviceConfigurations.push({});
else if (field.type === 'executorConfigurations')
@@ -329,6 +331,9 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
if (!cluster.memoryConfiguration)
cluster.memoryConfiguration = { memoryPolicies: [] };
+ if (!cluster.dataStorageConfiguration)
+ cluster.dataStorageConfiguration = { dataRegionConfigurations: [] };
+
if (!cluster.hadoopConfiguration)
cluster.hadoopConfiguration = { nativeLibraryNames: [] };
@@ -712,6 +717,53 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
}));
}
+ function checkDataStorageConfiguration(item) {
+ const dataStorage = item.dataStorageConfiguration;
+
+ if ((dataStorage.systemRegionMaxSize || 104857600) < (dataStorage.systemRegionInitialSize || 41943040))
+ return ErrorPopover.show('DataStorageSystemRegionMaxSize', 'System data region maximum size should be greater than initial size', $scope.ui, 'dataStorageConfiguration');
+
+ const pageSize = dataStorage.pageSize;
+
+ if (pageSize > 0 && (pageSize & (pageSize - 1) !== 0)) {
+ ErrorPopover.show('DataStorageConfigurationPageSize', 'Page size must be power of 2', $scope.ui, 'dataStorageConfiguration');
+
+ return false;
+ }
+
+ return _.isNil(_.find(dataStorage.dataRegionConfigurations, (curPlc, curIx) => {
+ if (curPlc.name === 'sysMemPlc') {
+ ErrorPopover.show('DfltRegionPolicyName' + curIx, '"sysMemPlc" policy name is reserved for internal use', $scope.ui, 'dataStorageConfiguration');
+
+ return true;
+ }
+
+ if (_.find(dataStorage.dataRegionConfigurations, (plc, ix) => curIx > ix && (curPlc.name || 'default') === (plc.name || 'default'))) {
+ ErrorPopover.show('DfltRegionPolicyName' + curIx, 'Data region with that name is already configured', $scope.ui, 'dataStorageConfiguration');
+
+ return true;
+ }
+
+ if (curPlc.maxSize && curPlc.maxSize < (curPlc.initialSize || 268435456)) {
+ ErrorPopover.show('DfltRegionPolicyMaxSize' + curIx, 'Maximum size should be greater than initial size', $scope.ui, 'dataStorageConfiguration');
+
+ return true;
+ }
+
+ if (curPlc.maxSize) {
+ const maxPoolSize = Math.floor(curPlc.maxSize / (dataStorage.pageSize || 2048) / 10);
+
+ if (maxPoolSize < (curPlc.emptyPagesPoolSize || 100)) {
+ ErrorPopover.show('DfltRegionPolicyEmptyPagesPoolSize' + curIx, 'Evicted pages pool size should be lesser than ' + maxPoolSize, $scope.ui, 'dataStorageConfiguration');
+
+ return true;
+ }
+ }
+
+ return false;
+ }));
+ }
+
function checkODBC(item) {
if (_.get(item, 'odbc.odbcEnabled') && _.get(item, 'marshaller.kind'))
return ErrorPopover.show('odbcEnabledInput', 'ODBC can only be used with BinaryMarshaller', $scope.ui, 'odbcConfiguration');
@@ -786,7 +838,7 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
}
// Check cluster logical consistency.
- function validate(item) {
+ this.validate = (item) => {
ErrorPopover.hide();
if (LegacyUtils.isEmptyString(item.name))
@@ -813,13 +865,16 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
if (!checkCommunicationConfiguration(item))
return false;
+ if (!this.available('2.3.0') && !checkDataStorageConfiguration(item))
+ return false;
+
if (!checkDiscoveryConfiguration(item))
return false;
if (!checkLoadBalancingConfiguration(item))
return false;
- if (!checkMemoryConfiguration(item))
+ if (this.available(['2.0.0', '2.3.0']) && !checkMemoryConfiguration(item))
return false;
if (!checkODBC(item))
@@ -838,7 +893,7 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
return false;
return true;
- }
+ };
// Save cluster in database.
function save(item) {
@@ -882,7 +937,7 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
}
// Save cluster.
- $scope.saveItem = function() {
+ $scope.saveItem = () => {
const item = $scope.backupItem;
const swapConfigured = item.swapSpaceSpi && item.swapSpaceSpi.kind;
@@ -890,7 +945,7 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
if (!swapConfigured && _.find(clusterCaches(item), (cache) => cache.swapEnabled))
_.merge(item, {swapSpaceSpi: {kind: 'FileSwapSpaceSpi'}});
- if (validate(item))
+ if (this.validate(item))
save(item);
};
@@ -899,8 +954,8 @@ export default ['$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLe
}
// Clone cluster with new name.
- $scope.cloneItem = function() {
- if (validate($scope.backupItem)) {
+ $scope.cloneItem = () => {
+ if (this.validate($scope.backupItem)) {
Input.clone($scope.backupItem.name, _clusterNames()).then((newName) => {
const item = angular.copy($scope.backupItem);
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/web-console/frontend/views/configuration/clusters.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/clusters.tpl.pug b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
index f0d88b7..26a1da1 100644
--- a/modules/web-console/frontend/views/configuration/clusters.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
@@ -49,6 +49,10 @@ include /app/helpers/jade/mixins
include /app/modules/states/configuration/clusters/communication
include /app/modules/states/configuration/clusters/connector
include /app/modules/states/configuration/clusters/deployment
+
+ //- Since ignite 2.3
+ include /app/modules/states/configuration/clusters/data-storage
+
include /app/modules/states/configuration/clusters/discovery
include /app/modules/states/configuration/clusters/events
include /app/modules/states/configuration/clusters/failover
@@ -58,7 +62,7 @@ include /app/helpers/jade/mixins
include /app/modules/states/configuration/clusters/logger
include /app/modules/states/configuration/clusters/marshaller
- //- Since ignite 2.0
+ //- Since ignite 2.0, deprecated in ignite 2.3
include /app/modules/states/configuration/clusters/memory
include /app/modules/states/configuration/clusters/misc
@@ -67,7 +71,7 @@ include /app/helpers/jade/mixins
//- Deprecated in ignite 2.1
include /app/modules/states/configuration/clusters/odbc
- //- Since ignite 2.1
+ //- Since ignite 2.1, deprecated in ignite 2.3
include /app/modules/states/configuration/clusters/persistence
include /app/modules/states/configuration/clusters/sql-connector
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index 594fa1f..ba96b6c 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -20,8 +20,8 @@ package org.apache.ignite.yardstick;
import com.beust.jcommander.Parameter;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.transactions.TransactionConcurrency;
@@ -206,7 +206,7 @@ public class IgniteBenchmarkArguments {
/** */
@Parameter(names = {"-ps", "--pageSize"}, description = "Page size")
- private int pageSize = MemoryConfiguration.DFLT_PAGE_SIZE;
+ private int pageSize = DataStorageConfiguration.DFLT_PAGE_SIZE;
/** */
@Parameter(names = {"-sl", "--stringLength"}, description = "Test string length")
@@ -253,7 +253,7 @@ public class IgniteBenchmarkArguments {
private int streamerBufSize = IgniteDataStreamer.DFLT_PER_NODE_BUFFER_SIZE;
/**
- * @return {@code True} if need set {@link PersistentStoreConfiguration}.
+ * @return {@code True} if need set {@link DataStorageConfiguration}.
*/
public boolean persistentStoreEnabled() {
return persistentStoreEnabled;
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec41370c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index 35fa949..9770fa3 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -28,10 +28,9 @@ import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.ConnectorConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -156,24 +155,24 @@ public class IgniteNode implements BenchmarkServer {
c.setCommunicationSpi(commSpi);
- if (args.getPageSize() != MemoryConfiguration.DFLT_PAGE_SIZE) {
- MemoryConfiguration memCfg = c.getMemoryConfiguration();
+ if (args.getPageSize() != DataStorageConfiguration.DFLT_PAGE_SIZE) {
+ DataStorageConfiguration memCfg = c.getDataStorageConfiguration();
if (memCfg == null) {
- memCfg = new MemoryConfiguration();
+ memCfg = new DataStorageConfiguration();
- c.setMemoryConfiguration(memCfg);
+ c.setDataStorageConfiguration(memCfg);
}
memCfg.setPageSize(args.getPageSize());
}
if (args.persistentStoreEnabled()) {
- PersistentStoreConfiguration pcCfg = new PersistentStoreConfiguration();
+ DataStorageConfiguration pcCfg = new DataStorageConfiguration();
c.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false));
- c.setPersistentStoreConfiguration(pcCfg);
+ c.setDataStorageConfiguration(pcCfg);
}
ignite = IgniteSpring.start(c, appCtx);