ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-7461 UI tools: Actualized data storage configuration. (cherry picked from commit 577e632)
Date Thu, 18 Jan 2018 10:26:40 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.4 f3f9f2a24 -> 1daa7c41b


IGNITE-7461 UI tools: Actualized data storage configuration.
(cherry picked from commit 577e632)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1daa7c41
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1daa7c41
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1daa7c41

Branch: refs/heads/ignite-2.4
Commit: 1daa7c41bf1460a4d9a2b0c26a7a317f2fca3fb7
Parents: f3f9f2a
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Jan 18 17:14:53 2018 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Jan 18 17:26:31 2018 +0700

----------------------------------------------------------------------
 .../node/VisorDataStorageConfiguration.java     | 47 +++++++++++++++-----
 modules/web-console/backend/app/mongo.js        |  5 ++-
 .../generator/ConfigurationGenerator.js         | 14 ++++--
 .../configuration/clusters/data-storage.pug     |  9 ++--
 4 files changed, 54 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1daa7c41/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorDataStorageConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorDataStorageConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorDataStorageConfiguration.java
index 8470fe1..d0e0f91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorDataStorageConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorDataStorageConfiguration.java
@@ -66,9 +66,6 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
     private long lockWaitTime;
 
     /** */
-    private long checkpointPageBufSize;
-
-    /** */
     private int checkpointThreads;
 
     /** Checkpoint write order. */
@@ -125,6 +122,12 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
     /** If true, threads that generate dirty pages too fast during ongoing checkpoint will
be throttled. */
     private boolean writeThrottlingEnabled;
 
+    /** Size of WAL buffer. */
+    private int walBufSize;
+
+    /** If true, system filters and compresses WAL archive in background. */
+    private boolean walCompactionEnabled;
+
     /**
      * Default constructor.
      */
@@ -165,6 +168,7 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         metricsEnabled = cfg.isMetricsEnabled();
         walMode = cfg.getWalMode();
         walTlbSize = cfg.getWalThreadLocalBufferSize();
+        walBufSize = cfg.getWalBufferSize();
         walFlushFreq = cfg.getWalFlushFrequency();
         walFsyncDelay = cfg.getWalFsyncDelayNanos();
         walRecordIterBuffSize = cfg.getWalRecordIteratorBufferSize();
@@ -174,6 +178,7 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         metricsRateTimeInterval = cfg.getMetricsRateTimeInterval();
         walAutoArchiveAfterInactivity = cfg.getWalAutoArchiveAfterInactivity();
         writeThrottlingEnabled = cfg.isWriteThrottlingEnabled();
+        walCompactionEnabled = cfg.isWalCompactionEnabled();
     }
 
     /**
@@ -233,13 +238,6 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
     }
 
     /**
-     * @return Checkpointing page buffer size in bytes.
-     */
-    public long getCheckpointPageBufferSize() {
-        return checkpointPageBufSize;
-    }
-
-    /**
      * @return Number of checkpointing threads.
      */
     public int getCheckpointThreads() {
@@ -379,6 +377,24 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         return writeThrottlingEnabled;
     }
 
+    /**
+     * @return Size of WAL buffer.
+     */
+    public int getWalBufferSize() {
+        return walBufSize;
+    }
+
+    /**
+     * @return If true, system filters and compresses WAL archive in background
+     */
+    public boolean isWalCompactionEnabled() {
+        return walCompactionEnabled;
+    }
+
+    @Override public byte getProtocolVersion() {
+        return V2;
+    }
+
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         out.writeLong(sysRegionInitSize);
@@ -390,7 +406,7 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         U.writeString(out, storagePath);
         out.writeLong(checkpointFreq);
         out.writeLong(lockWaitTime);
-        out.writeLong(0);
+        out.writeLong(0);  // Write stub for removed checkpointPageBufSize.
         out.writeInt(checkpointThreads);
         U.writeEnum(out, checkpointWriteOrder);
         out.writeInt(walHistSize);
@@ -410,6 +426,8 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         out.writeLong(metricsRateTimeInterval);
         out.writeLong(walAutoArchiveAfterInactivity);
         out.writeBoolean(writeThrottlingEnabled);
+        out.writeInt(walBufSize);
+        out.writeBoolean(walCompactionEnabled);
     }
 
     /** {@inheritDoc} */
@@ -423,7 +441,7 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         storagePath = U.readString(in);
         checkpointFreq = in.readLong();
         lockWaitTime = in.readLong();
-        checkpointPageBufSize = in.readLong();
+        in.readLong(); // Read stub for removed checkpointPageBufSize.
         checkpointThreads = in.readInt();
         checkpointWriteOrder = CheckpointWriteOrder.fromOrdinal(in.readByte());
         walHistSize = in.readInt();
