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-2724 Fixed defaults.
Date Tue, 01 Mar 2016 10:04:53 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 440aa002a -> 06af6d231


IGNITE-2724 Fixed defaults.


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

Branch: refs/heads/ignite-843-rc2
Commit: 06af6d2310eba672562857c83478f6a54c047c4b
Parents: 440aa00
Author: vsisko <vsisko@gridgain.com>
Authored: Tue Mar 1 17:04:44 2016 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Mar 1 17:04:44 2016 +0700

----------------------------------------------------------------------
 .../clusters/general/discovery/zookeeper.jade   |  5 ++-
 .../bounded-exponential-backoff.jade            |  5 +--
 .../discovery/zookeeper/retrypolicy/custom.jade |  2 +-
 .../retrypolicy/exponential-backoff.jade        |  4 +--
 .../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/helpers/generator/generator-java.js | 34 ++++++++++----------
 .../main/js/helpers/generator/generator-xml.js  | 30 ++++++++---------
 10 files changed, 39 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/06af6d23/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 709d436..c1d3b0b 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
@@ -22,7 +22,9 @@ div
             ignite-form-field-label
                 | Curator:
             ignite-form-field-tooltip
-                | The Curator framework in use
+                | The Curator framework in use #[br]
+                | By default generates curator of org.apache.curator.framework.imps.CuratorFrameworkImpl.CuratorFrameworkImpl
+                | class with configured connect string, retry policy, and default session
and connection timeouts
             ignite-form-field-java-class(
                 data-id='curator'
                 data-name='curator'
@@ -53,6 +55,7 @@ div
                     li Max number of times - retries a max number of times
                     li Only once - retries only once
                     li Always allow retry - retries infinitely
+                    li Default - exponential backoff retry policy with configured base sleep
time equal to 1000ms and max retry count equal to 10
                     li Custom - custom retry policy implementation
             ignite-form-field-dropdown(
                 data-id='retryPolicy'

http://git-wip-us.apache.org/repos/asf/ignite/blob/06af6d23/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 cc4920f..db6a9d6 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
@@ -22,12 +22,11 @@ div
             ignite-form-field-label
                 | Base interval:
             ignite-form-field-tooltip
-                | Initial amount of time to wait between retries
+                | Initial amount of time in ms to wait between retries
             ignite-form-field-input-number(
                 data-id='baseSleepTimeMs'
                 data-name='baseSleepTimeMs'
                 data-ng-model='#{model}.baseSleepTimeMs'
-                data-ng-required='true'
                 data-placeholder='1000'
             )
     .details-row
@@ -41,7 +40,6 @@ div
                 data-name='maxSleepTimeMs'
                 data-ng-model='#{model}.maxSleepTimeMs'
                 data-placeholder='Integer.MAX_VALUE'
-                data-ng-required='true'
             )
     .details-row
         ignite-form-field
@@ -53,7 +51,6 @@ div
                 data-id='maxRetries'
                 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/06af6d23/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
index e5663a8..337f2f8 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
@@ -26,5 +26,5 @@
             data-id='className'
             data-name='className'
             data-ng-model='#{model}.className'
-            data-required='true'
+            data-ng-required='true'
         )

http://git-wip-us.apache.org/repos/asf/ignite/blob/06af6d23/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 b33622b..0e89242 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
@@ -22,12 +22,11 @@ div
             ignite-form-field-label
                 | Base interval:
             ignite-form-field-tooltip
-                | Initial amount of time to wait between retries
+                | Initial amount of time in ms to wait between retries
             ignite-form-field-input-number(
                 data-id='baseSleepTimeMs'
                 data-name='baseSleepTimeMs'
                 data-ng-model='#{model}.baseSleepTimeMs'
-                data-ng-required='true'
                 data-placeholder='1000'
             )
     .details-row
@@ -40,7 +39,6 @@ div
                 data-id='maxRetries'
                 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/06af6d23/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 cde2869..d14ff21 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
@@ -26,6 +26,5 @@
             data-id='retryIntervalMs'
             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/06af6d23/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 71a7acc..977a028 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
@@ -28,7 +28,6 @@ div
                 data-name='n'
                 data-ng-model='#{model}.n'
                 data-placeholder='10'
-                data-ng-required='true'
             )
     .details-row
         ignite-form-field
@@ -40,6 +39,5 @@ div
                 data-id='sleepMsBetweenRetries'
                 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/06af6d23/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 39c7f13..f102f7e 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
