ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [12/28] ignite git commit: IGNITE-2724 WIP support for ZooKeeper.
Date Thu, 03 Mar 2016 12:07:19 GMT
IGNITE-2724 WIP support for ZooKeeper.


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

Branch: refs/heads/ignite-843-rc3
Commit: 6de273facf0489ebca2c944867882f805c76fbaf
Parents: 37bc977
Author: vsisko <vsisko@gridgain.com>
Authored: Fri Feb 26 13:30:53 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Feb 26 13:30:53 2016 +0700

----------------------------------------------------------------------
 .../states/configuration/clusters/general.jade  |  8 +++++++
 .../clusters/general/discovery/zookeeper.jade   | 21 +++++++++++------
 .../bounded-exponential-backoff.jade            |  6 +++--
 .../retrypolicy/exponential-backoff.jade        |  6 +++--
 .../zookeeper/retrypolicy/forever.jade          |  1 +
 .../zookeeper/retrypolicy/n-times.jade          |  2 ++
 .../zookeeper/retrypolicy/one-time.jade         |  1 +
 .../zookeeper/retrypolicy/until-elapsed.jade    |  2 ++
 .../main/js/controllers/clusters-controller.js  |  6 ++---
 .../main/js/helpers/generator/generator-java.js |  9 ++++----
 .../main/js/helpers/generator/generator-xml.js  | 24 ++++----------------
 .../src/main/js/public/stylesheets/style.scss   |  2 +-
 12 files changed, 49 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general.jade
index c750119..8317b47 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general.jade
@@ -70,6 +70,14 @@ form.panel.panel-default(name='general' novalidate)
                             | Discovery:
                         ignite-form-field-tooltip
                             | Discovery allows to discover remote nodes in grid
+                            ul: li Static IPs - IP Finder which works only with pre configured
list of IP addresses specified
+                                li Multicast - Multicast based IP finder
+                                li AWS S3 - AWS S3 based IP finder
+                                li Apache jclouds - Apache jclouds multi cloud toolkit based
IP finder
+                                li Google cloud storage - Google Cloud Storage based IP finder
+                                li JDBC - JDBC based IP finder
+                                li Shared filesystem - Shared filesystem based IP finder
+                                li Apache ZooKeeper - Apache ZooKeeper based IP finder
                         ignite-form-field-dropdown(
                             data-id='discovery'
                             data-name='discovery'

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
index d99a7a7..709d436 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
@@ -31,9 +31,9 @@ div
     .details-row
         ignite-form-field
             ignite-form-field-label
-                | Connection string:
+                | Connect string:
             ignite-form-field-tooltip
-                | This property will be used when "IGNITE_ZK_CONNECTION_STRING" system property
is not configured
+                | When "IGNITE_ZK_CONNECTION_STRING" system property is not configured this
property will be used
             ignite-form-field-input-text(
                 data-id='zkConnectionString'
                 data-name='zkConnectionString'
@@ -46,7 +46,14 @@ div
             ignite-form-field-label
                 | Retry policy:
             ignite-form-field-tooltip
-                | Retry policy
+                | Available retry policies:
+                ul: li Exponential backoff - retries a set number of times with increasing
sleep time between retries
+                   li Bounded exponential backoff - retries a set number of times with an
increasing (up to a maximum bound) sleep time between retries
+                    li Until elapsed - retries until a given amount of time elapses
+                    li Max number of times - retries a max number of times
+                    li Only once - retries only once
+                    li Always allow retry - retries infinitely
+                    li Custom - custom retry policy implementation
             ignite-form-field-dropdown(
                 data-id='retryPolicy'
                 data-name='retryPolicy'
@@ -56,7 +63,7 @@ div
                     {value: "UntilElapsed", label: "Until elapsed"},\
                     {value: "NTimes", label: "Max number of times"},\
                     {value: "OneTime", label: "Only once"},\
-                    {value: "Forever", label: "Always allowsRetry"},\
+                    {value: "Forever", label: "Always allow retry"},\
                     {value: "Custom", label: "Custom"},\
                     {value: undefined, label: "Default"}\
                 ]'
@@ -108,6 +115,6 @@ div
             | Allow duplicate registrations
             ignite-form-field-tooltip
                 | Whether to register each node only once, or if duplicate registrations
are allowed#[br]
-                | Nodes will attempt to register themselves, plus those they know about #[br]
-                | By default, duplicate registrations are not allowed, but you might want
to set this property to
-                | #[b true] if you have multiple network interfaces or if you are facing
troubles
+                | Nodes will attempt to register themselves, plus those they know about#[br]
+                | By default, duplicate registrations are not allowed, but you might want
to set this property
+                | to #[b true] if you have multiple network interfaces or if you are facing
troubles

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
index 06eb790..cc4920f 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
@@ -20,7 +20,7 @@ div
     .details-row
         ignite-form-field
             ignite-form-field-label
-                | Base Sleep Time:
+                | Base interval:
             ignite-form-field-tooltip
                 | Initial amount of time to wait between retries
             ignite-form-field-input-number(
@@ -28,11 +28,12 @@ div
                 data-name='baseSleepTimeMs'
                 data-ng-model='#{model}.baseSleepTimeMs'
                 data-ng-required='true'
+                data-placeholder='1000'
             )
     .details-row
         ignite-form-field
             ignite-form-field-label
-                | Max sleep time:
+                | Max interval:
             ignite-form-field-tooltip
                 | Max time in ms to sleep on each retry
             ignite-form-field-input-number(
@@ -53,5 +54,6 @@ div
                 data-name='maxRetries'
                 data-ng-model='#{model}.maxRetries'
                 data-ng-required='true'
+                data-placeholder='10'
                 data-max='29'
             )

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
index 79bcfa1..b33622b 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
@@ -20,7 +20,7 @@ div
     .details-row
         ignite-form-field
             ignite-form-field-label
-                | Base sleep time:
+                | Base interval:
             ignite-form-field-tooltip
                 | Initial amount of time to wait between retries
             ignite-form-field-input-number(
@@ -28,6 +28,7 @@ div
                 data-name='baseSleepTimeMs'
                 data-ng-model='#{model}.baseSleepTimeMs'
                 data-ng-required='true'
+                data-placeholder='1000'
             )
     .details-row
         ignite-form-field
@@ -40,12 +41,13 @@ div
                 data-name='maxRetries'
                 data-ng-model='#{model}.maxRetries'
                 data-ng-required='true'
+                data-placeholder='10'
                 data-max='29'
             )
     .details-row
         ignite-form-field
             ignite-form-field-label
-                | Max sleep time:
+                | Max interval:
             ignite-form-field-tooltip
                 | Max time in ms to sleep on each retry
             ignite-form-field-input-number(

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
index 705fa2a..cde2869 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
@@ -27,4 +27,5 @@
             data-name='retryIntervalMs'
             data-ng-model='#{model}.retryIntervalMs'
             data-ng-required='true'
+            data-placeholder='1000'
         )

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
index 0c44709..71a7acc 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
@@ -27,6 +27,7 @@ div
                 data-id='n'
                 data-name='n'
                 data-ng-model='#{model}.n'
+                data-placeholder='10'
                 data-ng-required='true'
             )
     .details-row
