You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/04/02 16:30:24 UTC
[2/2] incubator-ignite git commit: #ignite-gg-9966: Add node
validator.
#ignite-gg-9966: Add node validator.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4abb0e8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4abb0e8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4abb0e8e
Branch: refs/heads/ignite-gg-9966-1
Commit: 4abb0e8ec8814431282963d929f2838d528f678c
Parents: ccfe100
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 2 17:28:56 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 2 17:28:56 2015 +0300
----------------------------------------------------------------------
.../internal/managers/GridManagerAdapter.java | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4abb0e8e/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index fb4f5d4..ebd35a4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -479,14 +479,25 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
return err;
}
+ boolean defValidation = true;
+
for (PluginProvider pl : ctx.plugins().allProviders()) {
NodeValidator val = (NodeValidator) pl.createComponent(ctx.plugins().pluginContextForProvider(pl), NodeValidator.class);
- if (val != null)
- return val.validateNode(ctx.discovery().localNode(), node);
+ if (val != null) {
+ defValidation = false;
+
+ IgniteSpiNodeValidationResult err = val.validateNode(ctx.discovery().localNode(), node);
+
+ if (err != null)
+ return err;
+ }
}
- return new NodeValidator().validateNode(ctx.discovery().localNode(), node);
+ if (defValidation)
+ return new NodeValidator().validateNode(ctx.discovery().localNode(), node);
+
+ return null;
}
@Override public Collection<GridSecuritySubject> authenticatedSubjects() {