You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2015/03/04 16:20:35 UTC
[1/2] incubator-ignite git commit: sp-2: api cleanup
Repository: incubator-ignite
Updated Branches:
refs/heads/sprint-2 9af256661 -> 9b2a034d5
sp-2: api cleanup
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ff5173d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ff5173d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ff5173d8
Branch: refs/heads/sprint-2
Commit: ff5173d8da38df8aaa5d83cad36f6c3d739c3164
Parents: 5d2a7c6
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Mar 4 18:17:40 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Mar 4 18:17:40 2015 +0300
----------------------------------------------------------------------
.../misc/lifecycle/LifecycleExample.java | 4 +-
.../apache/ignite/internal/IgniteKernal.java | 8 +--
.../apache/ignite/lifecycle/LifecycleBean.java | 36 +++++-----
.../ignite/lifecycle/LifecycleEventType.java | 20 +++---
.../internal/GridLifecycleBeanSelfTest.java | 76 ++++++++++----------
.../dht/GridCacheDhtPreloadBigDataSelfTest.java | 2 +-
.../dht/GridCacheDhtPreloadUnloadSelfTest.java | 2 +-
...achePartitionedPreloadLifecycleSelfTest.java | 8 +--
...CacheReplicatedPreloadLifecycleSelfTest.java | 8 +--
.../clock/GridTimeSyncProcessorSelfTest.java | 2 +-
.../colocation/GridTestLifecycleBean.java | 2 +-
.../loadtests/dsi/GridDsiLifecycleBean.java | 8 +--
.../ignite/internal/GridFactorySelfTest.java | 10 +--
13 files changed, 91 insertions(+), 95 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
index f973b18..497872a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
@@ -76,9 +76,9 @@ public final class LifecycleExample {
System.out.println(">>> Lifecycle event occurred: " + evt);
System.out.println(">>> Ignite name: " + ignite.name());
- if (evt == AFTER_GRID_START)
+ if (evt == AFTER_NODE_START)
isStarted = true;
- else if (evt == AFTER_GRID_STOP)
+ else if (evt == AFTER_NODE_STOP)
isStarted = false;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/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 cc4efa6..b9abdb5 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
@@ -699,7 +699,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
}
// Lifecycle notification.
- notifyLifecycleBeans(BEFORE_GRID_START);
+ notifyLifecycleBeans(BEFORE_NODE_START);
// Starts lifecycle aware components.
U.startLifecycleAware(lifecycleAwares(cfg));
@@ -814,7 +814,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
registerExecutorMBeans(execSvc, sysExecSvc, p2pExecSvc, mgmtExecSvc, restExecSvc);
// Lifecycle bean notifications.
- notifyLifecycleBeans(AFTER_GRID_START);
+ notifyLifecycleBeans(AFTER_NODE_START);
}
catch (Throwable e) {
IgniteSpiVersionCheckException verCheckErr = X.cause(e, IgniteSpiVersionCheckException.class);
@@ -1720,7 +1720,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
if (log.isDebugEnabled())
log.debug("Notifying lifecycle beans.");
- notifyLifecycleBeansEx(LifecycleEventType.BEFORE_GRID_STOP);
+ notifyLifecycleBeansEx(LifecycleEventType.BEFORE_NODE_STOP);
}
GridCacheProcessor cacheProcessor = ctx.cache();
@@ -1823,7 +1823,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
U.stopLifecycleAware(log, lifecycleAwares(cfg));
// Lifecycle notification.
- notifyLifecycleBeansEx(LifecycleEventType.AFTER_GRID_STOP);
+ notifyLifecycleBeansEx(LifecycleEventType.AFTER_NODE_STOP);
// Clean internal class/classloader caches to avoid stopped contexts held in memory.
OptimizedMarshaller.clearCache();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
index effa1b9..4132500 100644
--- a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
@@ -20,34 +20,34 @@ package org.apache.ignite.lifecycle;
import org.apache.ignite.*;
/**
- * A bean that reacts to grid lifecycle events defined in {@link LifecycleEventType}.
+ * A bean that reacts to node lifecycle events defined in {@link LifecycleEventType}.
* Use this bean whenever you need to plug some custom logic before or after
- * grid startup and stopping routines.
+ * node startup and stopping routines.
* <p>
* There are four events you can react to:
* <ul>
* <li>
- * {@link LifecycleEventType#BEFORE_GRID_START} invoked before grid startup
- * routine is initiated. Note that grid is not available during this event,
+ * {@link LifecycleEventType#BEFORE_NODE_START} invoked before node startup
+ * routine is initiated. Note that node is not available during this event,
* therefore if you injected a ignite instance via {@link org.apache.ignite.resources.IgniteInstanceResource}
* annotation, you cannot use it yet.
* </li>
* <li>
- * {@link LifecycleEventType#AFTER_GRID_START} invoked right after grid
- * has started. At this point, if you injected a grid instance via
+ * {@link LifecycleEventType#AFTER_NODE_START} invoked right after node
+ * has started. At this point, if you injected a node instance via
* {@link org.apache.ignite.resources.IgniteInstanceResource} annotation, you can start using it. Note that
- * you should not be using {@link org.apache.ignite.Ignition} to get grid instance from
+ * you should not be using {@link org.apache.ignite.Ignition} to get node instance from
* lifecycle bean.
* </li>
* <li>
- * {@link LifecycleEventType#BEFORE_GRID_STOP} invoked right before grid
- * stop routine is initiated. Grid is still available at this stage, so
+ * {@link LifecycleEventType#BEFORE_NODE_STOP} invoked right before node
+ * stop routine is initiated. Node is still available at this stage, so
* if you injected a ignite instance via {@link org.apache.ignite.resources.IgniteInstanceResource} annotation,
* you can use it.
* </li>
* <li>
- * {@link LifecycleEventType#AFTER_GRID_STOP} invoked right after grid
- * has stopped. Note that grid is not available during this event.
+ * {@link LifecycleEventType#AFTER_NODE_STOP} invoked right after node
+ * has stopped. Note that node is not available during this event.
* </li>
* </ul>
* <h1 class="header">Resource Injection</h1>
@@ -64,23 +64,19 @@ import org.apache.ignite.*;
* <p>
* <h1 class="header">Usage</h1>
* If you need to tie your application logic into Ignition lifecycle,
- * you can configure lifecycle beans via standard grid configuration, add your
+ * you can configure lifecycle beans via standard node configuration, add your
* application library dependencies into {@code IGNITE_HOME/libs} folder, and
* simply start {@code IGNITE_HOME/ignite.{sh|bat}} scripts.
* <p>
* <h1 class="header">Configuration</h1>
- * Grid lifecycle beans can be configured programmatically as follows:
+ * Node lifecycle beans can be configured programmatically as follows:
* <pre name="code" class="java">
- * Collection<GridLifecycleBean> lifecycleBeans = new ArrayList<GridLifecycleBean>();
+ * IgniteConfiguration cfg = new IgniteConfiguration();
*
- * Collections.addAll(lifecycleBeans, new FooBarLifecycleBean1(), new FooBarLifecycleBean2());
- *
- * GridConfiguration cfg = new GridConfiguration();
- *
- * cfg.setLifecycleBeans(lifecycleBeans);
+ * cfg.setLifecycleBeans(new FooBarLifecycleBean1(), new FooBarLifecycleBean2());
*
* // Start grid with given configuration.
- * G.start(cfg);
+ * Ignition.start(cfg);
* </pre>
* or from Spring XML configuration file as follows:
* <pre name="code" class="xml">
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleEventType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleEventType.java b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleEventType.java
index d7b7478..3bf8379 100644
--- a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleEventType.java
+++ b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleEventType.java
@@ -20,36 +20,36 @@ package org.apache.ignite.lifecycle;
import org.jetbrains.annotations.*;
/**
- * Grid lifecycle event types. These events are used to notify lifecycle beans
- * about changes in grid lifecycle state.
+ * Node lifecycle event types. These events are used to notify lifecycle beans
+ * about changes in node lifecycle state.
* <p>
* For more information and detailed examples refer to {@link org.apache.ignite.lifecycle.LifecycleBean}
* documentation.
*/
public enum LifecycleEventType {
/**
- * Invoked before grid startup routine. Grid is not
+ * Invoked before node startup routine. Node is not
* initialized and cannot be used.
*/
- BEFORE_GRID_START,
+ BEFORE_NODE_START,
/**
- * Invoked after grid startup is complete. Grid is fully
+ * Invoked after node startup is complete. Node is fully
* initialized and fully functional.
*/
- AFTER_GRID_START,
+ AFTER_NODE_START,
/**
- * Invoked before grid stopping routine. Grid is fully functional
+ * Invoked before node stopping routine. Node is fully functional
* at this point.
*/
- BEFORE_GRID_STOP,
+ BEFORE_NODE_STOP,
/**
- * Invoked after grid had stopped. Grid is stopped and
+ * Invoked after node had stopped. Node is stopped and
* cannot be used.
*/
- AFTER_GRID_STOP;
+ AFTER_NODE_STOP;
/** Enumerated values. */
private static final LifecycleEventType[] VALS = values();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
index 5cbdc66..5821ef6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
@@ -57,10 +57,10 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
try {
assertEquals(IgniteState.STARTED, G.state(getTestGridName()));
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(0, bean.count(BEFORE_GRID_STOP));
- assertEquals(0, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(0, bean.count(BEFORE_NODE_STOP));
+ assertEquals(0, bean.count(AFTER_NODE_STOP));
}
finally {
stopAllGrids();
@@ -69,10 +69,10 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
assertEquals(IgniteState.STOPPED, G.state(getTestGridName()));
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(1, bean.count(BEFORE_GRID_STOP));
- assertEquals(1, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(1, bean.count(BEFORE_NODE_STOP));
+ assertEquals(1, bean.count(AFTER_NODE_STOP));
}
/**
@@ -108,7 +108,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
private void checkBeforeStart(boolean gridErr) throws Exception {
- bean = new LifeCycleExceptionBean(BEFORE_GRID_START, gridErr);
+ bean = new LifeCycleExceptionBean(BEFORE_NODE_START, gridErr);
try {
startGrid();
@@ -124,10 +124,10 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
stopAllGrids();
}
- assertEquals(0, bean.count(BEFORE_GRID_START));
- assertEquals(0, bean.count(AFTER_GRID_START));
- assertEquals(0, bean.count(BEFORE_GRID_STOP));
- assertEquals(1, bean.count(AFTER_GRID_STOP));
+ assertEquals(0, bean.count(BEFORE_NODE_START));
+ assertEquals(0, bean.count(AFTER_NODE_START));
+ assertEquals(0, bean.count(BEFORE_NODE_STOP));
+ assertEquals(1, bean.count(AFTER_NODE_STOP));
}
/**
@@ -135,7 +135,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
private void checkAfterStart(boolean gridErr) throws Exception {
- bean = new LifeCycleExceptionBean(AFTER_GRID_START, gridErr);
+ bean = new LifeCycleExceptionBean(AFTER_NODE_START, gridErr);
try {
startGrid();
@@ -151,58 +151,58 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest {
stopAllGrids();
}
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(0, bean.count(AFTER_GRID_START));
- assertEquals(1, bean.count(BEFORE_GRID_STOP));
- assertEquals(1, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(0, bean.count(AFTER_NODE_START));
+ assertEquals(1, bean.count(BEFORE_NODE_STOP));
+ assertEquals(1, bean.count(AFTER_NODE_STOP));
}
/**
* @throws Exception If failed.
*/
public void testGridErrorBeforeStop() throws Exception {
- checkOnStop(BEFORE_GRID_STOP, true);
+ checkOnStop(BEFORE_NODE_STOP, true);
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(0, bean.count(BEFORE_GRID_STOP));
- assertEquals(1, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(0, bean.count(BEFORE_NODE_STOP));
+ assertEquals(1, bean.count(AFTER_NODE_STOP));
}
/**
* @throws Exception If failed.
*/
public void testOtherErrorBeforeStop() throws Exception {
- checkOnStop(BEFORE_GRID_STOP, false);
+ checkOnStop(BEFORE_NODE_STOP, false);
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(0, bean.count(BEFORE_GRID_STOP));
- assertEquals(1, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(0, bean.count(BEFORE_NODE_STOP));
+ assertEquals(1, bean.count(AFTER_NODE_STOP));
}
/**
* @throws Exception If failed.
*/
public void testGridErrorAfterStop() throws Exception {
- checkOnStop(AFTER_GRID_STOP, true);
+ checkOnStop(AFTER_NODE_STOP, true);
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(1, bean.count(BEFORE_GRID_STOP));
- assertEquals(0, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(1, bean.count(BEFORE_NODE_STOP));
+ assertEquals(0, bean.count(AFTER_NODE_STOP));
}
/**
* @throws Exception If failed.
*/
public void testOtherErrorAfterStop() throws Exception {
- checkOnStop(AFTER_GRID_STOP, false);
+ checkOnStop(AFTER_NODE_STOP, false);
- assertEquals(1, bean.count(BEFORE_GRID_START));
- assertEquals(1, bean.count(AFTER_GRID_START));
- assertEquals(1, bean.count(BEFORE_GRID_STOP));
- assertEquals(0, bean.count(AFTER_GRID_STOP));
+ assertEquals(1, bean.count(BEFORE_NODE_START));
+ assertEquals(1, bean.count(AFTER_NODE_START));
+ assertEquals(1, bean.count(BEFORE_NODE_STOP));
+ assertEquals(0, bean.count(AFTER_NODE_STOP));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
index 587dff1..3769f8d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
@@ -166,7 +166,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest {
private Ignite ignite;
@Override public void onLifecycleEvent(LifecycleEventType evt) {
- if (evt == LifecycleEventType.AFTER_GRID_START) {
+ if (evt == LifecycleEventType.AFTER_NODE_START) {
IgniteCache<Integer, byte[]> c = ignite.jcache(null);
if (c.putIfAbsent(-1, new byte[1])) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
index 9f6e1a4..d454845 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
@@ -264,7 +264,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest {
private Ignite ignite;
@Override public void onLifecycleEvent(LifecycleEventType evt) {
- if (evt == LifecycleEventType.AFTER_GRID_START) {
+ if (evt == LifecycleEventType.AFTER_NODE_START) {
IgniteCache<Integer, String> c = ignite.jcache(null);
if (c.putIfAbsent(-1, "true")) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
index 2c510c5..1699ed3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
@@ -85,7 +85,7 @@ public class GridCachePartitionedPreloadLifecycleSelfTest extends GridCachePrelo
@Override public void onLifecycleEvent(LifecycleEventType evt) {
switch (evt) {
- case AFTER_GRID_START: {
+ case AFTER_NODE_START: {
IgniteCache<Object, MyValue> c1 = ignite.jcache("one");
IgniteCache<Object, MyValue> c2 = ignite.jcache("two");
@@ -118,9 +118,9 @@ public class GridCachePartitionedPreloadLifecycleSelfTest extends GridCachePrelo
break;
}
- case BEFORE_GRID_START:
- case BEFORE_GRID_STOP:
- case AFTER_GRID_STOP: {
+ case BEFORE_NODE_START:
+ case BEFORE_NODE_STOP:
+ case AFTER_NODE_STOP: {
info("Lifecycle event: " + evt);
break;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
index 6c417d3..063103b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
@@ -86,7 +86,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa
@Override public void onLifecycleEvent(LifecycleEventType evt) {
switch (evt) {
- case AFTER_GRID_START: {
+ case AFTER_NODE_START: {
IgniteCache<Object, MyValue> c1 = ignite.jcache("one");
IgniteCache<Object, MyValue> c2 = ignite.jcache("two");
@@ -121,9 +121,9 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa
break;
}
- case BEFORE_GRID_START:
- case BEFORE_GRID_STOP:
- case AFTER_GRID_STOP: {
+ case BEFORE_NODE_START:
+ case BEFORE_NODE_STOP:
+ case AFTER_NODE_STOP: {
info("Lifecycle event: " + evt);
break;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
index b625492..9b81717 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
@@ -196,7 +196,7 @@ public class GridTimeSyncProcessorSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override public void onLifecycleEvent(LifecycleEventType evt) {
- if (evt == LifecycleEventType.BEFORE_GRID_START)
+ if (evt == LifecycleEventType.BEFORE_NODE_START)
((GridKernalContextImpl)((IgniteKernal)g).context()).timeSource(new TimeShiftClockSource(delta));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
index 20f086f..a3ebc32 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
@@ -31,7 +31,7 @@ public class GridTestLifecycleBean implements LifecycleBean {
/** {@inheritDoc} */
@Override public void onLifecycleEvent(LifecycleEventType type) {
- if (type == LifecycleEventType.AFTER_GRID_START) {
+ if (type == LifecycleEventType.AFTER_NODE_START) {
IgniteCache<GridTestKey, Long> cache = g.jcache("partitioned");
assert cache != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
index c0f5443..a70833b 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
@@ -43,18 +43,18 @@ public class GridDsiLifecycleBean implements LifecycleBean {
@Override public void onLifecycleEvent(LifecycleEventType evt) {
try {
switch (evt) {
- case BEFORE_GRID_START:
+ case BEFORE_NODE_START:
break;
- case AFTER_GRID_START:
+ case AFTER_NODE_START:
ignite.atomicSequence("ID", 0, true);
break;
- case BEFORE_GRID_STOP:
+ case BEFORE_NODE_STOP:
break;
- case AFTER_GRID_STOP:
+ case AFTER_NODE_STOP:
break;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff5173d8/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index 3b09940..ab3d699 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -177,10 +177,10 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
List<String> gridNames = bean.getGridNames();
- assert evts.get(0) == LifecycleEventType.BEFORE_GRID_START : "Invalid lifecycle event: " + evts.get(0);
- assert evts.get(1) == LifecycleEventType.AFTER_GRID_START : "Invalid lifecycle event: " + evts.get(1);
- assert evts.get(2) == LifecycleEventType.BEFORE_GRID_STOP : "Invalid lifecycle event: " + evts.get(2);
- assert evts.get(3) == LifecycleEventType.AFTER_GRID_STOP : "Invalid lifecycle event: " + evts.get(3);
+ assert evts.get(0) == LifecycleEventType.BEFORE_NODE_START : "Invalid lifecycle event: " + evts.get(0);
+ assert evts.get(1) == LifecycleEventType.AFTER_NODE_START : "Invalid lifecycle event: " + evts.get(1);
+ assert evts.get(2) == LifecycleEventType.BEFORE_NODE_STOP : "Invalid lifecycle event: " + evts.get(2);
+ assert evts.get(3) == LifecycleEventType.AFTER_NODE_STOP : "Invalid lifecycle event: " + evts.get(3);
checkGridNameEquals(gridNames.get(0), gridName);
checkGridNameEquals(gridNames.get(1), gridName);
@@ -645,7 +645,7 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
try {
checkState(ignite.name(),
- evt == LifecycleEventType.AFTER_GRID_START || evt == LifecycleEventType.BEFORE_GRID_STOP);
+ evt == LifecycleEventType.AFTER_NODE_START || evt == LifecycleEventType.BEFORE_NODE_STOP);
}
catch (Throwable e) {
log.error("Lifecycle bean failed state check: " + this, e);
[2/2] incubator-ignite git commit: Merge remote-tracking branch
'origin/sprint-2' into sprint-2
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9b2a034d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9b2a034d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9b2a034d
Branch: refs/heads/sprint-2
Commit: 9b2a034d5fd1a8c56701fbce99937b0b707927dc
Parents: ff5173d 9af2566
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Mar 4 18:20:10 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Mar 4 18:20:10 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/igfs/IgfsEx.java | 6 +
.../visor/node/VisorIgfsConfiguration.java | 7 +-
.../hadoop/IgfsHadoopFileSystemWrapper.java | 44 +-
.../igfs/hadoop/v1/IgfsHadoopFileSystem.java | 48 +-
.../igfs/hadoop/v2/IgfsHadoopFileSystem.java | 54 +-
.../hadoop/SecondaryFileSystemProvider.java | 111 ++++
...oopSecondaryFileSystemConfigurationTest.java | 541 +++++++++++++++++++
.../testsuites/IgniteHadoopTestSuite.java | 2 +
.../schema/generator/SnippetGenerator.java | 2 +-
.../schema/parser/DatabaseMetadataParser.java | 7 +-
10 files changed, 718 insertions(+), 104 deletions(-)
----------------------------------------------------------------------