@@ -27,6 +27,5 @@ div
                 data-id='sleepMsBetweenRetry'
                 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/06af6d23/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 e834d55..b5cadc7 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
@@ -27,7 +27,6 @@ div
                 data-id='maxElapsedTimeMs'
                 data-name='maxElapsedTimeMs'
                 data-ng-model='#{model}.maxElapsedTimeMs'
-                data-ng-required='true'
                 data-placeholder='60000'
             )
     .details-row
@@ -40,6 +39,5 @@ div
                 data-id='sleepMsBetweenRetries'
                 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/06af6d23/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 dfb7a64..4e94d73 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
@@ -63,8 +63,8 @@ $generatorJava.setterName = function (propName, setterName) {
 };
 
 // Add constructor argument
-$generatorJava.constructorArg = function (obj, propName, notFirst, opt) {
-    var v = obj ? obj[propName] : undefined;
+$generatorJava.constructorArg = function (obj, propName, dflt, notFirst, opt) {
+    var v = (obj ? obj[propName] : undefined) || dflt;
 
     if ($commonUtils.isDefinedAndNotEmpty(v))
         return (notFirst ? ', ' : '') + $generatorJava.toJavaCode(v);
@@ -555,43 +555,43 @@ $generatorJava.clusterGeneral = function (cluster, clientNearCfg, res)
{
                         switch (kind) {
                             case 'ExponentialBackoff':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.ExponentialBackoffRetry')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'baseSleepTimeMs')
+
-                                    $generatorJava.constructorArg(retryPolicy, 'maxRetries',
true) +
-                                    $generatorJava.constructorArg(retryPolicy, 'maxSleepMs',
true, true) + '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'baseSleepTimeMs',
1000) +
+                                    $generatorJava.constructorArg(retryPolicy, 'maxRetries',
10, true) +
+                                    $generatorJava.constructorArg(retryPolicy, 'maxSleepMs',
undefined, true, true) + '));');
 
                                 break;
 
                             case 'BoundedExponentialBackoff':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.BoundedExponentialBackoffRetry')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'baseSleepTimeMs')
+
-                                    $generatorJava.constructorArg(retryPolicy, 'maxSleepTimeMs',
true) +
-                                    $generatorJava.constructorArg(retryPolicy, 'maxRetries',
true) + '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'baseSleepTimeMs',
1000) +
+                                    $generatorJava.constructorArg(retryPolicy, 'maxSleepTimeMs',
2147483647, true) +
+                                    $generatorJava.constructorArg(retryPolicy, 'maxRetries',
10, true) + '));');
 
                                 break;
 
                             case 'UntilElapsed':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.RetryUntilElapsed')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'maxElapsedTimeMs')
+
-                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetries',
true) + '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'maxElapsedTimeMs',
60000) +
+                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetries',
1000, true) + '));');
 
                                 break;
 
                             case 'NTimes':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.RetryNTimes')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'n') +
-                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetries',
true) + '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'n', 10) +
+                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetries',
1000, true) + '));');
 
                                 break;
 
                             case 'OneTime':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.RetryOneTime')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetry')
+ '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'sleepMsBetweenRetry',
1000) + '));');
 
                                 break;
 
                             case 'Forever':
                                 res.line(finderVar + '.setRetryPolicy(new ' + res.importClass('org.apache.curator.retry.RetryForever')
+ '(' +
-                                    $generatorJava.constructorArg(retryPolicy, 'retryIntervalMs')
+ '));');
+                                    $generatorJava.constructorArg(retryPolicy, 'retryIntervalMs',
1000) + '));');
 
                                 break;
 
