ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/50] [abbrv] incubator-ignite git commit: #ignite-gg-9966: review.
Date Mon, 06 Apr 2015 15:07:06 GMT
#ignite-gg-9966: review.


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

Branch: refs/heads/ignite-437-sqltests-p2
Commit: 4c99d6cd179b2c805c0a1732c170e1a492463e0f
Parents: dfc3a01
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Apr 3 18:08:37 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Apr 3 18:08:37 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/GridComponent.java   |  2 +-
 .../ignite/internal/GridKernalContextImpl.java  |  4 +-
 .../ignite/internal/GridPluginComponent.java    |  4 +-
 .../apache/ignite/internal/IgniteKernal.java    | 10 ++-
 .../internal/managers/GridManagerAdapter.java   |  6 +-
 .../processors/GridProcessorAdapter.java        |  2 +-
 .../processors/cache/GridCacheProcessor.java    |  6 +-
 .../DiscoveryNodeValidationProcessor.java       | 27 +++++++
 .../OsDiscoveryNodeValidationProcessor.java     | 74 ++++++++++++++++++
 .../spi/NodeVersionValidatorProcessor.java      | 27 -------
 .../spi/OsNodeVersionValidatorProcessor.java    | 80 --------------------
 .../ignite/spi/IgniteNodeValidationResult.java  | 66 ++++++++++++++++
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  2 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |  2 +-
 .../spi/IgniteSpiNodeValidationResult.java      | 66 ----------------
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  2 +-
 .../testframework/GridSpiTestContext.java       |  2 +-
 17 files changed, 189 insertions(+), 193 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java b/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
