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-843 Minor fixes
Date Wed, 18 Nov 2015 03:31:52 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 35ac8d424 -> 30a5afce7


IGNITE-843 Minor fixes


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

Branch: refs/heads/ignite-843-rc1
Commit: 30a5afce746ae90a059b10b57cfbc8afefcf42eb
Parents: 35ac8d4
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Nov 18 10:32:15 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Nov 18 10:32:15 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/models/clusters.json    | 10 +++++++
 modules/control-center-web/src/main/js/db.js    |  3 ++-
 .../js/helpers/generator/generator-common.js    |  3 +++
 .../main/js/helpers/generator/generator-java.js | 28 +++++++++++++-------
 .../main/js/helpers/generator/generator-pom.js  |  2 +-
 .../main/js/helpers/generator/generator-xml.js  |  1 +
 .../src/main/js/views/templates/select.jade     |  4 +--
 7 files changed, 37 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/clusters.json b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index 2e69fc6..96ac6bd 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -1730,6 +1730,16 @@
           "tip": [
             "Thread pool that is in charge of processing outgoing IGFS messages"
           ]
+        },
+        {
+          "label": "Rebalance",
+          "id": "rebalanceThreadPoolSize",
+          "type": "number",
+          "model": "rebalanceThreadPoolSize",
+          "placeholder": 1,
+          "tip": [
+            "Max count of threads can be used at rebalancing"
+          ]
         }
       ]
     },

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index 15d9212..a31ed89 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -437,7 +437,8 @@ var ClusterSchema = new Schema({
         trustStoreFilePath: String,
         trustStoreType: String,
         trustManagers: [String]
-    }
+    },
+    rebalanceThreadPoolSize: Number
 });
 
 // Install deep populate plugin.

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
index d7699b4..651fdb1 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
@@ -276,12 +276,14 @@ $generatorCommon.dataSourceClassName = function(db) {
 $generatorCommon.STORE_FACTORIES = {
     CacheJdbcPojoStoreFactory: {
         className: 'org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory',
+        suffix: 'JdbcPojo',
         fields: {
             configuration: {type: 'bean'}
         }
     },
     CacheJdbcBlobStoreFactory: {
         className: 'org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactory',
+        suffix: 'JdbcBlob',
         fields: {
             user: null,
             dataSourceBean: null,
@@ -295,6 +297,7 @@ $generatorCommon.STORE_FACTORIES = {
     },
     CacheHibernateBlobStoreFactory: {
         className: 'org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreFactory',
+        suffix: 'Hibernate',
         fields: {hibernateProperties: {type: 'propertiesAsList', propVarName: 'props'}}
     }
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index 552c019..43ede02 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -97,6 +97,10 @@ $generatorJava.declareVariable = function (res, varName, varFullType, varFullAct
     res.needEmptyLine = true;
 };
 
+$generatorJava.addVariable = function (res, varName) {
+    res.vars[varName] = true;
+};
+
 /**
  * Clear list of declared variables.
  *
@@ -731,6 +735,7 @@ $generatorJava.clusterPools = function (cluster, res) {
     $generatorJava.property(res, 'cfg', cluster, 'systemThreadPoolSize');
     $generatorJava.property(res, 'cfg', cluster, 'managementThreadPoolSize');
     $generatorJava.property(res, 'cfg', cluster, 'igfsThreadPoolSize');
+    $generatorJava.property(res, 'cfg', cluster, 'rebalanceThreadPoolSize');
 
     res.needEmptyLine = true;
 
@@ -849,6 +854,8 @@ $generatorJava.cacheStore = function (cache, metadatas, cacheVarName,
res) {
         if (storeFactory) {
             var storeFactoryDesc = $generatorCommon.STORE_FACTORIES[factoryKind];
 
+            var varName = 'storeFactory' + storeFactoryDesc.suffix;
+
             var dataSourceFound = false;
 
             if (storeFactory.dialect) {
@@ -892,12 +899,12 @@ $generatorJava.cacheStore = function (cache, metadatas, cacheVarName,
res) {
 
             if (factoryKind == 'CacheJdbcPojoStoreFactory') {
                 // Generate POJO store factory.
-                $generatorJava.declareVariable(res, 'storeFactory', 'org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory');
+                $generatorJava.declareVariable(res, varName, 'org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory');
 
                 if (dataSourceFound)
-                    res.line('storeFactory.setDataSource(dataSource);');
+                    res.line(varName + '.setDataSource(dataSource);');
 
-                res.line('storeFactory.setDialect(new ' +
+                res.line(varName + '.setDialect(new ' +
                     res.importClass($generatorCommon.jdbcDialectClassName(storeFactory.dialect))
+ '());');
 
                 res.needEmptyLine = true;
@@ -921,24 +928,24 @@ $generatorJava.cacheStore = function (cache, metadatas, cacheVarName,
res) {
                         res.needEmptyLine = true;
                     });
 
-                    res.line('storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));');
+                    res.line(varName + '.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));');
 
                     res.needEmptyLine = true;
                 }
+
+                res.line(cacheVarName + '.setCacheStoreFactory(' + varName + ');');
             }
             else {
-                $generatorJava.beanProperty(res, cacheVarName, storeFactory, 'cacheStoreFactory',
'storeFactory',
+                $generatorJava.beanProperty(res, cacheVarName, storeFactory, 'cacheStoreFactory',
varName,
                     storeFactoryDesc.className, storeFactoryDesc.fields, true);
 
                 if (dataSourceFound)
-                    res.line('storeFactory.setDataSource(dataSource);');
+                    res.line(varName + '.setDataSource(dataSource);');
             }
 
             res.needEmptyLine = true;
         }
 
-        res.line(cacheVarName + '.setCacheStoreFactory(storeFactory);');
-
         res.needEmptyLine = true;
     }
 
@@ -1837,14 +1844,16 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearCfg,
clientMode
 
         if (haveDS || cluster.sslEnabled) {
             res.line(res.importClass('java.net.URL') + ' res = IgniteConfiguration.class.getResource("/secret.properties");');
+            $generatorJava.addVariable(res, 'res');
 
             res.needEmptyLine = true;
 
             res.line(res.importClass('java.io.File') + ' propsFile = new File(res.toURI());');
+            $generatorJava.addVariable(res, 'propsFile');
 
             res.needEmptyLine = true;
 
-            res.line(res.importClass('java.util.Properties') + ' props = new Properties();');
+            $generatorJava.declareVariable(res, 'props', 'java.util.Properties');
 
             res.needEmptyLine = true;
 
@@ -1886,7 +1895,6 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearCfg,
clientMode
         $generatorJava.igfss(cluster.igfss, 'cfg', res);
 
         if (javaClass) {
-            res.importClass('org.apache.ignite.Ignite');
             res.importClass('org.apache.ignite.Ignition');
 
             res.line('return cfg;');

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
index 179fb5a..5a48808 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
@@ -97,7 +97,7 @@ $generatorPom.pom = function (cluster, igniteVersion, res) {
     res.startBlock('<repositories>');
     res.startBlock('<repository>');
     addProperty('id', 'GridGain External Repository');
-    addProperty('url', 'http://www.gridgainsystems.com/nexus/content/repositories/gridgain_staging-1549');
+    addProperty('url', 'http://www.gridgainsystems.com/nexus/content/repositories/gridgain_staging-1555');
     res.endBlock('</repository>');
     res.endBlock('</repositories>');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index b6f4c10..767d463 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -603,6 +603,7 @@ $generatorXml.clusterPools = function (cluster, res) {
     $generatorXml.property(res, cluster, 'systemThreadPoolSize');
     $generatorXml.property(res, cluster, 'managementThreadPoolSize');
     $generatorXml.property(res, cluster, 'igfsThreadPoolSize');
+    $generatorXml.property(res, cluster, 'rebalanceThreadPoolSize');
 
     res.needEmptyLine = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/30a5afce/modules/control-center-web/src/main/js/views/templates/select.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/select.jade b/modules/control-center-web/src/main/js/views/templates/select.jade
index 5825d1e..3feee61 100644
--- a/modules/control-center-web/src/main/js/views/templates/select.jade
+++ b/modules/control-center-web/src/main/js/views/templates/select.jade
@@ -16,8 +16,8 @@
 
 ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
     li(ng-if='$showAllNoneButtons || ($isMultiple && $matches.length > 2)')
-        a(id='li-dropdown-select-all' ng-click='$selectAllAtOnce()') {{$allText}} ({{$matches.length}})
-        a(id='li-dropdown-select-none' ng-click='$selectNoneAtOnce()') {{$noneText}}
+        a(id='li-dropdown-select-all' ng-click='$selectAll()') {{$allText}} ({{$matches.length}})
+        a(id='li-dropdown-select-none' ng-click='$selectNone()') {{$noneText}}
         hr(style='margin: 5px 0')
     li(role='presentation' ng-repeat='match in $matches')
         hr(ng-if='match.value == undefined' style='margin: 5px 0')


Mime
View raw message