ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [05/50] incubator-ignite git commit: #ignite-239: wip.
Date Mon, 02 Mar 2015 16:29:51 GMT
#ignite-239: wip.


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

Branch: refs/heads/ignite-368
Commit: 7e2b2e250ba70b5f936036d0d9003812f2a6d07d
Parents: 5dd1e80
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Feb 20 17:07:15 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Feb 20 17:07:15 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 58 ++++++++++----------
 1 file changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e2b2e25/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 501ff90..34f29a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -1302,12 +1302,7 @@ public class IgnitionEx {
         private void start0(GridStartContext startCtx) throws IgniteCheckedException {
             assert grid == null : "Grid is already started: " + name;
 
-            IgniteConfiguration cfg = startCtx.config();
-
-            if (cfg == null)
-                cfg = new IgniteConfiguration();
-
-            IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
+            IgniteConfiguration cfg = startCtx.config() != null ? startCtx.config() : new
IgniteConfiguration();
 
             String ggHome = cfg.getIgniteHome();
 
@@ -1329,6 +1324,8 @@ public class IgnitionEx {
             if (startCtx.configUrl() != null)
                 System.setProperty(IGNITE_CONFIG_URL, startCtx.configUrl().toString());
 
+            IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
+
             myCfg.setGridName(cfg.getGridName());
 
             UUID nodeId = cfg.getNodeId();
@@ -1405,16 +1402,6 @@ public class IgnitionEx {
 
             String[] p2pExclude = cfg.getPeerClassLoadingLocalClassPathExclude();
 
-            CommunicationSpi commSpi = cfg.getCommunicationSpi();
-            DiscoverySpi discoSpi = cfg.getDiscoverySpi();
-            EventStorageSpi evtSpi = cfg.getEventStorageSpi();
-            CollisionSpi colSpi = cfg.getCollisionSpi();
-            DeploymentSpi deploySpi = cfg.getDeploymentSpi();
-            CheckpointSpi[] cpSpi = cfg.getCheckpointSpi();
-            FailoverSpi[] failSpi = cfg.getFailoverSpi();
-            LoadBalancingSpi[] loadBalancingSpi = cfg.getLoadBalancingSpi();
-            SwapSpaceSpi swapspaceSpi = cfg.getSwapSpaceSpi();
-            IndexingSpi indexingSpi = cfg.getIndexingSpi();
 
             execSvc = new IgniteThreadPoolExecutor(
                 "pub-" + cfg.getGridName(),
@@ -1547,9 +1534,35 @@ public class IgnitionEx {
 
             myCfg.setPeerClassLoadingLocalClassPathExclude(p2pExclude);
 
+            // REST configuration.
+            myCfg.setConnectorConfiguration(clientCfg);
+
+            // Validate segmentation configuration.
+            GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
+
+            // 1. Warn on potential configuration problem: grid is not configured to wait
+            // for correct segment after segmentation happens.
+            if (!F.isEmpty(cfg.getSegmentationResolvers()) && segPlc == RESTART_JVM
&& !cfg.isWaitForSegmentOnStart()) {
+                U.warn(log, "Found potential configuration problem (forgot to enable waiting
for segment" +
+                    "on start?) [segPlc=" + segPlc + ", wait=false]");
+            }
+
+
+
             /*
              * Initialize default SPI implementations.
              */
+            CommunicationSpi commSpi = cfg.getCommunicationSpi();
+            DiscoverySpi discoSpi = cfg.getDiscoverySpi();
+            EventStorageSpi evtSpi = cfg.getEventStorageSpi();
+            CollisionSpi colSpi = cfg.getCollisionSpi();
+            DeploymentSpi deploySpi = cfg.getDeploymentSpi();
+            CheckpointSpi[] cpSpi = cfg.getCheckpointSpi();
+            FailoverSpi[] failSpi = cfg.getFailoverSpi();
+            LoadBalancingSpi[] loadBalancingSpi = cfg.getLoadBalancingSpi();
+            SwapSpaceSpi swapspaceSpi = cfg.getSwapSpaceSpi();
+            IndexingSpi indexingSpi = cfg.getIndexingSpi();
+
 
             if (commSpi == null)
                 commSpi = new TcpCommunicationSpi();
@@ -1614,19 +1627,6 @@ public class IgnitionEx {
             myCfg.setSwapSpaceSpi(swapspaceSpi);
             myCfg.setIndexingSpi(indexingSpi);
 
-            // REST configuration.
-            myCfg.setConnectorConfiguration(clientCfg);
-
-            // Validate segmentation configuration.
-            GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
-
-            // 1. Warn on potential configuration problem: grid is not configured to wait
-            // for correct segment after segmentation happens.
-            if (!F.isEmpty(cfg.getSegmentationResolvers()) && segPlc == RESTART_JVM
&& !cfg.isWaitForSegmentOnStart()) {
-                U.warn(log, "Found potential configuration problem (forgot to enable waiting
for segment" +
-                    "on start?) [segPlc=" + segPlc + ", wait=false]");
-            }
-
             CacheConfiguration[] cacheCfgs = cfg.getCacheConfiguration();
 
             final boolean hasHadoop = IgniteComponentType.HADOOP.inClassPath();


Mime
View raw message