@@ -443,6 +461,11 @@ public class VisorDataStorageConfiguration extends VisorDataTransferObject
{
         metricsRateTimeInterval = in.readLong();
         walAutoArchiveAfterInactivity = in.readLong();
         writeThrottlingEnabled = in.readBoolean();
+
+        if (protoVer > V1) {
+            walBufSize = in.readInt();
+            walCompactionEnabled = in.readBoolean();
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1daa7c41/modules/web-console/backend/app/mongo.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/mongo.js b/modules/web-console/backend/app/mongo.js
index 0ea4b88..189f45b 100644
--- a/modules/web-console/backend/app/mongo.js
+++ b/modules/web-console/backend/app/mongo.js
@@ -1010,7 +1010,6 @@ const defineSchema = (mongoose) => {
             metricsEnabled: Boolean,
             alwaysWriteFullPages: Boolean,
             checkpointFrequency: Number,
-            checkpointPageBufferSize: Number,
             checkpointThreads: Number,
             checkpointWriteOrder: {type: String, enum: ['RANDOM', 'SEQUENTIAL']},
             walPath: String,
@@ -1023,12 +1022,14 @@ const defineSchema = (mongoose) => {
             walFsyncDelayNanos: Number,
             walRecordIteratorBufferSize: Number,
             lockWaitTime: Number,
+            walBufferSize: Number,
             walThreadLocalBufferSize: Number,
             metricsSubIntervalCount: Number,
             metricsRateTimeInterval: Number,
             fileIOFactory: {type: String, enum: ['RANDOM', 'ASYNC']},
             walAutoArchiveAfterInactivity: Number,
-            writeThrottlingEnabled: Boolean
+            writeThrottlingEnabled: Boolean,
+            walCompactionEnabled: Boolean
         },
         memoryConfiguration: {
             systemCacheInitialSize: Number,

http://git-wip-us.apache.org/repos/asf/ignite/blob/1daa7c41/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index cf14293..9269fc9 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -1427,15 +1427,18 @@ export default class IgniteConfigurationGenerator {
 
         storageBean.stringProperty('storagePath')
             .intProperty('checkpointFrequency')
-            .longProperty('checkpointPageBufferSize')
             .intProperty('checkpointThreads')
             .enumProperty('walMode')
             .stringProperty('walPath')
             .stringProperty('walArchivePath')
             .intProperty('walSegments')
             .intProperty('walSegmentSize')
-            .intProperty('walHistorySize')
-            .longProperty('walFlushFrequency')
+            .intProperty('walHistorySize');
+
+        if (available('2.4.0'))
+            storageBean.intProperty('walBufferSize');
+
+        storageBean.longProperty('walFlushFrequency')
             .longProperty('walFsyncDelayNanos')
             .intProperty('walRecordIteratorBufferSize')
             .longProperty('lockWaitTime')
@@ -1447,6 +1450,9 @@ export default class IgniteConfigurationGenerator {
             .boolProperty('alwaysWriteFullPages')
             .boolProperty('writeThrottlingEnabled');
 
+        if (available('2.4.0'))
+            storageBean.boolProperty('walCompactionEnabled');
+
         const fileIOFactory = _.get(dataStorageCfg, 'fileIOFactory');
 
         let factoryBean;
@@ -1932,7 +1938,7 @@ export default class IgniteConfigurationGenerator {
             propName = (near ? 'nearEviction' : 'eviction') + 'Policy';
         }
 
-        const bean = new Bean(beanProps.cls, 'evictionPlc', beanProps.src, dflt);
+        const bean = new Bean(beanProps.cls, propName, beanProps.src, dflt);
 
         bean.intProperty('batchSize')
             .intProperty('maxMemorySize')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1daa7c41/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
index 82c6dbe..5112591 100644
--- 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
@@ -175,9 +175,6 @@ include /app/helpers/jade/mixins
                     +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',
@@ -215,6 +212,9 @@ include /app/helpers/jade/mixins
                     +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(ng-show='$ctrl.available("2.4.0")')
+                    +number('WAL buffer size:', `${model}.walBufferSize`, '"DataStorageWalBufferSize"',
'true', 'WAL segment size / 4', '1',
+                    'Size of WAL buffer')
                 .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')
@@ -257,5 +257,8 @@ include /app/helpers/jade/mixins
                 .settings-row
                     +checkbox('Write throttling enabled', `${model}.writeThrottlingEnabled`,
'"DataStorageWriteThrottlingEnabled"',
                     'Throttle threads that generate dirty pages too fast during ongoing checkpoint')
+                .settings-row(ng-show='$ctrl.available("2.4.0")')
+                    +checkbox('Enable WAL compaction', `${model}.walCompactionEnabled`, '"DataStorageWalCompactionEnabled"',
+                    'If true, system filters and compresses WAL archive in background')
             .col-sm-6
                 +preview-xml-java(model, 'clusterDataStorageConfiguration')


Mime
View raw message