ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/16] ignite git commit: IGNITE-7224 Web console: Removed deprecated fields from configuration.
Date Fri, 12 Jan 2018 07:54:19 GMT
IGNITE-7224 Web console: Removed deprecated fields from configuration.


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

Branch: refs/heads/ignite-zk-join
Commit: 6f39d4ae3dec77c3bf4823b9a4c7510bd7d47808
Parents: d8ce43a
Author: Vasiliy Sisko <vsisko@gridgain.com>
Authored: Fri Jan 12 10:30:40 2018 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Jan 12 10:30:40 2018 +0700

----------------------------------------------------------------------
 .../generator/ConfigurationGenerator.js         | 39 +++++++-----
 .../configuration/clusters/marshaller.pug       | 67 ++++++++++----------
 .../states/configuration/clusters/misc.pug      |  2 +-
 3 files changed, 57 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39d4ae/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 39538c2..cf14293 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -1479,7 +1479,8 @@ export default class IgniteConfigurationGenerator {
                 .boolProperty('cacheSanityCheckEnabled');
         }
 
-        cfg.boolProperty('lateAffinityAssignment');
+        if (available(['1.0.0', '2.1.0']))
+            cfg.boolProperty('lateAffinityAssignment');
 
         return cfg;
     }
@@ -1509,30 +1510,34 @@ export default class IgniteConfigurationGenerator {
 
     // Generate marshaller group.
     static clusterMarshaller(cluster, available, cfg = this.igniteConfigurationBean(cluster))
{
-        const kind = _.get(cluster.marshaller, 'kind');
-        const settings = _.get(cluster.marshaller, kind);
+        if (available(['1.0.0', '2.1.0'])) {
+            const kind = _.get(cluster.marshaller, 'kind');
+            const settings = _.get(cluster.marshaller, kind);
 
-        let bean;
+            let bean;
 
-        switch (kind) {
-            case 'OptimizedMarshaller':
-                bean = new Bean('org.apache.ignite.marshaller.optimized.OptimizedMarshaller',
'marshaller', settings)
-                    .intProperty('poolSize')
-                    .intProperty('requireSerializable');
+            switch (kind) {
+                case 'OptimizedMarshaller':
+                    if (available(['1.0.0', '2.0.0'])) {
+                        bean = new Bean('org.apache.ignite.marshaller.optimized.OptimizedMarshaller',
'marshaller', settings)
+                            .intProperty('poolSize')
+                            .intProperty('requireSerializable');
+                    }
 
-                break;
+                    break;
 
-            case 'JdkMarshaller':
-                bean = new Bean('org.apache.ignite.marshaller.jdk.JdkMarshaller', 'marshaller',
settings);
+                case 'JdkMarshaller':
+                    bean = new Bean('org.apache.ignite.marshaller.jdk.JdkMarshaller', 'marshaller',
settings);
 
-                break;
+                    break;
 
-            default:
+                default:
                 // No-op.
-        }
+            }
 
-        if (bean)
-            cfg.beanProperty('marshaller', bean);
+            if (bean)
+                cfg.beanProperty('marshaller', bean);
+        }
 
         cfg.intProperty('marshalLocalJobs');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39d4ae/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
index 6126a9e..0a7d4b2 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
@@ -34,39 +34,40 @@ include /app/helpers/jade/mixins
     .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
         .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
             .col-sm-6
-                .settings-row
-                    div(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
-                        +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true',
'Default', 'marshallerVariant',
-                            'Instance of marshaller to use in grid<br/>\
-                            <ul>\
-                                <li>OptimizedMarshaller - Optimized implementation
of marshaller</li>\
-                                <li>JdkMarshaller - Marshaller based on JDK serialization
mechanism</li>\
-                                <li>Default - BinaryMarshaller serialize and deserialize
all objects in the binary format</li>\
-                            </ul>')
-                    div(ng-if='$ctrl.available("2.0.0")')
-                        +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true',
'Default', 'marshallerVariant',
-                            'Instance of marshaller to use in grid<br/>\
-                            <ul>\
-                                <li>JdkMarshaller - Marshaller based on JDK serialization
mechanism</li>\
-                                <li>Default - BinaryMarshaller serialize and deserialize
all objects in the binary format</li>\
-                            </ul>')
-                    a.customize(
-                        ng-if=`${marshaller}.kind && ${marshaller}.kind === 'OptimizedMarshaller'`
-                        ng-click=`${marshaller}.expanded = !${marshaller}.expanded`
-                    ) {{ #{marshaller}.expanded ? 'Hide settings' : 'Show settings'}}
-                .settings-row
-                    .panel-details(ng-show=`${marshaller}.expanded && ${marshaller}.kind
=== 'OptimizedMarshaller'`)
-                        .details-row
-                            +number('Streams pool size:', `${optMarshaller}.poolSize`, '"poolSize"',
'true', '0', '0',
-                                'Specifies size of cached object streams used by marshaller<br/>\
-                                Object streams are cached for performance reason to avoid
costly recreation for every serialization routine<br/>\
-                                If 0 (default), pool is not used and each thread has its
own cached object stream which it keeps reusing<br/>\
-                                Since each stream has an internal buffer, creating a stream
for each thread can lead to high memory consumption if many large messages are marshalled
or unmarshalled concurrently<br/>\
-                                Consider using pool in this case. This will limit number
of streams that can be created and, therefore, decrease memory consumption<br/>\
-                                NOTE: Using streams pool can decrease performance since streams
will be shared between different threads which will lead to more frequent context switching')
-                        .details-row
-                            +checkbox('Require serializable', `${optMarshaller}.requireSerializable`,
'"requireSerializable"',
-                                'Whether marshaller should require Serializable interface
or not')
+                div(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
+                    .settings-row
+                        div(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
+                            +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true',
'Default', 'marshallerVariant',
+                                'Instance of marshaller to use in grid<br/>\
+                                <ul>\
+                                    <li>OptimizedMarshaller - Optimized implementation
of marshaller</li>\
+                                    <li>JdkMarshaller - Marshaller based on JDK serialization
mechanism</li>\
+                                    <li>Default - BinaryMarshaller serialize and deserialize
all objects in the binary format</li>\
+                                </ul>')
+                        div(ng-if='$ctrl.available("2.0.0")')
+                            +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true',
'Default', 'marshallerVariant',
+                                'Instance of marshaller to use in grid<br/>\
+                                <ul>\
+                                    <li>JdkMarshaller - Marshaller based on JDK serialization
mechanism</li>\
+                                    <li>Default - BinaryMarshaller serialize and deserialize
all objects in the binary format</li>\
+                                </ul>')
+                        a.customize(
+                            ng-if=`${marshaller}.kind && ${marshaller}.kind === 'OptimizedMarshaller'`
+                            ng-click=`${marshaller}.expanded = !${marshaller}.expanded`
+                        ) {{ #{marshaller}.expanded ? 'Hide settings' : 'Show settings'}}
+                    .settings-row
+                        .panel-details(ng-show=`${marshaller}.expanded && ${marshaller}.kind
=== 'OptimizedMarshaller'`)
+                            .details-row
+                                +number('Streams pool size:', `${optMarshaller}.poolSize`,
'"poolSize"', 'true', '0', '0',
+                                    'Specifies size of cached object streams used by marshaller<br/>\
+                                    Object streams are cached for performance reason to avoid
costly recreation for every serialization routine<br/>\
+                                    If 0 (default), pool is not used and each thread has
its own cached object stream which it keeps reusing<br/>\
+                                    Since each stream has an internal buffer, creating a
stream for each thread can lead to high memory consumption if many large messages are marshalled
or unmarshalled concurrently<br/>\
+                                    Consider using pool in this case. This will limit number
of streams that can be created and, therefore, decrease memory consumption<br/>\
+                                    NOTE: Using streams pool can decrease performance since
streams will be shared between different threads which will lead to more frequent context
switching')
+                            .details-row
+                                +checkbox('Require serializable', `${optMarshaller}.requireSerializable`,
'"requireSerializable"',
+                                    'Whether marshaller should require Serializable interface
or not')
                 .settings-row
                     +checkbox('Marshal local jobs', `${model}.marshalLocalJobs`, '"marshalLocalJobs"',
'If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote
node')
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39d4ae/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
b/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
index 077897b..e22ec6f 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
@@ -53,7 +53,7 @@ include /app/helpers/jade/mixins
                             <li>Each entry in partition group - lock transaction belongs
to the same partition as was specified on partition transaction start</li>\
                             </ul>')
 
-                .settings-row
+                .settings-row(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
                     +checkbox('Late affinity assignment', model + '.lateAffinityAssignment',
'"lateAffinityAssignment"',
                         'With late affinity assignment mode if primary node was changed for
some partition this nodes becomes primary only when rebalancing for all assigned primary partitions
is finished')
 


Mime
View raw message