ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-187 Move spi attributes to spiStart().
Date Wed, 04 Mar 2015 03:53:07 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-187 0f3fc691b -> 57fc321a7


# IGNITE-187 Move spi attributes to spiStart().


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

Branch: refs/heads/ignite-187
Commit: 57fc321a70ab116ae17ece1a760d3a3bb8e1af47
Parents: 0f3fc69
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Mar 4 10:46:48 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Mar 4 10:46:48 2015 +0700

----------------------------------------------------------------------
 .../internal/managers/GridManagerAdapter.java   | 59 +++++++++-----------
 .../checkpoint/GridCheckpointManager.java       |  2 -
 .../collision/GridCollisionManager.java         |  2 -
 .../managers/communication/GridIoManager.java   |  2 -
 .../deployment/GridDeploymentManager.java       |  2 -
 .../discovery/GridDiscoveryManager.java         |  2 -
 .../eventstorage/GridEventStorageManager.java   |  2 -
 .../managers/failover/GridFailoverManager.java  |  2 -
 .../managers/indexing/GridIndexingManager.java  |  2 -
 .../loadbalancer/GridLoadBalancerManager.java   |  2 -
 .../swapspace/GridSwapSpaceManager.java         |  2 -
 .../internal/processors/GridProcessor.java      |  3 -
 12 files changed, 27 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/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 ce80bfb..f963f9b 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
@@ -90,38 +90,6 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements
GridMan
         log = ctx.log(getClass());
     }
 
-    /** {@inheritDoc} */
-    @Override public void start() throws IgniteCheckedException {
-        for (T spi : spis) {
-            // Inject all spi resources.
-            ctx.resource().inject(spi);
-
-            // Inject SPI internal objects.
-            inject(spi);
-
-            try {
-                Map<String, Object> retval = spi.getNodeAttributes();
-
-                if (retval != null) {
-                    for (Map.Entry<String, Object> e : retval.entrySet()) {
-                        if (ctx.hasNodeAttribute(e.getKey()))
-                            throw new IgniteCheckedException("SPI attribute collision for
attribute [spi=" + spi +
-                                ", attr=" + e.getKey() + ']' +
-                                ". Attribute set by one SPI implementation has the same name
(name collision) as " +
-                                "attribute set by other SPI implementation. Such overriding
is not allowed. " +
-                                "Please check your Ignite configuration and/or SPI implementation
to avoid " +
-                                "attribute name collisions.");
-
-                        ctx.addNodeAttribute(e.getKey(), e.getValue());
-                    }
-                }
-            }
-            catch (IgniteSpiException e) {
-                throw new IgniteCheckedException("Failed to get SPI attributes.", e);
-            }
-        }
-    }
-
     /**
      * Gets wrapped SPI.
      *
@@ -199,6 +167,33 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements
GridMan
         Collection<String> names = U.newHashSet(spis.length);
 
         for (T spi : spis) {
+            // Inject all spi resources.
+            ctx.resource().inject(spi);
+
+            // Inject SPI internal objects.
+            inject(spi);
+
+            try {
+                Map<String, Object> retval = spi.getNodeAttributes();
+
+                if (retval != null) {
+                    for (Map.Entry<String, Object> e : retval.entrySet()) {
+                        if (ctx.hasNodeAttribute(e.getKey()))
+                            throw new IgniteCheckedException("SPI attribute collision for
attribute [spi=" + spi +
+                                ", attr=" + e.getKey() + ']' +
+                                ". Attribute set by one SPI implementation has the same name
(name collision) as " +
+                                "attribute set by other SPI implementation. Such overriding
is not allowed. " +
+                                "Please check your Ignite configuration and/or SPI implementation
to avoid " +
+                                "attribute name collisions.");
+
+                        ctx.addNodeAttribute(e.getKey(), e.getValue());
+                    }
+                }
+            }
+            catch (IgniteSpiException e) {
+                throw new IgniteCheckedException("Failed to get SPI attributes.", e);
+            }
+
             // Print-out all SPI parameters only in DEBUG mode.
             if (log.isDebugEnabled())
                 log.debug("Starting SPI: " + spi);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
index e3776a2..291930b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
@@ -75,8 +75,6 @@ public class GridCheckpointManager extends GridManagerAdapter<CheckpointSpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         if (ctx.config().isDaemon())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/collision/GridCollisionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/collision/GridCollisionManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/collision/GridCollisionManager.java
index 5ac0026..2f00fb7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/collision/GridCollisionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/collision/GridCollisionManager.java
@@ -44,8 +44,6 @@ public class GridCollisionManager extends GridManagerAdapter<CollisionSpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         if (ctx.config().isDaemon())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index b2d4b40..968e93a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -179,8 +179,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     /** {@inheritDoc} */
     @SuppressWarnings("deprecation")
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         assertParameter(discoDelay > 0, "discoveryStartupDelay > 0");
 
         startSpi();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java
index bbfbcb6..3d3bdc8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java
@@ -81,8 +81,6 @@ public class GridDeploymentManager extends GridManagerAdapter<DeploymentSpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         GridProtocolHandler.registerDeploymentManager(this);
 
         assertParameter(ctx.config().getDeploymentMode() != null, "ctx.config().getDeploymentMode()
!= null");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index b0d1fe1..44150e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -192,8 +192,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         long totSysMemory = -1;
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
index d936a86..82af8bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
@@ -222,8 +222,6 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         Map<IgnitePredicate<? extends Event>, int[]> evtLsnrs = ctx.config().getLocalEventListeners();
 
         if (evtLsnrs != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
index 26cf308..714cccb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
@@ -39,8 +39,6 @@ public class GridFailoverManager extends GridManagerAdapter<FailoverSpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         startSpi();
 
         if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
index ebe72de..3fe7839 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
@@ -45,8 +45,6 @@ public class GridIndexingManager extends GridManagerAdapter<IndexingSpi>
{
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         if (ctx.config().isDaemon())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
index 338d346..ac961b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
@@ -45,8 +45,6 @@ public class GridLoadBalancerManager extends GridManagerAdapter<LoadBalancingSpi
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         startSpi();
 
         if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
index 7cbb736..ef999d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
@@ -50,8 +50,6 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi>
{
 
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
-        super.start();
-
         if (ctx.config().isDaemon())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57fc321a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessor.java
index eb9f192..49de3a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessor.java
@@ -17,12 +17,9 @@
 
 package org.apache.ignite.internal.processors;
 
-import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.tostring.*;
 
-import java.util.*;
-
 /**
  * Interface for all processors.
  */


Mime
View raw message