@@ -40,4 +41,5 @@ div
                 data-name='sleepMsBetweenRetries'
                 data-ng-model='#{model}.sleepMsBetweenRetries'
                 data-ng-required='true'
+                data-placeholder='1000'
             )

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
index 24b3514..39c7f13 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
@@ -28,4 +28,5 @@ div
                 data-name='sleepMsBetweenRetry'
                 data-ng-model='#{model}.sleepMsBetweenRetry'
                 data-ng-required='true'
+                data-placeholder='1000'
             )

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
index c4e701e..e834d55 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
@@ -28,6 +28,7 @@ div
                 data-name='maxElapsedTimeMs'
                 data-ng-model='#{model}.maxElapsedTimeMs'
                 data-ng-required='true'
+                data-placeholder='60000'
             )
     .details-row
         ignite-form-field
@@ -40,4 +41,5 @@ div
                 data-name='sleepMsBetweenRetries'
                 data-ng-model='#{model}.sleepMsBetweenRetries'
                 data-ng-required='true'
+                data-placeholder='1000'
             )

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 7e49f81..12b1199 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -62,13 +62,13 @@ consoleModule.controller('clustersController', function ($http, $timeout,
$scope
         var showPopoverMessage = $common.showPopoverMessage;
 
         $scope.discoveries = [
-            {value: 'Vm', label: 'static IPs'},
-            {value: 'Multicast', label: 'multicast'},
+            {value: 'Vm', label: 'Static IPs'},
+            {value: 'Multicast', label: 'Multicast'},
             {value: 'S3', label: 'AWS S3'},
             {value: 'Cloud', label: 'Apache jclouds'},
             {value: 'GoogleStorage', label: 'Google cloud storage'},
             {value: 'Jdbc', label: 'JDBC'},
-            {value: 'SharedFs', label: 'shared filesystem'},
+            {value: 'SharedFs', label: 'Shared filesystem'},
             {value: 'ZooKeeper', label: 'Apache ZooKeeper'}
         ];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/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 732fe51..dfb7a64 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
@@ -67,7 +67,7 @@ $generatorJava.constructorArg = function (obj, propName, notFirst, opt)
{
     var v = obj ? obj[propName] : undefined;
 
     if ($commonUtils.isDefinedAndNotEmpty(v))
-        return (notFirst ? ', ' : '') + v;
+        return (notFirst ? ', ' : '') + $generatorJava.toJavaCode(v);
     else if (!opt)
         return notFirst ? ', null' : 'null';
     else
@@ -2378,15 +2378,14 @@ $generatorJava.igfsSecondFS = function(igfs, varName, res) {
     if (igfs.secondaryFileSystemEnabled) {
         var secondFs = igfs.secondaryFileSystem || {};
 
-        var uriDefined = $commonUtils.isDefinedAndNotEmpty(secondFs.uri);
         var nameDefined = $commonUtils.isDefinedAndNotEmpty(secondFs.userName);
         var cfgDefined = $commonUtils.isDefinedAndNotEmpty(secondFs.cfgPath);
 
         res.line(varName + '.setSecondaryFileSystem(new ' +
             res.importClass('org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem')
+ '(' +
-                (uriDefined ? '"' + secondFs.uri + '"' : 'null') +
-                (cfgDefined || nameDefined ? (cfgDefined ? ', "' + secondFs.cfgPath + '"'
: ', null') : '') +
-                (nameDefined ? ', "' + secondFs.userName + '"' : '') +
+                $generatorJava.constructorArg(secondFs, 'uri') +
+                (cfgDefined || nameDefined ? $generatorJava.constructorArg(secondFs, 'cfgPath',
true) : '') +
+                $generatorJava.constructorArg(secondFs, 'userName', true, true) +
             '));');
 
         res.needEmptyLine = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/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 2d2c5c8..0afe190 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
@@ -1073,7 +1073,7 @@ $generatorXml.cacheRebalance = function(cache, res) {
     if (cache.igfsAffinnityGroupSize) {
         res.startBlock('<property name="affinityMapper">');
         res.startBlock('<bean class="org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper">');
-        res.line('<constructor-arg value="' + cache.igfsAffinnityGroupSize + '"/>');
+        $generatorXml.constructorArg(res, -1, cache, 'igfsAffinnityGroupSize');
         res.endBlock('</bean>');
         res.endBlock('</property>');
     }
@@ -1525,26 +1525,12 @@ $generatorXml.igfsSecondFS = function(igfs, res) {
         var nameDefined = $commonUtils.isDefinedAndNotEmpty(secondFs.userName);
         var cfgDefined = $commonUtils.isDefinedAndNotEmpty(secondFs.cfgPath);
 
-        if ($commonUtils.isDefinedAndNotEmpty(secondFs.uri))
-            res.line('<constructor-arg index="0" value="' + secondFs.uri + '"/>');
-        else {
-            res.startBlock('<constructor-arg index="0">');
-            res.line('<null/>');
-            res.endBlock('</constructor-arg>');
-        }
+        $generatorXml.constructorArg(res, 0, secondFs, 'uri');
 
-        if (cfgDefined || nameDefined) {
-            if (cfgDefined)
-                res.line('<constructor-arg index="1" value="' + secondFs.cfgPath + '"/>');
-            else {
-                res.startBlock('<constructor-arg index="1">');
-                res.line('<null/>');
-                res.endBlock('</constructor-arg>');
-            }
-        }
+        if (cfgDefined || nameDefined)
+            $generatorXml.constructorArg(res, 1, secondFs, 'cfgPath');
 
-        if ($commonUtils.isDefinedAndNotEmpty(secondFs.userName))
-            res.line('<constructor-arg index="2" value="' + secondFs.userName + '"/>');
+        $generatorXml.constructorArg(res, 2, secondFs, 'userName', true);
 
         res.endBlock('</bean>');
         res.endBlock('</property>');

http://git-wip-us.apache.org/repos/asf/ignite/blob/6de273fa/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 024fba9..4f2cf28 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -393,7 +393,7 @@ h1, h2, h3, h4, h5, h6 {
 }
 
 .details-row {
-    padding: 0 10px;
+    padding: 0 5px;
 }
 
 .details-row, .settings-row {


Mime
View raw message