index 47923e0..9f08d6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
@@ -106,7 +106,7 @@ public interface GridComponent {
      * @param node Joining node.
      * @return Validation result or {@code null} in case of success.
      */
-    @Nullable public IgniteSpiNodeValidationResult validateNode(ClusterNode node);
+    @Nullable public IgniteNodeValidationResult validateNode(ClusterNode node);
 
     /**
      * Gets unique component type to distinguish components providing discovery data. Must
return non-null value

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index e999a49..1ff483e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -53,7 +53,7 @@ import org.apache.ignite.internal.processors.security.*;
 import org.apache.ignite.internal.processors.segmentation.*;
 import org.apache.ignite.internal.processors.service.*;
 import org.apache.ignite.internal.processors.session.*;
-import org.apache.ignite.internal.processors.spi.*;
+import org.apache.ignite.internal.processors.nodevalidation.*;
 import org.apache.ignite.internal.processors.task.*;
 import org.apache.ignite.internal.processors.timeout.*;
 import org.apache.ignite.internal.util.*;
@@ -476,7 +476,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
             dataStructuresProc = (DataStructuresProcessor)comp;
         else if (comp instanceof ClusterProcessor)
             cluster = (ClusterProcessor)comp;
-        else if (!(comp instanceof NodeVersionValidatorProcessor))
+        else if (!(comp instanceof DiscoveryNodeValidationProcessor))
             assert (comp instanceof GridPluginComponent) : "Unknown manager class: " + comp.getClass();
 
         if (addToList)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
index dca2e91..305a7e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
@@ -83,14 +83,14 @@ public class GridPluginComponent implements GridComponent {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
         try {
             plugin.validateNewNode(node);
 
             return null;
         }
         catch (PluginValidationException e) {
-            return new IgniteSpiNodeValidationResult(e.nodeId(), e.getMessage(), e.remoteMessage());
+            return new IgniteNodeValidationResult(e.nodeId(), e.getMessage(), e.remoteMessage());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 48109931..e8fd1ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -56,7 +56,7 @@ import org.apache.ignite.internal.processors.security.*;
 import org.apache.ignite.internal.processors.segmentation.*;
 import org.apache.ignite.internal.processors.service.*;
 import org.apache.ignite.internal.processors.session.*;
-import org.apache.ignite.internal.processors.spi.*;
+import org.apache.ignite.internal.processors.nodevalidation.*;
 import org.apache.ignite.internal.processors.task.*;
 import org.apache.ignite.internal.processors.timeout.*;
 import org.apache.ignite.internal.util.*;
@@ -735,7 +735,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
             // Start processors before discovery manager, so they will
             // be able to start receiving messages once discovery completes.
-            startProcessor(createComponent(NodeVersionValidatorProcessor.class, ctx));
+            startProcessor(createComponent(DiscoveryNodeValidationProcessor.class, ctx));
             startProcessor(new GridClockSyncProcessor(ctx));
             startProcessor(new GridAffinityProcessor(ctx));
             startProcessor(createComponent(GridSegmentationProcessor.class, ctx));
@@ -1157,6 +1157,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
         // Stick in some system level attributes
         add(ATTR_JIT_NAME, U.getCompilerMx() == null ? "" : U.getCompilerMx().getName());
+        add(ATTR_BUILD_VER, VER_STR);
+        add(ATTR_BUILD_DATE, BUILD_TSTAMP_STR);
         add(ATTR_MARSHALLER, cfg.getMarshaller().getClass().getName());
         add(ATTR_USER_NAME, System.getProperty("user.name"));
         add(ATTR_GRID_NAME, gridName);
@@ -2726,8 +2728,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         if (cls.equals(IgniteCacheObjectProcessor.class))
             return (T)new IgniteCacheObjectProcessorImpl(ctx);
 
-        if (cls.equals(NodeVersionValidatorProcessor.class))
-            return (T)new OsNodeVersionValidatorProcessor(ctx);
+        if (cls.equals(DiscoveryNodeValidationProcessor.class))
+            return (T)new OsDiscoveryNodeValidationProcessor(ctx);
 
         Class<T> implCls = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/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 982ca86..665f205 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
@@ -469,9 +469,9 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements
GridMan
                         }
                     }
 
-                    @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode
node) {
+                    @Override public IgniteNodeValidationResult validateNode(ClusterNode
node) {
                         for (GridComponent comp : ctx) {
-                            IgniteSpiNodeValidationResult err = comp.validateNode(node);
+                            IgniteNodeValidationResult err = comp.validateNode(node);
 
                             if (err != null)
                                 return err;
@@ -612,7 +612,7 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements
GridMan
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
index f00aac3..39ccd7a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
@@ -113,7 +113,7 @@ public abstract class GridProcessorAdapter implements GridProcessor {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index c366520..ec708b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1871,7 +1871,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
         return validateHashIdResolvers(node);
     }
 
@@ -1879,7 +1879,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param node Joining node.
      * @return Validation result or {@code null} in case of success.
      */
-    @Nullable private IgniteSpiNodeValidationResult validateHashIdResolvers(ClusterNode node)
{
+    @Nullable private IgniteNodeValidationResult validateHashIdResolvers(ClusterNode node)
{
         for (DynamicCacheDescriptor desc : registeredCaches.values()) {
             CacheConfiguration cfg = desc.cacheConfiguration();
 
@@ -1906,7 +1906,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                             ", hashIdResolverClass=" + hashIdRslvr.getClass().getName() +
", existingNodeId=" +
                             topNode.id() + ']';
 
-                        return new IgniteSpiNodeValidationResult(topNode.id(), errMsg, sndMsg);
+                        return new IgniteNodeValidationResult(topNode.id(), errMsg, sndMsg);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/DiscoveryNodeValidationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/DiscoveryNodeValidationProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/DiscoveryNodeValidationProcessor.java
new file mode 100644
index 0000000..d0f4624
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/DiscoveryNodeValidationProcessor.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.nodevalidation;
+
+import org.apache.ignite.internal.processors.*;
+
+/**
+ * Node Version Validation.
+ */
+public interface DiscoveryNodeValidationProcessor extends GridProcessor {
+    //No-op.
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/OsDiscoveryNodeValidationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/OsDiscoveryNodeValidationProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/OsDiscoveryNodeValidationProcessor.java
new file mode 100644
index 0000000..628d7c9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/OsDiscoveryNodeValidationProcessor.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.nodevalidation;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.*;
+import org.jetbrains.annotations.*;
+
+import static org.apache.ignite.internal.IgniteNodeAttributes.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
+
+/**
+ * Node validation.
+ */
+public class OsDiscoveryNodeValidationProcessor extends GridProcessorAdapter implements DiscoveryNodeValidationProcessor
{
+    /**
+     * @param ctx Kernal context.
+     */
+    public OsDiscoveryNodeValidationProcessor(GridKernalContext ctx) {
+        super(ctx);
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
+        ClusterNode locNode = ctx.discovery().localNode();
+
+        // Check version.
+        String locBuildVer = locNode.attribute(ATTR_BUILD_VER);
+        String rmtBuildVer = node.attribute(ATTR_BUILD_VER);
+
+        if (!F.eq(rmtBuildVer, locBuildVer)) {
+            // OS nodes don't support rolling updates.
+            if (!locBuildVer.equals(rmtBuildVer)) {
+                String errMsg = "Local node and remote node have different version numbers
" +
+                    "(node will not join, Ignite does not support rolling updates, " +
+                    "so versions must be exactly the same) " +
+                    "[locBuildVer=" + locBuildVer + ", rmtBuildVer=" + rmtBuildVer +
+                    ", locNodeAddrs=" + U.addressesAsString(locNode) +
+                    ", rmtNodeAddrs=" + U.addressesAsString(node) +
+                    ", locNodeId=" + locNode.id() + ", rmtNodeId=" + node.id() + ']';
+
+                LT.warn(log, null, errMsg);
+
+                // Always output in debug.
+                if (log.isDebugEnabled())
+                    log.debug(errMsg);
+
+                return new IgniteNodeValidationResult(node.id(), errMsg, errMsg);
+            }
+        }
+
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/NodeVersionValidatorProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/NodeVersionValidatorProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/NodeVersionValidatorProcessor.java
deleted file mode 100644
index 5ac1af0..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/NodeVersionValidatorProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.spi;
-
-import org.apache.ignite.internal.processors.*;
-
-/**
- * Node Version Validator.
- */
-public interface NodeVersionValidatorProcessor extends GridProcessor {
-    //No-op.
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/OsNodeVersionValidatorProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/OsNodeVersionValidatorProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/OsNodeVersionValidatorProcessor.java
deleted file mode 100644
index 3d151f3..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/spi/OsNodeVersionValidatorProcessor.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.spi;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.processors.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import static org.apache.ignite.internal.IgniteNodeAttributes.*;
-import static org.apache.ignite.internal.IgniteVersionUtils.*;
-
-/**
- * Node validator.
- */
-public class OsNodeVersionValidatorProcessor extends GridProcessorAdapter implements NodeVersionValidatorProcessor
{
-    /**
-     * @param ctx Kernal context.
-     */
-    public OsNodeVersionValidatorProcessor(GridKernalContext ctx) {
-        super(ctx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void start() throws IgniteCheckedException {
-        ctx.addNodeAttribute(ATTR_BUILD_VER, VER_STR);
-        ctx.addNodeAttribute(ATTR_BUILD_DATE, BUILD_TSTAMP_STR);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
-        ClusterNode locNode = ctx.discovery().localNode();
-
-        // Check version.
-        String locBuildVer = locNode.attribute(ATTR_BUILD_VER);
-        String rmtBuildVer = node.attribute(ATTR_BUILD_VER);
-
-        if (!F.eq(rmtBuildVer, locBuildVer)) {
-            // OS nodes don't support rolling updates.
-            if (!locBuildVer.equals(rmtBuildVer)) {
-                String errMsg = "Local node and remote node have different version numbers
" +
-                    "(node will not join, Ignite does not support rolling updates, " +
-                    "so versions must be exactly the same) " +
-                    "[locBuildVer=" + locBuildVer + ", rmtBuildVer=" + rmtBuildVer +
-                    ", locNodeAddrs=" + U.addressesAsString(locNode) +
-                    ", rmtNodeAddrs=" + U.addressesAsString(node) +
-                    ", locNodeId=" + locNode.id() + ", rmtNodeId=" + node.id() + ']';
-
-                LT.warn(log, null, errMsg);
-
-                // Always output in debug.
-                if (log.isDebugEnabled())
-                    log.debug(errMsg);
-
-                return new IgniteSpiNodeValidationResult(node.id(), errMsg, errMsg);
-            }
-        }
-
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/spi/IgniteNodeValidationResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteNodeValidationResult.java
b/modules/core/src/main/java/org/apache/ignite/spi/IgniteNodeValidationResult.java
new file mode 100644
index 0000000..0c3746c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteNodeValidationResult.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi;
+
+import java.util.*;
+
+/**
+ * Result of joining node validation.
+ */
+public class IgniteNodeValidationResult {
+    /** Offending node ID. */
+    private final UUID nodeId;
+
+    /** Error message to be logged locally. */
+    private final String msg;
+
+    /** Error message to be sent to joining node. */
+    private final String sndMsg;
+
+    /**
+     * @param nodeId Offending node ID.
+     * @param msg Message logged locally.
+     * @param sndMsg Message sent to joining node.
+     */
+    public IgniteNodeValidationResult(UUID nodeId, String msg, String sndMsg) {
+        this.nodeId = nodeId;
+        this.msg = msg;
+        this.sndMsg = sndMsg;
+    }
+
+    /**
+     * @return Offending node ID.
+     */
+    public UUID nodeId() {
+        return nodeId;
+    }
+
+    /**
+     * @return Message to be logged locally.
+     */
+    public String message() {
+        return msg;
+    }
+
+    /**
+     * @return Message to be sent to joining node.
+     */
+    public String sendMessage() {
+        return sndMsg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index bb66872..1c9b4db 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -664,7 +664,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
         }
 
         /** {@inheritDoc} */
-        @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode
node) {
+        @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
index 75b637d..5eef37a 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
@@ -302,7 +302,7 @@ public interface IgniteSpiContext {
      * @param node Joining node.
      * @return Validation result or {@code null} in case of success.
      */
-    @Nullable public IgniteSpiNodeValidationResult validateNode(ClusterNode node);
+    @Nullable public IgniteNodeValidationResult validateNode(ClusterNode node);
 
     /**
      * Gets collection of authenticated subjects together with their permissions.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiNodeValidationResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiNodeValidationResult.java
b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiNodeValidationResult.java
deleted file mode 100644
index 2c60bc7..0000000
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiNodeValidationResult.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.spi;
-
-import java.util.*;
-
-/**
- * Result of joining node validation.
- */
-public class IgniteSpiNodeValidationResult {
-    /** Offending node ID. */
-    private final UUID nodeId;
-
-    /** Error message to be logged locally. */
-    private final String msg;
-
-    /** Error message to be sent to joining node. */
-    private final String sndMsg;
-
-    /**
-     * @param nodeId Offending node ID.
-     * @param msg Message logged locally.
-     * @param sndMsg Message sent to joining node.
-     */
-    public IgniteSpiNodeValidationResult(UUID nodeId, String msg, String sndMsg) {
-        this.nodeId = nodeId;
-        this.msg = msg;
-        this.sndMsg = sndMsg;
-    }
-
-    /**
-     * @return Offending node ID.
-     */
-    public UUID nodeId() {
-        return nodeId;
-    }
-
-    /**
-     * @return Message to be logged locally.
-     */
-    public String message() {
-        return msg;
-    }
-
-    /**
-     * @return Message to be sent to joining node.
-     */
-    public String sendMessage() {
-        return sndMsg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index d17f9b3..a4cb816 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -3216,7 +3216,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                     }
                 }
 
-                IgniteSpiNodeValidationResult err = getSpiContext().validateNode(node);
+                IgniteNodeValidationResult err = getSpiContext().validateNode(node);
 
                 if (err != null) {
                     boolean ping = node.id().equals(err.nodeId()) ? pingNode(node) : pingNode(err.nodeId());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c99d6cd/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index a754910..a4e011a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -469,7 +469,7 @@ public class GridSpiTestContext implements IgniteSpiContext {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
{
+    @Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node)
{
         return null;
     }
 


Mime
View raw message