@@ -2383,9 +2383,9 @@ $generatorJava.igfsSecondFS = function(igfs, varName, res) {
 
         res.line(varName + '.setSecondaryFileSystem(new ' +
             res.importClass('org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem')
+ '(' +
-                $generatorJava.constructorArg(secondFs, 'uri') +
-                (cfgDefined || nameDefined ? $generatorJava.constructorArg(secondFs, 'cfgPath',
true) : '') +
-                $generatorJava.constructorArg(secondFs, 'userName', true, true) +
+                $generatorJava.constructorArg(secondFs, 'uri', undefined) +
+                (cfgDefined || nameDefined ? $generatorJava.constructorArg(secondFs, 'cfgPath',
undefined, true) : '') +
+                $generatorJava.constructorArg(secondFs, 'userName', undefined, true, true)
+
             '));');
 
         res.needEmptyLine = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/06af6d23/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 0afe190..29c924e 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
@@ -27,8 +27,8 @@ $generatorXml.escape = function (s) {
 };
 
 // Add constructor argument
-$generatorXml.constructorArg = function (res, ix, obj, propName, opt) {
-    var v = obj ? obj[propName] : undefined;
+$generatorXml.constructorArg = function (res, ix, obj, propName, dflt, opt) {
+    var v = (obj ? obj[propName] : undefined) || dflt;
 
     if ($commonUtils.isDefinedAndNotEmpty(v))
         res.line('<constructor-arg ' + (ix >= 0 ? 'index="' + ix + '" ' : '') + 'value="'
+ v + '"/>');
@@ -401,48 +401,48 @@ $generatorXml.clusterGeneral = function (cluster, res) {
                         switch (kind) {
                             case 'ExponentialBackoff':
                                 res.startBlock('<bean class="org.apache.curator.retry.ExponentialBackoffRetry">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'baseSleepTimeMs');
-                                $generatorXml.constructorArg(res, 1, retryPolicy, 'maxRetries');
-                                $generatorXml.constructorArg(res, 2, retryPolicy, 'maxSleepMs',
true);
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'baseSleepTimeMs',
1000);
+                                $generatorXml.constructorArg(res, 1, retryPolicy, 'maxRetries',
10);
+                                $generatorXml.constructorArg(res, 2, retryPolicy, 'maxSleepMs',
undefined, true);
                                 res.endBlock('</bean>');
 
                                 break;
 
                             case 'BoundedExponentialBackoff':
                                 res.startBlock('<bean class="org.apache.curator.retry.BoundedExponentialBackoffRetry">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'baseSleepTimeMs');
-                                $generatorXml.constructorArg(res, 1, retryPolicy, 'maxSleepTimeMs');
-                                $generatorXml.constructorArg(res, 2, retryPolicy, 'maxRetries');
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'baseSleepTimeMs',
1000);
+                                $generatorXml.constructorArg(res, 1, retryPolicy, 'maxSleepTimeMs',
2147483647);
+                                $generatorXml.constructorArg(res, 2, retryPolicy, 'maxRetries',
10);
                                 res.endBlock('</bean>');
 
                                 break;
 
                             case 'UntilElapsed':
                                 res.startBlock('<bean class="org.apache.curator.retry.RetryUntilElapsed">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'maxElapsedTimeMs');
-                                $generatorXml.constructorArg(res, 1, retryPolicy, 'sleepMsBetweenRetries');
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'maxElapsedTimeMs',
60000);
+                                $generatorXml.constructorArg(res, 1, retryPolicy, 'sleepMsBetweenRetries',
1000);
                                 res.endBlock('</bean>');
 
                                 break;
 
                             case 'NTimes':
                                 res.startBlock('<bean class="org.apache.curator.retry.RetryNTimes">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'n');
-                                $generatorXml.constructorArg(res, 1, retryPolicy, 'sleepMsBetweenRetries');
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'n', 10);
+                                $generatorXml.constructorArg(res, 1, retryPolicy, 'sleepMsBetweenRetries',
1000);
                                 res.endBlock('</bean>');
 
                                 break;
 
                             case 'OneTime':
                                 res.startBlock('<bean class="org.apache.curator.retry.RetryOneTime">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'sleepMsBetweenRetry');
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'sleepMsBetweenRetry',
1000);
                                 res.endBlock('</bean>');
 
                                 break;
 
                             case 'Forever':
                                 res.startBlock('<bean class="org.apache.curator.retry.RetryForever">');
-                                $generatorXml.constructorArg(res, 0, retryPolicy, 'retryIntervalMs');
+                                $generatorXml.constructorArg(res, 0, retryPolicy, 'retryIntervalMs',
1000);
                                 res.endBlock('</bean>');
 
                                 break;
@@ -1530,7 +1530,7 @@ $generatorXml.igfsSecondFS = function(igfs, res) {
         if (cfgDefined || nameDefined)
             $generatorXml.constructorArg(res, 1, secondFs, 'cfgPath');
 
-        $generatorXml.constructorArg(res, 2, secondFs, 'userName', true);
+        $generatorXml.constructorArg(res, 2, secondFs, 'userName', undefined, true);
 
         res.endBlock('</bean>');
         res.endBlock('</property>');


Mime
View raw message