Skip to content

Commit

Permalink
IGNITE-6560 Minor changes of Data region configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsisko authored and akuznetsov-os committed Oct 24, 2017
1 parent 27cce61 commit eb81e6c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
private boolean loadPrevVal;

/** Name of {@link DataRegionConfiguration} for this cache */
private String memPlcName;
private String dataRegName;

/** Maximum inline size for sql indexes. */
private int sqlIdxMaxInlineSize;
Expand Down Expand Up @@ -219,7 +219,7 @@ public VisorCacheConfiguration(IgniteEx ignite, CacheConfiguration ccfg, IgniteU
evictFilter = compactClass(ccfg.getEvictionFilter());
lsnrConfigurations = compactIterable(ccfg.getCacheEntryListenerConfigurations());
loadPrevVal = ccfg.isLoadPreviousValue();
memPlcName = ccfg.getDataRegionName();
dataRegName = ccfg.getDataRegionName();
sqlIdxMaxInlineSize = ccfg.getSqlIndexMaxInlineSize();
nodeFilter = compactClass(ccfg.getNodeFilter());
qryDetailMetricsSz = ccfg.getQueryDetailMetricsSize();
Expand Down Expand Up @@ -462,8 +462,9 @@ public boolean isLoadPreviousValue() {
/**
* @return {@link DataRegionConfiguration} name.
*/
@Deprecated
public String getMemoryPolicyName() {
return memPlcName;
return dataRegName;
}

/**
Expand Down Expand Up @@ -551,7 +552,7 @@ public IgniteUuid getDynamicDeploymentId() {
U.writeString(out, evictFilter);
U.writeString(out, lsnrConfigurations);
out.writeBoolean(loadPrevVal);
U.writeString(out, memPlcName);
U.writeString(out, dataRegName);
out.writeInt(sqlIdxMaxInlineSize);
U.writeString(out, nodeFilter);
out.writeInt(qryDetailMetricsSz);
Expand Down Expand Up @@ -595,7 +596,7 @@ public IgniteUuid getDynamicDeploymentId() {
evictFilter = U.readString(in);
lsnrConfigurations = U.readString(in);
loadPrevVal = in.readBoolean();
memPlcName = U.readString(in);
dataRegName = U.readString(in);
sqlIdxMaxInlineSize = in.readInt();
nodeFilter = U.readString(in);
qryDetailMetricsSz = in.readInt();
Expand Down
1 change: 1 addition & 0 deletions modules/web-console/backend/app/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ module.exports.factory = function(passportMongo, settings, pluginMongo, mongoose
},
evictionFilter: String,
memoryPolicyName: String,
dataRegionName: String,
sqlIndexMaxInlineSize: Number,
topologyValidator: String
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1957,9 +1957,12 @@ export default class IgniteConfigurationGenerator {
// Generate cache memory group.
static cacheMemory(cache, available, ccfg = this.cacheConfigurationBean(cache)) {
// Since ignite 2.0
if (available('2.0.0'))
if (available(['2.0.0', '2.3.0']))
ccfg.stringProperty('memoryPolicyName');

if (available('2.3.0'))
ccfg.stringProperty('dataRegionName');

// Removed in ignite 2.0
if (available(['1.0.0', '2.0.0'])) {
ccfg.enumProperty('memoryMode');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const DFLT_CLUSTER = {
dataStorageConfiguration: {
systemCacheInitialSize: 41943040,
systemCacheMaxSize: 104857600,
pageSize: 2048,
pageSize: 4096,
storagePath: 'db',
dataRegionConfigurations: {
name: 'default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ include /app/helpers/jade/mixins
.panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
.col-sm-6
//- Since ignite 2.0
div(ng-if='$ctrl.available("2.0.0")')
.settings-row
.settings-row(ng-if='$ctrl.available("2.0.0")')
+checkbox('Onheap cache enabled', model + '.onheapCacheEnabled', '"OnheapCacheEnabled"', 'Checks if the on-heap cache is enabled for the off-heap based page memory')
.settings-row
+text('Memory policy name:', model + '.memoryPolicyName', '"MemoryPolicyName"', 'false', 'default',
'Name of memory policy configuration for this cache')

//- Since ignite 2.0 deprecated in ignite 2.3
.settings-row(ng-if='$ctrl.available(["2.0.0", "2.3.0"])')
+text('Memory policy name:', model + '.memoryPolicyName', '"MemoryPolicyName"', 'false', 'default',
'Name of memory policy configuration for this cache')

//- Since ignite 2.3
.settings-row(ng-if='$ctrl.available("2.3.0")')
+text('Data region name:', model + '.dataRegionName', '"DataRegionName"', 'false', 'default',
'Name of data region configuration for this cache')

//- Removed in ignite 2.0
div(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ include /app/helpers/jade/mixins
.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')
'true', '4096', '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')
Expand Down

0 comments on commit eb81e6c

Please sign in to comment.