You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/07/04 15:07:48 UTC

[01/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-591 bb8dcf9ce -> b84fdaa50


Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621


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

Branch: refs/heads/ignite-591
Commit: ac93958d21ef33d98bb223904131bf1bf54a7cf2
Parents: 0cb2d97 68c21ac
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 17:40:01 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 17:40:01 2015 -0700

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../discovery/GridDiscoveryManager.java         |   6 +
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../processors/cache/GridCacheProcessor.java    |  62 ++++--
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../apache/ignite/internal/visor/VisorJob.java  |   2 +
 .../internal/visor/log/VisorLogSearchTask.java  |   2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   4 +
 .../util/VisorClusterGroupEmptyException.java   |   6 +-
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ------------
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 +++++++++++++++++++
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 pom.xml                                         |  12 +-
 14 files changed, 282 insertions(+), 147 deletions(-)
----------------------------------------------------------------------



[50/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-591

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-591


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

Branch: refs/heads/ignite-591
Commit: b84fdaa508592ad9950fd17718301ae4be22953f
Parents: bb8dcf9 f72b291
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 16:07:19 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 16:07:19 2015 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 bin/ignite.bat                                  |   8 +-
 bin/ignite.sh                                   |   6 +-
 bin/include/parseargs.bat                       |   1 +
 bin/include/parseargs.sh                        |   3 +
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../configuration/CacheConfiguration.java       | 105 +++---
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   1 -
 .../managers/communication/GridIoManager.java   | 173 ++++++---
 .../managers/communication/GridIoMessage.java   |  15 +-
 .../managers/communication/GridIoPolicy.java    |  32 +-
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../processors/cache/CacheOperationContext.java |  44 ++-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheAdapter.java      |  91 +++--
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProcessor.java    |  62 ++-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++-----
 .../processors/cache/GridCacheUtils.java        |  42 +++
 .../processors/cache/IgniteCacheFutureImpl.java |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |  38 +-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 ++++++++-
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +-
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +-
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../internal/util/future/IgniteFutureImpl.java  |  18 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../util/nio/GridNioMessageTracker.java         |  23 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   7 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  76 +++-
 .../startup/cmdline/CommandLineStartup.java     |   3 +-
 .../startup/cmdline/CommandLineTransformer.java |   9 +
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../core/src/test/config/spark/spark-config.xml |  46 +++
 modules/core/src/test/config/tests.properties   |   6 +-
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 ++++++++++++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ------
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 ++++++++++
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 ++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 ++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../GridCachePartitionedFailoverSelfTest.java   |   5 +
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../GridP2PContinuousDeploymentSelfTest.java    |   2 -
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 -
 modules/docker/Dockerfile                       |  55 +++
 modules/docker/README.txt                       |  11 +
 modules/docker/build_users_libs.sh              |  39 ++
 modules/docker/download_ignite.sh               |  49 +++
 modules/docker/execute.sh                       |  62 +++
 modules/docker/run.sh                           |  34 ++
 modules/extdata/p2p/pom.xml                     |   4 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 ++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 +++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 +++
 .../src/main/resources/gar-example.properties   |  18 +
 modules/extdata/uri/pom.xml                     |  62 ++-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 ++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 ++
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/kafka/pom.xml                           | 116 ++++++
 .../ignite/stream/kafka/KafkaStreamer.java      | 220 +++++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |  37 ++
 .../stream/kafka/KafkaEmbeddedBroker.java       | 378 +++++++++++++++++++
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 227 +++++++++++
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 +++
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 ++-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 +
 modules/spring/pom.xml                          |   2 +-
 .../util/spring/IgniteSpringHelperImpl.java     |  72 +++-
 .../IgniteExcludeInConfigurationTest.java       |  78 ++++
 .../org/apache/ignite/spring/sprint-exclude.xml |  57 +++
 .../testsuites/IgniteSpringTestSuite.java       |   2 +
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 .../ignite/visor/commands/VisorConsole.scala    |   3 +-
 .../visor/commands/open/VisorOpenCommand.scala  | 319 ++++++++++++++++
 .../scala/org/apache/ignite/visor/visor.scala   | 230 +----------
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |   2 +
 .../commands/kill/VisorKillCommandSpec.scala    |   1 +
 .../commands/start/VisorStartCommandSpec.scala  |   1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |   1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |   1 +
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |  15 +-
 166 files changed, 4204 insertions(+), 929 deletions(-)
----------------------------------------------------------------------



[37/50] incubator-ignite git commit: # ignite_1055

Posted by se...@apache.org.
# ignite_1055


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

Branch: refs/heads/ignite-591
Commit: 7030ee191f9e229c73a85cb48e01c8255a53a0cc
Parents: b437ec7
Author: Atri <at...@gmail.com>
Authored: Mon Jun 29 21:44:01 2015 +0530
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jul 2 14:05:50 2015 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                              | 8 ++++++--
 bin/ignite.sh                                               | 6 +++++-
 bin/include/parseargs.bat                                   | 1 +
 bin/include/parseargs.sh                                    | 3 +++
 .../ignite/startup/cmdline/CommandLineTransformer.java      | 9 +++++++++
 5 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7030ee19/bin/ignite.bat
----------------------------------------------------------------------
diff --git a/bin/ignite.bat b/bin/ignite.bat
index 1a4a58c..43cc58b 100644
--- a/bin/ignite.bat
+++ b/bin/ignite.bat
@@ -129,8 +129,12 @@ set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE%
 ::
 :: You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
 ::
-for /F "tokens=*" %%A in ('""%JAVA_HOME%\bin\java" -cp %CP% org.apache.ignite.internal.util.portscanner.GridJmxPortFinder"') do (
-    set JMX_PORT=%%A
+:: This is executed if -nojmx is not specified
+::
+if not "%NO_JMX%" == "1" (
+    for /F "tokens=*" %%A in ('""%JAVA_HOME%\bin\java" -cp %CP% org.apache.ignite.internal.util.portscanner.GridJmxPortFinder"') do (
+        set JMX_PORT=%%A
+    )
 )
 
 ::

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7030ee19/bin/ignite.sh
----------------------------------------------------------------------
diff --git a/bin/ignite.sh b/bin/ignite.sh
index 660a80f..7fbca57 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -71,7 +71,11 @@ RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
 #
 # You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
 #
-findAvailableJmxPort
+# This is executed when -nojmx is not specified
+#
+if [ "${NOJMX}" == "0" ] ; then
+    findAvailableJmxPort
+fi
 
 # Mac OS specific support to display correct name in the dock.
 osname=`uname`

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7030ee19/bin/include/parseargs.bat
----------------------------------------------------------------------
diff --git a/bin/include/parseargs.bat b/bin/include/parseargs.bat
index e8c764a..c4b35d2 100644
--- a/bin/include/parseargs.bat
+++ b/bin/include/parseargs.bat
@@ -24,6 +24,7 @@
 :: QUIET
 :: NO_PAUSE
 :: JVM_XOPTS
+:: NOJMX
 ::
 :: Script setups reasonable defaults (see below) for omitted arguments.
 ::

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7030ee19/bin/include/parseargs.sh
----------------------------------------------------------------------
diff --git a/bin/include/parseargs.sh b/bin/include/parseargs.sh
index 8045348..3ab255e 100755
--- a/bin/include/parseargs.sh
+++ b/bin/include/parseargs.sh
@@ -22,6 +22,7 @@
 # INTERACTIVE
 # QUIET
 # JVM_XOPTS
+# NOJMX
 #
 # Script setups reasonable defaults (see below) for omitted arguments.
 #
@@ -35,6 +36,7 @@
 
 CONFIG=${DEFAULT_CONFIG}
 INTERACTIVE="0"
+NOJMX="0"
 QUIET="-DIGNITE_QUIET=true"
 JVM_XOPTS=""
 
@@ -42,6 +44,7 @@ while [ $# -gt 0 ]
 do
     case "$1" in
         -i) INTERACTIVE="1";;
+        -nojmx) NOJMX="1";;
         -v) QUIET="-DIGNITE_QUIET=false";;
         -J*) JVM_XOPTS="$JVM_XOPTS ${1:2}";;
         *) CONFIG="$1";;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7030ee19/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
index 6b2c809..ae0c587 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
@@ -56,6 +56,9 @@ public class CommandLineTransformer {
     /** No pause mode. */
     private boolean noPause;
 
+    /** No JMX mode. */
+    private boolean noJMX;
+
     /** Supported parameter, parsed manually. */
     private String jvmOptions = "";
 
@@ -132,6 +135,11 @@ public class CommandLineTransformer {
 
                     break;
 
+                case "-nojmx":
+                    noJMX = true;
+
+                    break;
+
                 default:
                     argsList.add(arg);
             }
@@ -152,6 +160,7 @@ public class CommandLineTransformer {
         addArgWithValue(sb, "INTERACTIVE", formatBooleanValue(interactive));
         addArgWithValue(sb, "QUIET", "-DIGNITE_QUIET=" + !verbose);
         addArgWithValue(sb, "NO_PAUSE", formatBooleanValue(noPause));
+        addArgWithValue(sb, "NO_JMX", formatBooleanValue(noJMX));
 
         parseJvmOptionsAndSpringConfig(args);
 


[06/50] incubator-ignite git commit: IGNITE-1063 Added generic for chaining setters.

Posted by se...@apache.org.
IGNITE-1063 Added generic for chaining setters.


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

Branch: refs/heads/ignite-591
Commit: ef7a35ce9afb830c2e02b624eb3f3298f66e6129
Parents: bade9f1
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jun 30 12:31:13 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jun 30 12:31:13 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       | 105 ++++++++++---------
 .../configuration/NearCacheConfiguration.java   |  10 +-
 2 files changed, 61 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef7a35ce/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 7af4974..e2308f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -419,7 +419,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param name Cache name. May be <tt>null</tt>, but may not be empty string.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setName(String name) {
+    public CacheConfiguration<K, V> setName(String name) {
         A.ensure(name == null || !name.isEmpty(), "Name cannot be null or empty.");
 
         this.name = name;
@@ -444,7 +444,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictPlc Cache expiration policy.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictionPolicy(@Nullable EvictionPolicy evictPlc) {
+    public CacheConfiguration<K, V> setEvictionPolicy(@Nullable EvictionPolicy evictPlc) {
         this.evictPlc = evictPlc;
 
         return this;
@@ -461,7 +461,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param nearCfg Near cache configuration.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setNearConfiguration(NearCacheConfiguration<K, V> nearCfg) {
+    public CacheConfiguration<K, V> setNearConfiguration(NearCacheConfiguration<K, V> nearCfg) {
         this.nearCfg = nearCfg;
 
         return this;
@@ -483,7 +483,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeSync Write synchronization mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync) {
+    public CacheConfiguration<K, V> setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync) {
         this.writeSync = writeSync;
 
         return this;
@@ -504,7 +504,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param nodeFilter Predicate specifying on which nodes the cache should be started.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter) {
+    public CacheConfiguration<K, V> setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter) {
         this.nodeFilter = nodeFilter;
 
         return this;
@@ -536,7 +536,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictSync {@code true} if synchronized, {@code false} if not.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictSynchronized(boolean evictSync) {
+    public CacheConfiguration<K, V> setEvictSynchronized(boolean evictSync) {
         this.evictSync = evictSync;
 
         return this;
@@ -559,7 +559,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictKeyBufSize Eviction key buffer size.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
+    public CacheConfiguration<K, V> setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
         this.evictKeyBufSize = evictKeyBufSize;
 
         return this;
@@ -593,7 +593,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictSyncConcurrencyLvl Concurrency level for synchronized evictions.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
+    public CacheConfiguration<K, V> setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
         this.evictSyncConcurrencyLvl = evictSyncConcurrencyLvl;
 
         return this;
@@ -619,7 +619,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictSyncTimeout Timeout for synchronized evictions.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictSynchronizedTimeout(long evictSyncTimeout) {
+    public CacheConfiguration<K, V> setEvictSynchronizedTimeout(long evictSyncTimeout) {
         this.evictSyncTimeout = evictSyncTimeout;
 
         return this;
@@ -651,7 +651,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictMaxOverflowRatio Maximum eviction overflow ratio.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
+    public CacheConfiguration<K, V> setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
         this.evictMaxOverflowRatio = evictMaxOverflowRatio;
 
         return this;
@@ -680,7 +680,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param evictFilter Eviction filter.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEvictionFilter(EvictionFilter<K, V> evictFilter) {
+    public CacheConfiguration<K, V> setEvictionFilter(EvictionFilter<K, V> evictFilter) {
         this.evictFilter = evictFilter;
 
         return this;
@@ -709,7 +709,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #isEagerTtl()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setEagerTtl(boolean eagerTtl) {
+    public CacheConfiguration<K, V> setEagerTtl(boolean eagerTtl) {
         this.eagerTtl = eagerTtl;
 
         return this;
@@ -731,7 +731,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param startSize Cache start size.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setStartSize(int startSize) {
+    public CacheConfiguration<K, V> setStartSize(int startSize) {
         this.startSize = startSize;
 
         return this;
@@ -775,7 +775,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param loadPrevVal Load previous value flag.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setLoadPreviousValue(boolean loadPrevVal) {
+    public CacheConfiguration<K, V> setLoadPreviousValue(boolean loadPrevVal) {
         this.loadPrevVal = loadPrevVal;
 
         return this;
@@ -798,7 +798,8 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @return {@code this} for chaining.
      */
     @SuppressWarnings("unchecked")
-    public CacheConfiguration setCacheStoreFactory(Factory<? extends CacheStore<? super K, ? super V>> storeFactory) {
+    public CacheConfiguration<K, V> setCacheStoreFactory(
+        Factory<? extends CacheStore<? super K, ? super V>> storeFactory) {
         this.storeFactory = storeFactory;
 
         return this;
@@ -819,7 +820,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param aff Cache key affinity.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setAffinity(AffinityFunction aff) {
+    public CacheConfiguration<K, V> setAffinity(AffinityFunction aff) {
         this.aff = aff;
 
         return this;
@@ -842,7 +843,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param cacheMode Caching mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setCacheMode(CacheMode cacheMode) {
+    public CacheConfiguration<K, V> setCacheMode(CacheMode cacheMode) {
         this.cacheMode = cacheMode;
 
         return this;
@@ -865,7 +866,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param atomicityMode Cache atomicity mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setAtomicityMode(CacheAtomicityMode atomicityMode) {
+    public CacheConfiguration<K, V> setAtomicityMode(CacheAtomicityMode atomicityMode) {
         this.atomicityMode = atomicityMode;
 
         return this;
@@ -888,7 +889,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param atomicWriteOrderMode Cache write ordering mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setAtomicWriteOrderMode(CacheAtomicWriteOrderMode atomicWriteOrderMode) {
+    public CacheConfiguration<K, V> setAtomicWriteOrderMode(CacheAtomicWriteOrderMode atomicWriteOrderMode) {
         this.atomicWriteOrderMode = atomicWriteOrderMode;
 
         return this;
@@ -913,7 +914,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param backups Number of backup nodes for one partition.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setBackups(int backups) {
+    public CacheConfiguration<K, V> setBackups(int backups) {
         this.backups = backups;
 
         return this;
@@ -935,7 +936,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param dfltLockTimeout Default lock timeout.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setDefaultLockTimeout(long dfltLockTimeout) {
+    public CacheConfiguration<K, V> setDefaultLockTimeout(long dfltLockTimeout) {
         this.dfltLockTimeout = dfltLockTimeout;
 
         return this;
@@ -956,7 +957,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param invalidate Flag to set this cache into invalidation-based mode. Default value is {@code false}.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setInvalidate(boolean invalidate) {
+    public CacheConfiguration<K, V> setInvalidate(boolean invalidate) {
         this.invalidate = invalidate;
 
         return this;
@@ -978,7 +979,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *      receive JTA transaction manager.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setTransactionManagerLookupClassName(String tmLookupClsName) {
+    public CacheConfiguration<K, V> setTransactionManagerLookupClassName(String tmLookupClsName) {
         this.tmLookupClsName = tmLookupClsName;
 
         return this;
@@ -990,7 +991,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceMode Rebalance mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceMode(CacheRebalanceMode rebalanceMode) {
+    public CacheConfiguration<K, V> setRebalanceMode(CacheRebalanceMode rebalanceMode) {
         this.rebalanceMode = rebalanceMode;
 
         return this;
@@ -1033,7 +1034,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getRebalanceOrder()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceOrder(int rebalanceOrder) {
+    public CacheConfiguration<K, V> setRebalanceOrder(int rebalanceOrder) {
         this.rebalanceOrder = rebalanceOrder;
 
         return this;
@@ -1057,7 +1058,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceBatchSize Rebalance batch size.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) {
+    public CacheConfiguration<K, V> setRebalanceBatchSize(int rebalanceBatchSize) {
         this.rebalanceBatchSize = rebalanceBatchSize;
 
         return this;
@@ -1079,7 +1080,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param swapEnabled {@code True} if swap storage is enabled.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setSwapEnabled(boolean swapEnabled) {
+    public CacheConfiguration<K, V> setSwapEnabled(boolean swapEnabled) {
         this.swapEnabled = swapEnabled;
 
         return this;
@@ -1108,7 +1109,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getMaxConcurrentAsyncOperations()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps) {
+    public CacheConfiguration<K, V> setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps) {
         this.maxConcurrentAsyncOps = maxConcurrentAsyncOps;
 
         return this;
@@ -1131,7 +1132,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeBehindEnabled {@code true} if write-behind is enabled.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteBehindEnabled(boolean writeBehindEnabled) {
+    public CacheConfiguration<K, V> setWriteBehindEnabled(boolean writeBehindEnabled) {
         this.writeBehindEnabled = writeBehindEnabled;
 
         return this;
@@ -1159,7 +1160,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getWriteBehindFlushSize()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteBehindFlushSize(int writeBehindFlushSize) {
+    public CacheConfiguration<K, V> setWriteBehindFlushSize(int writeBehindFlushSize) {
         this.writeBehindFlushSize = writeBehindFlushSize;
 
         return this;
@@ -1188,7 +1189,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getWriteBehindFlushFrequency()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteBehindFlushFrequency(long writeBehindFlushFreq) {
+    public CacheConfiguration<K, V> setWriteBehindFlushFrequency(long writeBehindFlushFreq) {
         this.writeBehindFlushFreq = writeBehindFlushFreq;
 
         return this;
@@ -1215,7 +1216,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getWriteBehindFlushThreadCount()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt) {
+    public CacheConfiguration<K, V> setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt) {
         this.writeBehindFlushThreadCnt = writeBehindFlushThreadCnt;
 
         return this;
@@ -1242,7 +1243,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getWriteBehindBatchSize()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setWriteBehindBatchSize(int writeBehindBatchSize) {
+    public CacheConfiguration<K, V> setWriteBehindBatchSize(int writeBehindBatchSize) {
         this.writeBehindBatchSize = writeBehindBatchSize;
 
         return this;
@@ -1267,7 +1268,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalancePoolSize Size of rebalancing thread pool.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceThreadPoolSize(int rebalancePoolSize) {
+    public CacheConfiguration<K, V> setRebalanceThreadPoolSize(int rebalancePoolSize) {
         this.rebalancePoolSize = rebalancePoolSize;
 
         return this;
@@ -1290,7 +1291,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceTimeout Rebalance timeout (ms).
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceTimeout(long rebalanceTimeout) {
+    public CacheConfiguration<K, V> setRebalanceTimeout(long rebalanceTimeout) {
         this.rebalanceTimeout = rebalanceTimeout;
 
         return this;
@@ -1328,7 +1329,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceDelay Rebalance delay to set.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceDelay(long rebalanceDelay) {
+    public CacheConfiguration<K, V> setRebalanceDelay(long rebalanceDelay) {
         this.rebalanceDelay = rebalanceDelay;
 
         return this;
@@ -1364,7 +1365,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * {@code 0} to disable throttling.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setRebalanceThrottle(long rebalanceThrottle) {
+    public CacheConfiguration<K, V> setRebalanceThrottle(long rebalanceThrottle) {
         this.rebalanceThrottle = rebalanceThrottle;
 
         return this;
@@ -1391,7 +1392,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param affMapper Affinity mapper.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setAffinityMapper(AffinityKeyMapper affMapper) {
+    public CacheConfiguration<K, V> setAffinityMapper(AffinityKeyMapper affMapper) {
         this.affMapper = affMapper;
 
         return this;
@@ -1438,7 +1439,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setOffHeapMaxMemory(long offHeapMaxMem) {
+    public CacheConfiguration<K, V> setOffHeapMaxMemory(long offHeapMaxMem) {
         this.offHeapMaxMem = offHeapMaxMem;
 
         return this;
@@ -1462,7 +1463,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param memMode Memory mode.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setMemoryMode(CacheMemoryMode memMode) {
+    public CacheConfiguration<K, V> setMemoryMode(CacheMemoryMode memMode) {
         this.memMode = memMode;
 
         return this;
@@ -1484,7 +1485,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param interceptor Cache interceptor.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setInterceptor(CacheInterceptor<K, V> interceptor) {
+    public CacheConfiguration<K, V> setInterceptor(CacheInterceptor<K, V> interceptor) {
         this.interceptor = interceptor;
 
         return this;
@@ -1505,7 +1506,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param typeMeta Collection of type metadata.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setTypeMetadata(Collection<CacheTypeMetadata> typeMeta) {
+    public CacheConfiguration<K, V> setTypeMetadata(Collection<CacheTypeMetadata> typeMeta) {
         this.typeMeta = typeMeta;
 
         return this;
@@ -1530,7 +1531,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param readFromBackup {@code true} to allow reads from backups.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setReadFromBackup(boolean readFromBackup) {
+    public CacheConfiguration<K, V> setReadFromBackup(boolean readFromBackup) {
         this.readFromBackup = readFromBackup;
 
         return this;
@@ -1554,7 +1555,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #isCopyOnRead
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setCopyOnRead(boolean cpOnRead) {
+    public CacheConfiguration<K, V> setCopyOnRead(boolean cpOnRead) {
         this.cpOnRead = cpOnRead;
 
         return this;
@@ -1567,7 +1568,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param cls One or more classes with SQL functions.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setSqlFunctionClasses(Class<?>... cls) {
+    public CacheConfiguration<K, V> setSqlFunctionClasses(Class<?>... cls) {
         this.sqlFuncCls = cls;
 
         return this;
@@ -1598,7 +1599,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param longQryWarnTimeout Timeout in milliseconds.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setLongQueryWarningTimeout(long longQryWarnTimeout) {
+    public CacheConfiguration<K, V> setLongQueryWarningTimeout(long longQryWarnTimeout) {
         this.longQryWarnTimeout = longQryWarnTimeout;
 
         return this;
@@ -1623,7 +1624,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param sqlEscapeAll Flag value.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setSqlEscapeAll(boolean sqlEscapeAll) {
+    public CacheConfiguration<K, V> setSqlEscapeAll(boolean sqlEscapeAll) {
         this.sqlEscapeAll = sqlEscapeAll;
 
         return this;
@@ -1660,7 +1661,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param indexedTypes Key and value type pairs.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setIndexedTypes(Class<?>... indexedTypes) {
+    public CacheConfiguration<K, V> setIndexedTypes(Class<?>... indexedTypes) {
         A.ensure(indexedTypes == null || (indexedTypes.length & 1) == 0,
             "Number of indexed types is expected to be even. Refer to method javadoc for details.");
 
@@ -1699,7 +1700,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #setOffHeapMaxMemory(long)
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setSqlOnheapRowCacheSize(int size) {
+    public CacheConfiguration<K, V> setSqlOnheapRowCacheSize(int size) {
         this.sqlOnheapRowCacheSize = size;
 
         return this;
@@ -1720,7 +1721,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param pluginCfgs Cache plugin configurations.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setPluginConfigurations(CachePluginConfiguration... pluginCfgs) {
+    public CacheConfiguration<K, V> setPluginConfigurations(CachePluginConfiguration... pluginCfgs) {
         this.pluginCfgs = pluginCfgs;
 
         return this;
@@ -1739,7 +1740,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param topValidator validator.
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration setTopologyValidator(TopologyValidator topValidator) {
+    public CacheConfiguration<K, V> setTopologyValidator(TopologyValidator topValidator) {
         this.topValidator = topValidator;
 
         return this;
@@ -1766,7 +1767,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @return {@code this} for chaining.
      * @see CacheStoreSessionListener
      */
-    public CacheConfiguration setCacheStoreSessionListenerFactories(
+    public CacheConfiguration<K, V> setCacheStoreSessionListenerFactories(
         Factory<? extends CacheStoreSessionListener>... storeSesLsnrs) {
         this.storeSesLsnrs = storeSesLsnrs;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef7a35ce/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
index 0593601..580010a 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
@@ -64,9 +64,12 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
 
     /**
      * @param nearEvictPlc Near eviction policy.
+     * @return {@code this} for chaining.
      */
-    public void setNearEvictionPolicy(EvictionPolicy<K, V> nearEvictPlc) {
+    public NearCacheConfiguration<K, V> setNearEvictionPolicy(EvictionPolicy<K, V> nearEvictPlc) {
         this.nearEvictPlc = nearEvictPlc;
+
+        return this;
     }
 
     /**
@@ -83,9 +86,12 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * Start size for near cache. This property is only used for {@link CacheMode#PARTITIONED} caching mode.
      *
      * @param nearStartSize Start size for near cache.
+     * @return {@code this} for chaining.
      */
-    public void setNearStartSize(int nearStartSize) {
+    public NearCacheConfiguration<K, V> setNearStartSize(int nearStartSize) {
         this.nearStartSize = nearStartSize;
+
+        return this;
     }
 
     /** {@inheritDoc} */


[18/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' into ignite-1046

Posted by se...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-1046


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

Branch: refs/heads/ignite-591
Commit: aea804b41fd0a73a1eb4f8f68e28bf77d00de966
Parents: 4eef6d0 e91bc48
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Wed Jul 1 11:03:32 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Wed Jul 1 11:03:32 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractConnectivitySelfTest.java     |   4 +-
 .../org/apache/ignite/cluster/ClusterGroup.java |  18 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   2 +
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../configuration/CacheConfiguration.java       | 105 +--
 .../configuration/IgniteReflectionFactory.java  |  81 +-
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   5 +-
 .../internal/cluster/ClusterGroupAdapter.java   |  50 +-
 .../cluster/IgniteClusterAsyncImpl.java         |  12 +-
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../processors/cache/GridCacheContext.java      |   2 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    |  62 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   3 +-
 .../distributed/dht/GridDhtLockFuture.java      |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   9 +-
 .../GridDhtPartitionsExchangeFuture.java        |  46 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../datastructures/DataStructuresProcessor.java |  64 +-
 .../processors/hadoop/HadoopJobInfo.java        |   4 +-
 .../hadoop/counter/HadoopCounterWriter.java     |   5 +-
 .../processors/plugin/CachePluginManager.java   |  10 +-
 .../processors/rest/GridRestProcessor.java      |   4 +-
 .../handlers/task/GridTaskCommandHandler.java   |  12 +-
 .../processors/task/GridTaskWorker.java         |   4 +-
 .../internal/util/GridConfigurationFinder.java  |  55 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../apache/ignite/internal/visor/VisorJob.java  |   2 +
 .../internal/visor/log/VisorLogSearchTask.java  |   2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   4 +
 .../visor/query/VisorQueryCleanupTask.java      |  14 +
 .../util/VisorClusterGroupEmptyException.java   |  37 +
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 151 ++--
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 103 ++-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   3 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  74 +-
 .../core/src/test/config/spark/spark-config.xml |  46 ++
 .../internal/ClusterGroupAbstractTest.java      | 777 ++++++++++++++++++
 .../internal/ClusterGroupHostsSelfTest.java     | 141 ++++
 .../ignite/internal/ClusterGroupSelfTest.java   | 251 ++++++
 .../internal/GridDiscoveryEventSelfTest.java    |  12 +-
 .../internal/GridProjectionAbstractTest.java    | 784 -------------------
 .../ignite/internal/GridProjectionSelfTest.java | 251 ------
 .../apache/ignite/internal/GridSelfTest.java    |   2 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++
 .../CacheReadThroughAtomicRestartSelfTest.java  |  32 +
 ...heReadThroughLocalAtomicRestartSelfTest.java |  32 +
 .../CacheReadThroughLocalRestartSelfTest.java   |  32 +
 ...dThroughReplicatedAtomicRestartSelfTest.java |  32 +
 ...cheReadThroughReplicatedRestartSelfTest.java |  32 +
 .../cache/CacheReadThroughRestartSelfTest.java  | 133 ++++
 .../cache/GridCacheAbstractSelfTest.java        |   2 +-
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ---
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 +++++
 ...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  37 +
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |   4 +-
 .../GridCacheSetAbstractSelfTest.java           |  22 +-
 .../IgniteDataStructureWithJobTest.java         | 111 +++
 .../distributed/IgniteCache150ClientsTest.java  | 189 +++++
 ...teCacheClientNodePartitionsExchangeTest.java |   1 +
 .../distributed/IgniteCacheManyClientsTest.java |   1 +
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |   5 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |  53 +-
 .../GridCacheReplicatedFailoverSelfTest.java    |   5 +
 .../IgniteCacheTxStoreSessionTest.java          |   4 +
 .../internal/util/IgniteUtilsSelfTest.java      |  22 +
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 265 ++++++-
 .../testframework/junits/GridAbstractTest.java  |   2 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   7 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteCacheTestSuite4.java       |   8 +
 .../testsuites/IgniteClientTestSuite.java       |  38 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 .../p2p/GridP2PContinuousDeploymentTask1.java   |   2 +-
 modules/hadoop/pom.xml                          |  78 --
 .../fs/IgniteHadoopFileSystemCounterWriter.java |   9 +-
 .../processors/hadoop/HadoopClassLoader.java    |  29 +
 .../processors/hadoop/HadoopDefaultJobInfo.java |  27 +-
 .../internal/processors/hadoop/HadoopUtils.java | 237 ------
 .../hadoop/SecondaryFileSystemProvider.java     |   3 +-
 .../hadoop/fs/HadoopFileSystemCacheUtils.java   | 241 ++++++
 .../hadoop/fs/HadoopFileSystemsUtils.java       |  11 +
 .../hadoop/fs/HadoopLazyConcurrentMap.java      |   5 +
 .../hadoop/jobtracker/HadoopJobTracker.java     |  25 +-
 .../child/HadoopChildProcessRunner.java         |   3 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  84 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  22 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |  37 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |   5 +-
 .../processors/hadoop/HadoopMapReduceTest.java  |   2 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |   7 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |   7 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |   6 +-
 .../collections/HadoopAbstractMapTest.java      |   3 +-
 .../testsuites/IgniteHadoopTestSuite.java       |   2 +-
 .../IgniteIgfsLinuxAndMacOSTestSuite.java       |   3 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 +-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 +
 .../commands/cache/VisorCacheCommand.scala      |   7 +-
 pom.xml                                         |  12 +-
 scripts/git-patch-prop.sh                       |   2 +-
 109 files changed, 4514 insertions(+), 1876 deletions(-)
----------------------------------------------------------------------



[20/50] incubator-ignite git commit: IGNITE-1068: Fixing ordered messages back pressure control.

Posted by se...@apache.org.
IGNITE-1068: Fixing ordered messages back pressure control.


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

Branch: refs/heads/ignite-591
Commit: c7e7487458b72ba8b666fba7b9e24004d425719f
Parents: bccba30
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Jul 1 11:50:08 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Jul 1 11:50:08 2015 +0300

----------------------------------------------------------------------
 .../managers/communication/GridIoManager.java   | 49 +++++++++++---------
 .../util/nio/GridNioMessageTracker.java         | 23 +++++++--
 2 files changed, 48 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7e74874/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 4382731..d8dcc2c 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
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.timeout.*;
 import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -718,7 +719,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             map = msgSetMap.get(msg.topic());
 
             if (map == null) {
-                set = new GridCommunicationMessageSet(plc, msg.topic(), nodeId, timeout, skipOnTimeout, msg);
+                set = new GridCommunicationMessageSet(plc, msg.topic(), nodeId, timeout, skipOnTimeout, msg, msgC);
 
                 map = new ConcurrentHashMap0<>();
 
@@ -748,7 +749,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                     if (set == null) {
                         GridCommunicationMessageSet old = map.putIfAbsent(nodeId,
                             set = new GridCommunicationMessageSet(plc, msg.topic(),
-                                nodeId, timeout, skipOnTimeout, msg));
+                                nodeId, timeout, skipOnTimeout, msg, msgC));
 
                         assert old == null;
 
@@ -766,7 +767,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 assert set != null;
                 assert !isNew;
 
-                set.add(msg);
+                set.add(msg, msgC);
 
                 break;
             }
@@ -795,14 +796,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (isNew && set.endTime() != Long.MAX_VALUE)
             ctx.timeout().addTimeoutObject(set);
 
-        if (set.reserved()) {
-            // Set is reserved which means that it is currently processed by worker thread.
-            if (msgC != null)
-                msgC.run();
-
-            return;
-        }
-
         final GridMessageListener lsnr = lsnrMap.get(msg.topic());
 
         if (lsnr == null) {
@@ -821,7 +814,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                     "listener is registered): " + msg);
             }
 
-            // Mark the message as processed.
+            // Mark the message as processed, otherwise reading from the connection
+            // may stop.
             if (msgC != null)
                 msgC.run();
 
@@ -848,8 +842,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 }
                 finally {
                     threadProcessingMessage(false);
-
-                    msgC.run();
                 }
             }
         };
@@ -1852,7 +1844,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
         /** */
         @GridToStringInclude
-        private final Queue<IgniteBiTuple<GridIoMessage, Long>> msgs = new ConcurrentLinkedDeque<>();
+        private final Queue<GridTuple3<GridIoMessage, Long, IgniteRunnable>> msgs = new ConcurrentLinkedDeque<>();
 
         /** */
         private final AtomicBoolean reserved = new AtomicBoolean();
@@ -1873,6 +1865,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
          * @param timeout Timeout.
          * @param skipOnTimeout Whether message can be skipped on timeout.
          * @param msg Message to add immediately.
+         * @param msgC Message closure (may be {@code null}).
          */
         GridCommunicationMessageSet(
             GridIoPolicy plc,
@@ -1880,7 +1873,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             UUID nodeId,
             long timeout,
             boolean skipOnTimeout,
-            GridIoMessage msg
+            GridIoMessage msg,
+            @Nullable IgniteRunnable msgC
         ) {
             assert nodeId != null;
             assert topic != null;
@@ -1899,7 +1893,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
             lastTs = U.currentTimeMillis();
 
-            msgs.add(F.t(msg, lastTs));
+            msgs.add(F.t(msg, lastTs, msgC));
         }
 
         /** {@inheritDoc} */
@@ -2017,15 +2011,28 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         void unwind(GridMessageListener lsnr) {
             assert reserved.get();
 
-            for (IgniteBiTuple<GridIoMessage, Long> t = msgs.poll(); t != null; t = msgs.poll())
-                lsnr.onMessage(nodeId, t.get1().message());
+            for (GridTuple3<GridIoMessage, Long, IgniteRunnable> t = msgs.poll(); t != null; t = msgs.poll()) {
+                try {
+                    lsnr.onMessage(
+                        nodeId,
+                        t.get1().message());
+                }
+                finally {
+                    if (t.get3() != null)
+                        t.get3().run();
+                }
+            }
         }
 
         /**
          * @param msg Message to add.
+         * @param msgC Message closure (may be {@code null}).
          */
-        void add(GridIoMessage msg) {
-            msgs.add(F.t(msg, U.currentTimeMillis()));
+        void add(
+            GridIoMessage msg,
+            @Nullable IgniteRunnable msgC
+        ) {
+            msgs.add(F.t(msg, U.currentTimeMillis(), msgC));
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7e74874/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageTracker.java
index 52b7fed..c9ed1a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageTracker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageTracker.java
@@ -56,9 +56,26 @@ public class GridNioMessageTracker implements IgniteRunnable {
 
     /** {@inheritDoc} */
     @Override public void run() {
-        int cnt = msgCnt.decrementAndGet();
+        // In case of ordered messages this may be called twice for 1 message.
+        // Example: message arrives, but listener has not been installed yet.
+        // Message set is created, but message does not get actually processed.
+        // If this is not called, connection may be paused which causes hang.
+        // It seems acceptable to have the following logic accounting the aforementioned.
+        int cnt = 0;
 
-        assert cnt >= 0 : "Invalid count: " + cnt;
+        for (;;) {
+            int cur = msgCnt.get();
+
+            if (cur == 0)
+                break;
+
+            cnt = cur - 1;
+
+            if (msgCnt.compareAndSet(cur, cnt))
+                break;
+        }
+
+        assert cnt >= 0 : "Invalid count [cnt=" + cnt + ", this=" + this + ']';
 
         if (cnt < msgQueueLimit && paused && lock.tryLock()) {
             try {
@@ -116,6 +133,6 @@ public class GridNioMessageTracker implements IgniteRunnable {
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(GridNioMessageTracker.class, this, super.toString());
+        return S.toString(GridNioMessageTracker.class, this, "hash", System.identityHashCode(this));
     }
 }


[09/50] incubator-ignite git commit: IGNITE-1062 Split in topology snapshot server and client nodes.

Posted by se...@apache.org.
IGNITE-1062 Split in topology snapshot server and client nodes.


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

Branch: refs/heads/ignite-591
Commit: 8006a84344118f39e9190643420512fbee06bc73
Parents: bade9f1
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jun 30 16:06:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jun 30 16:06:28 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  46 +++-
 .../IgniteTopologyPrintFormatSelfTest.java      | 233 +++++++++++++++++++
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 3 files changed, 274 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8006a843/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 5e7600f..1d555e4 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
@@ -98,6 +98,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         }
     };
 
+    /** Predicate filtering client nodes. */
+    private static final IgnitePredicate<ClusterNode> clientFilter = new P1<ClusterNode>() {
+        @Override public boolean apply(ClusterNode n) {
+            return n.isClient();
+        }
+    };
+
     /** Disco history entries comparator. */
     private static final Comparator<Map.Entry<AffinityTopologyVersion, DiscoCache>> histCmp =
         new Comparator<Map.Entry<AffinityTopologyVersion, DiscoCache>>() {
@@ -933,6 +940,10 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
         Collection<ClusterNode> rmtNodes = discoCache.remoteNodes();
 
+        Collection<ClusterNode> serverNodes = discoCache.serverNodes();
+
+        Collection<ClusterNode> clientNodes = discoCache.clientNodes();
+
         ClusterNode locNode = discoCache.localNode();
 
         Collection<ClusterNode> allNodes = discoCache.allNodes();
@@ -949,7 +960,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         double heap = U.heapSize(allNodes, 2);
 
         if (log.isQuiet())
-            U.quiet(false, topologySnapshotMessage(rmtNodes.size(), totalCpus, heap));
+            U.quiet(false, topologySnapshotMessage(serverNodes.size(), clientNodes.size(), totalCpus, heap));
 
         if (log.isDebugEnabled()) {
             String dbg = "";
@@ -959,7 +970,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 ">>> " + PREFIX + "." + U.nl() +
                 ">>> +----------------+" + U.nl() +
                 ">>> Grid name: " + (ctx.gridName() == null ? "default" : ctx.gridName()) + U.nl() +
-                ">>> Number of nodes: " + (rmtNodes.size() + 1) + U.nl() +
+                ">>> Number of server nodes: " + serverNodes.size() + U.nl() +
+                ">>> Number of client nodes: " + clientNodes.size() + U.nl() +
                 (discoOrdered ? ">>> Topology version: " + topVer + U.nl() : "") +
                 ">>> Topology hash: 0x" + Long.toHexString(hash).toUpperCase() + U.nl();
 
@@ -992,19 +1004,21 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
             log.debug(dbg);
         }
         else if (log.isInfoEnabled())
-            log.info(topologySnapshotMessage(rmtNodes.size(), totalCpus, heap));
+            log.info(topologySnapshotMessage(serverNodes.size(), clientNodes.size(), totalCpus, heap));
     }
 
     /**
-     * @param rmtNodesNum Remote nodes number.
+     * @param serverNodesNum Server nodes number.
+     * @param clientNodesNum Client nodes number.
      * @param totalCpus Total cpu number.
      * @param heap Heap size.
      * @return Topology snapshot message.
      */
-    private String topologySnapshotMessage(int rmtNodesNum, int totalCpus, double heap) {
+    private String topologySnapshotMessage(int serverNodesNum, int clientNodesNum, int totalCpus, double heap) {
         return PREFIX + " [" +
             (discoOrdered ? "ver=" + topSnap.get().topVer.topologyVersion() + ", " : "") +
-            "nodes=" + (rmtNodesNum + 1) +
+            "server nodes=" + serverNodesNum +
+            ", client nodes=" + clientNodesNum +
             ", CPUs=" + totalCpus +
             ", heap=" + heap + "GB" +
             ']';
@@ -2108,6 +2122,12 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         /** Remote nodes. */
         private final List<ClusterNode> rmtNodes;
 
+        /** Client nodes. */
+        private final List<ClusterNode> clientNodes;
+
+        /** Server nodes. */
+        private final List<ClusterNode> serverNodes;
+
         /** All nodes. */
         private final List<ClusterNode> allNodes;
 
@@ -2196,6 +2216,10 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
             all.addAll(rmtNodes);
 
+            clientNodes = Collections.unmodifiableList(new ArrayList<>(F.view(all, clientFilter)));
+
+            serverNodes = Collections.unmodifiableList(new ArrayList<>(F.view(all, F.not(clientFilter))));
+
             Collections.sort(all, GridNodeOrderComparator.INSTANCE);
 
             allNodes = Collections.unmodifiableList(all);
@@ -2346,6 +2370,16 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
             return rmtNodes;
         }
 
+        /** @return Server nodes. */
+        Collection<ClusterNode> serverNodes() {
+            return serverNodes;
+        }
+
+        /** @return Client nodes. */
+        Collection<ClusterNode> clientNodes() {
+            return clientNodes;
+        }
+
         /** @return All nodes. */
         Collection<ClusterNode> allNodes() {
             return allNodes;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8006a843/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
new file mode 100644
index 0000000..efbc431
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
@@ -0,0 +1,233 @@
+/*
+ * 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.managers.discovery;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.managers.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.apache.ignite.testframework.junits.logger.*;
+import org.apache.log4j.*;
+
+import java.util.*;
+
+/**
+ *
+ */
+public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
+    /** */
+    public static final String TOPOLOGY_SNAPSHOT = "Topology snapshot";
+
+    /** */
+    public static final String SERV_NODE = ">>> Number of server nodes";
+
+    /** */
+    public static final String CLIENT_NODE = ">>> Number of client nodes";
+
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        TcpDiscoverySpi disc = new TcpDiscoverySpi();
+        disc.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(disc);
+
+        if (gridName.endsWith("client"))
+            cfg.setClientMode(true);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+
+        if (log instanceof MockLogger)
+            ((MockLogger)log).clear();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.INFO);
+
+        doServerLogTest(log);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerDebugLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.DEBUG);
+
+        doServerLogTest(log);
+    }
+
+    /**
+     * @param log Logger.
+     * @throws Exception If failed.
+     */
+    private void doServerLogTest(MockLogger log) throws Exception {
+        try {
+            Ignite server = startGrid("server");
+
+            setLogger(log, server);
+
+            Ignite server1 = startGrid("server1");
+
+            waitForDiscovery(server, server1);
+        }
+        finally {
+            stopAllGrids();
+        }
+
+        assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
+            @Override public boolean apply(String s) {
+                return s.contains("Topology snapshot [ver=2, server nodes=2, client nodes=0,")
+                    || (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 0"));
+            }
+        }));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerAndClientLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.INFO);
+
+        doServerAndClientTest(log);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerAndClientDebugLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.DEBUG);
+
+        doServerAndClientTest(log);
+    }
+
+    /**
+     * @param log Log.
+     * @throws Exception If failed.
+     */
+    private void doServerAndClientTest(MockLogger log) throws Exception {
+        try {
+            Ignite server = startGrid("server");
+
+            setLogger(log, server);
+
+            Ignite server1 = startGrid("server1");
+            Ignite client1 = startGrid("first client");
+            Ignite client2 = startGrid("second client");
+
+            waitForDiscovery(server, server1, client1, client2);
+        }
+        finally {
+            stopAllGrids();
+        }
+
+        assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
+            @Override public boolean apply(String s) {
+                return s.contains("Topology snapshot [ver=4, server nodes=2, client nodes=2,")
+                    || (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 2"));
+            }
+        }));
+    }
+
+    /**
+     * Set log.
+     *
+     * @param log Log.
+     * @param server Ignite.
+     */
+    private void setLogger(MockLogger log, Ignite server) {
+        IgniteKernal server0 = (IgniteKernal)server;
+
+        GridDiscoveryManager discovery = server0.context().discovery();
+
+        GridTestUtils.setFieldValue(discovery, GridManagerAdapter.class, "log", log);
+    }
+
+    /**
+     *
+     */
+    private static class MockLogger extends GridTestLog4jLogger {
+        /** */
+        private List<String> logs = new ArrayList<>();
+
+        /**  {@inheritDoc} */
+        @Override public void debug(String msg) {
+            if ((msg != null && !msg.isEmpty()) && (
+                msg.contains(TOPOLOGY_SNAPSHOT)
+                    || msg.contains(SERV_NODE)
+                    || msg.contains(CLIENT_NODE)))
+                logs.add(msg);
+
+            super.debug(msg);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void info(String msg) {
+            if ((msg != null && !msg.isEmpty()) && (
+                msg.contains(TOPOLOGY_SNAPSHOT)
+                || msg.contains(SERV_NODE)
+                || msg.contains(CLIENT_NODE)))
+                logs.add(msg);
+
+            super.info(msg);
+        }
+
+        /**
+         * @return Logs.
+         */
+        public List<String> logs() {
+            return logs;
+        }
+
+        /** */
+        public void clear() {
+            logs.clear();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8006a843/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
index e8c89ec..575f1fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
@@ -83,6 +83,7 @@ public class IgniteKernalSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridKernalConcurrentAccessStopSelfTest.class);
         suite.addTestSuite(GridUpdateNotifierSelfTest.class);
         suite.addTestSuite(GridLocalEventListenerSelfTest.class);
+        suite.addTestSuite(IgniteTopologyPrintFormatSelfTest.class);
 
         // Managed Services.
         suite.addTestSuite(GridServiceProcessorSingleNodeSelfTest.class);


[36/50] incubator-ignite git commit: [IGNITE-1058]: GridIoPolicy: Switch from enum to collection of byte constants.

Posted by se...@apache.org.
[IGNITE-1058]: GridIoPolicy: Switch from enum to collection of byte constants.


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

Branch: refs/heads/ignite-591
Commit: b437ec73dbc15388d1a9a526dc43e7a74abdc288
Parents: 91e1cb2
Author: iveselovskiy <iv...@gridgain.com>
Authored: Thu Jul 2 13:26:22 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Thu Jul 2 13:26:22 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |   1 -
 .../managers/communication/GridIoManager.java   | 124 +++++++++++++++----
 .../managers/communication/GridIoMessage.java   |  15 ++-
 .../managers/communication/GridIoPolicy.java    |  32 ++---
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++++++
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 26 files changed, 202 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/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 e19d3d3..30931fa 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
@@ -77,7 +77,6 @@ import javax.management.*;
 import java.io.*;
 import java.lang.management.*;
 import java.lang.reflect.*;
-import java.security.*;
 import java.text.*;
 import java.util.*;
 import java.util.concurrent.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/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 d8dcc2c..c1fb79a 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
@@ -69,6 +69,9 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     /** Disconnect listeners. */
     private final Collection<GridDisconnectListener> disconnectLsnrs = new ConcurrentLinkedQueue<>();
 
+    /** Map of {@link IoPool}-s injected by Ignite plugins. */
+    private final IoPool[] ioPools = new IoPool[128];
+
     /** Public pool. */
     private ExecutorService pubPool;
 
@@ -255,6 +258,41 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
         if (log.isDebugEnabled())
             log.debug(startInfo());
+
+        registerIoPoolExtensions();
+    }
+
+    /**
+     * Processes IO messaging pool extensions.
+     * @throws IgniteCheckedException On error.
+     */
+    private void registerIoPoolExtensions() throws IgniteCheckedException {
+        // Process custom IO messaging pool extensions:
+        final IoPool[] executorExtensions = ctx.plugins().extensions(IoPool.class);
+
+        if (executorExtensions != null) {
+            // Store it into the map and check for duplicates:
+            for (IoPool ex : executorExtensions) {
+                final byte id = ex.id();
+
+                // 1. Check the pool id is non-negative:
+                if (id < 0)
+                    throw new IgniteCheckedException("Failed to register IO executor pool because its Id is negative " +
+                        "[id=" + id + ']');
+
+                // 2. Check the pool id is in allowed range:
+                if (isReservedGridIoPolicy(id))
+                    throw new IgniteCheckedException("Failed to register IO executor pool because its Id in in the " +
+                        "reserved range (0-31) [id=" + id + ']');
+
+                // 3. Check the pool for duplicates:
+                if (ioPools[id] != null)
+                    throw new IgniteCheckedException("Failed to register IO executor pool because its " +
+                        "Id as already used [id=" + id + ']');
+
+                ioPools[id] = ex;
+            }
+        }
     }
 
     /** {@inheritDoc} */
@@ -451,6 +489,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
         if (log.isDebugEnabled())
             log.debug(stopInfo());
+
+        Arrays.fill(ioPools, null);
     }
 
     /**
@@ -518,7 +558,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             // If message is P2P, then process in P2P service.
             // This is done to avoid extra waiting and potential deadlocks
             // as thread pool may not have any available threads to give.
-            GridIoPolicy plc = msg.policy();
+            byte plc = msg.policy();
 
             switch (plc) {
                 case P2P_POOL: {
@@ -532,7 +572,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 case MANAGEMENT_POOL:
                 case AFFINITY_POOL:
                 case UTILITY_CACHE_POOL:
-                case MARSH_CACHE_POOL: {
+                case MARSH_CACHE_POOL:
+                {
                     if (msg.isOrdered())
                         processOrderedMessage(nodeId, msg, plc, msgC);
                     else
@@ -540,6 +581,18 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
                     break;
                 }
+
+                default:
+                    assert plc >= 0 : "Negative policy: " + plc;
+
+                    if (isReservedGridIoPolicy(plc))
+                        throw new IgniteCheckedException("Failed to process message with policy of reserved range. " +
+                            "[policy=" + plc + ']');
+
+                    if (msg.isOrdered())
+                        processOrderedMessage(nodeId, msg, plc, msgC);
+                    else
+                        processRegularMessage(nodeId, msg, plc, msgC);
             }
         }
         catch (IgniteCheckedException e) {
@@ -556,7 +609,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Policy.
      * @return Execution pool.
      */
-    private Executor pool(GridIoPolicy plc) {
+    private Executor pool(byte plc) throws IgniteCheckedException {
         switch (plc) {
             case P2P_POOL:
                 return p2pPool;
@@ -580,10 +633,27 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 return marshCachePool;
 
             default: {
-                assert false : "Invalid communication policy: " + plc;
+                assert plc >= 0 : "Negative policy: " + plc;
+
+                if (isReservedGridIoPolicy(plc))
+                    throw new IgniteCheckedException("Failed to process message with policy of reserved" +
+                        " range (0-31), [policy=" + plc + ']');
+
+                IoPool pool = ioPools[plc];
+
+                if (pool == null)
+                    throw new IgniteCheckedException("Failed to process message because no pool is registered " +
+                        "for policy. [policy=" + plc + ']');
+
+                assert plc == pool.id();
+
+                Executor ex = pool.executor();
 
-                // Never reached.
-                return null;
+                if (ex == null)
+                    throw new IgniteCheckedException("Failed to process message because corresponding executor " +
+                        "is null. [id=" + plc + ']');
+
+                return ex;
             }
         }
     }
@@ -643,9 +713,9 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     private void processRegularMessage(
         final UUID nodeId,
         final GridIoMessage msg,
-        GridIoPolicy plc,
+        byte plc,
         final IgniteRunnable msgC
-    ) {
+    ) throws IgniteCheckedException {
         Runnable c = new Runnable() {
             @Override public void run() {
                 try {
@@ -701,9 +771,9 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     private void processOrderedMessage(
         final UUID nodeId,
         final GridIoMessage msg,
-        final GridIoPolicy plc,
+        final byte plc,
         @Nullable final IgniteRunnable msgC
-    ) {
+    ) throws IgniteCheckedException {
         assert msg != null;
 
         long timeout = msg.timeout();
@@ -908,7 +978,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Object topic,
         int topicOrd,
         Message msg,
-        GridIoPolicy plc,
+        byte plc,
         boolean ordered,
         long timeout,
         boolean skipOnTimeout
@@ -916,7 +986,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         assert node != null;
         assert topic != null;
         assert msg != null;
-        assert plc != null;
 
         GridIoMessage ioMsg = new GridIoMessage(plc, topic, topicOrd, msg, ordered, timeout, skipOnTimeout);
 
@@ -956,7 +1025,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(UUID nodeId, Object topic, Message msg, GridIoPolicy plc)
+    public void send(UUID nodeId, Object topic, Message msg, byte plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -974,7 +1043,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     @SuppressWarnings("TypeMayBeWeakened")
-    public void send(UUID nodeId, GridTopic topic, Message msg, GridIoPolicy plc)
+    public void send(UUID nodeId, GridTopic topic, Message msg, byte plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -991,7 +1060,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(ClusterNode node, Object topic, Message msg, GridIoPolicy plc)
+    public void send(ClusterNode node, Object topic, Message msg, byte plc)
         throws IgniteCheckedException {
         send(node, topic, -1, msg, plc, false, 0, false);
     }
@@ -1003,7 +1072,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(ClusterNode node, GridTopic topic, Message msg, GridIoPolicy plc)
+    public void send(ClusterNode node, GridTopic topic, Message msg, byte plc)
         throws IgniteCheckedException {
         send(node, topic, topic.ordinal(), msg, plc, false, 0, false);
     }
@@ -1021,7 +1090,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         ClusterNode node,
         Object topic,
         Message msg,
-        GridIoPolicy plc,
+        byte plc,
         long timeout,
         boolean skipOnTimeout
     ) throws IgniteCheckedException {
@@ -1043,7 +1112,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         UUID nodeId,
         Object topic,
         Message msg,
-        GridIoPolicy plc,
+        byte plc,
         long timeout,
         boolean skipOnTimeout
     ) throws IgniteCheckedException {
@@ -1070,7 +1139,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Collection<? extends ClusterNode> nodes,
         Object topic,
         Message msg,
-        GridIoPolicy plc,
+        byte plc,
         long timeout,
         boolean skipOnTimeout
     )
@@ -1091,7 +1160,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Collection<? extends ClusterNode> nodes,
         Object topic,
         Message msg,
-        GridIoPolicy plc
+        byte plc
     ) throws IgniteCheckedException {
         send(nodes, topic, -1, msg, plc, false, 0, false);
     }
@@ -1107,7 +1176,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Collection<? extends ClusterNode> nodes,
         GridTopic topic,
         Message msg,
-        GridIoPolicy plc
+        byte plc
     ) throws IgniteCheckedException {
         send(nodes, topic, topic.ordinal(), msg, plc, false, 0, false);
     }
@@ -1247,7 +1316,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Object topic,
         int topicOrd,
         Message msg,
-        GridIoPolicy plc,
+        byte plc,
         boolean ordered,
         long timeout,
         boolean skipOnTimeout
@@ -1255,7 +1324,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         assert nodes != null;
         assert topic != null;
         assert msg != null;
-        assert plc != null;
 
         if (!ordered)
             assert F.find(nodes, null, F.localNode(locNodeId)) == null :
@@ -1371,6 +1439,9 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 for (GridCommunicationMessageSet msgSet : msgSets)
                     unwindMessageSet(msgSet, lsnr);
             }
+            catch (IgniteCheckedException ice) {
+                throw new IgniteException(ice);
+            }
         }
     }
 
@@ -1840,7 +1911,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         private final Object topic;
 
         /** */
-        private final GridIoPolicy plc;
+        private final byte plc;
 
         /** */
         @GridToStringInclude
@@ -1868,7 +1939,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
          * @param msgC Message closure (may be {@code null}).
          */
         GridCommunicationMessageSet(
-            GridIoPolicy plc,
+            byte plc,
             Object topic,
             UUID nodeId,
             long timeout,
@@ -1878,7 +1949,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         ) {
             assert nodeId != null;
             assert topic != null;
-            assert plc != null;
             assert msg != null;
 
             this.plc = plc;
@@ -1971,7 +2041,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         /**
          * @return Communication policy.
          */
-        GridIoPolicy policy() {
+        byte policy() {
             return plc;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
index 5c1122b..6cf1ae5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
@@ -33,7 +33,7 @@ public class GridIoMessage implements Message {
     private static final long serialVersionUID = 0L;
 
     /** Policy. */
-    private GridIoPolicy plc;
+    private byte plc;
 
     /** Message topic. */
     @GridToStringInclude
@@ -76,7 +76,7 @@ public class GridIoMessage implements Message {
      * @param skipOnTimeout Whether message can be skipped on timeout.
      */
     public GridIoMessage(
-        GridIoPolicy plc,
+        byte plc,
         Object topic,
         int topicOrd,
         Message msg,
@@ -84,7 +84,6 @@ public class GridIoMessage implements Message {
         long timeout,
         boolean skipOnTimeout
     ) {
-        assert plc != null;
         assert topic != null;
         assert topicOrd <= Byte.MAX_VALUE;
         assert msg != null;
@@ -101,7 +100,7 @@ public class GridIoMessage implements Message {
     /**
      * @return Policy.
      */
-    GridIoPolicy policy() {
+    byte policy() {
         return plc;
     }
 
@@ -203,7 +202,7 @@ public class GridIoMessage implements Message {
                 writer.incrementState();
 
             case 2:
-                if (!writer.writeByte("plc", plc != null ? (byte)plc.ordinal() : -1))
+                if (!writer.writeByte("plc", plc))
                     return false;
 
                 writer.incrementState();
@@ -262,14 +261,14 @@ public class GridIoMessage implements Message {
                 reader.incrementState();
 
             case 2:
-                byte plcOrd;
+                byte plc0;
 
-                plcOrd = reader.readByte("plc");
+                plc0 = reader.readByte("plc");
 
                 if (!reader.isLastRead())
                     return false;
 
-                plc = GridIoPolicy.fromOrdinal(plcOrd);
+                plc = plc0;
 
                 reader.incrementState();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
index 6e45043..b091d44 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
@@ -17,44 +17,38 @@
 
 package org.apache.ignite.internal.managers.communication;
 
-import org.jetbrains.annotations.*;
-
 /**
  * This enumeration defines different types of communication
  * message processing by the communication manager.
  */
-public enum GridIoPolicy {
+public class GridIoPolicy {
     /** Public execution pool. */
-    PUBLIC_POOL,
+    public static final byte PUBLIC_POOL = 0;
 
     /** P2P execution pool. */
-    P2P_POOL,
+    public static final byte P2P_POOL = 1;
 
     /** System execution pool. */
-    SYSTEM_POOL,
+    public static final byte SYSTEM_POOL = 2;
 
     /** Management execution pool. */
-    MANAGEMENT_POOL,
+    public static final byte MANAGEMENT_POOL = 3;
 
     /** Affinity fetch pool. */
-    AFFINITY_POOL,
+    public static final byte AFFINITY_POOL = 4;
 
     /** Utility cache execution pool. */
-    UTILITY_CACHE_POOL,
+    public static final byte UTILITY_CACHE_POOL = 5;
 
     /** Marshaller cache execution pool. */
-    MARSH_CACHE_POOL;
-
-    /** Enum values. */
-    private static final GridIoPolicy[] VALS = values();
+    public static final byte MARSH_CACHE_POOL = 6;
 
     /**
-     * Efficiently gets enumerated value from its ordinal.
-     *
-     * @param ord Ordinal value.
-     * @return Enumerated value.
+     * Defines the range of reserved pools that are not available for plugins.
+     * @param key The key.
+     * @return If the key corresponds to reserved pool range.
      */
-    @Nullable public static GridIoPolicy fromOrdinal(int ord) {
-        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+    public static boolean isReservedGridIoPolicy(byte key) {
+        return key >= 0 && key <= 31;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/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 95c5eb1..365076b 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
@@ -986,7 +986,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
      * @throws IgniteCheckedException If sending failed.
      */
     private void sendMessage(Collection<? extends ClusterNode> nodes, GridTopic topic,
-        GridEventStorageMessage msg, GridIoPolicy plc) throws IgniteCheckedException {
+        GridEventStorageMessage msg, byte plc) throws IgniteCheckedException {
         ClusterNode locNode = F.find(nodes, null, F.localNode(ctx.localNodeId()));
 
         Collection<? extends ClusterNode> rmtNodes = F.view(nodes, F.remoteNodes(ctx.localNodeId()));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheType.java
index e0747b9..954bfe5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheType.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheType.java
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.internal.managers.communication.*;
-
 import static org.apache.ignite.internal.managers.communication.GridIoPolicy.*;
 
 /**
@@ -49,13 +47,13 @@ public enum CacheType {
     private final boolean userCache;
 
     /** */
-    private final GridIoPolicy ioPlc;
+    private final byte ioPlc;
 
     /**
      * @param userCache {@code True} if cache created by user.
      * @param ioPlc Cache IO policy.
      */
-    CacheType(boolean userCache, GridIoPolicy ioPlc) {
+    CacheType(boolean userCache, byte ioPlc) {
         this.userCache = userCache;
         this.ioPlc = ioPlc;
     }
@@ -63,7 +61,7 @@ public enum CacheType {
     /**
      * @return Cache IO policy.
      */
-    public GridIoPolicy ioPolicy() {
+    public byte ioPolicy() {
         return ioPlc;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 9b7801c..580e452 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -170,7 +170,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     private CacheType cacheType;
 
     /** IO policy. */
-    private GridIoPolicy plc;
+    private byte plc;
 
     /** Default expiry policy. */
     private ExpiryPolicy expiryPlc;
@@ -459,7 +459,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     /**
      * @return IO policy for the given cache.
      */
-    public GridIoPolicy ioPolicy() {
+    public byte ioPolicy() {
         return plc;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 74a4512..0707096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -309,7 +309,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      * @param plc grid io policy.
      */
     private void sendResponseOnFailedMessage(UUID nodeId, GridCacheMessage res, GridCacheSharedContext cctx,
-        GridIoPolicy plc) {
+        byte plc) {
         try {
             cctx.io().send(nodeId, res, plc);
         }
@@ -580,7 +580,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      * @throws ClusterTopologyCheckedException If receiver left.
      */
     @SuppressWarnings("unchecked")
-    public void send(ClusterNode node, GridCacheMessage msg, GridIoPolicy plc) throws IgniteCheckedException {
+    public void send(ClusterNode node, GridCacheMessage msg, byte plc) throws IgniteCheckedException {
         assert !node.isLocal();
 
         onSend(msg, node.id());
@@ -627,7 +627,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      * @throws IgniteCheckedException If send failed.
      */
     @SuppressWarnings({"BusyWait", "unchecked"})
-    public boolean safeSend(Collection<? extends ClusterNode> nodes, GridCacheMessage msg, GridIoPolicy plc,
+    public boolean safeSend(Collection<? extends ClusterNode> nodes, GridCacheMessage msg, byte plc,
         @Nullable IgnitePredicate<ClusterNode> fallback) throws IgniteCheckedException {
         assert nodes != null;
         assert msg != null;
@@ -739,7 +739,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      * @param plc IO policy.
      * @throws IgniteCheckedException If sending failed.
      */
-    public void send(UUID nodeId, GridCacheMessage msg, GridIoPolicy plc) throws IgniteCheckedException {
+    public void send(UUID nodeId, GridCacheMessage msg, byte plc) throws IgniteCheckedException {
         ClusterNode n = cctx.discovery().node(nodeId);
 
         if (n == null)
@@ -757,7 +757,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      * @param timeout Timeout to keep a message on receiving queue.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void sendOrderedMessage(ClusterNode node, Object topic, GridCacheMessage msg, GridIoPolicy plc,
+    public void sendOrderedMessage(ClusterNode node, Object topic, GridCacheMessage msg, byte plc,
         long timeout) throws IgniteCheckedException {
         onSend(msg, node.id());
 
@@ -807,7 +807,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
      */
     public void sendNoRetry(ClusterNode node,
         GridCacheMessage msg,
-        GridIoPolicy plc)
+        byte plc)
         throws IgniteCheckedException
     {
         assert node != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index 986e211..7a84f9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.tostring.*;
@@ -68,7 +67,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
     private boolean sys;
 
     /** IO policy. */
-    private GridIoPolicy plc;
+    private byte plc;
 
     /**
      * Empty constructor required by {@link Externalizable}.
@@ -99,7 +98,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
         boolean commit,
         boolean invalidate,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         boolean syncCommit,
         boolean syncRollback,
         GridCacheVersion baseVer,
@@ -135,7 +134,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
     /**
      * @return IO policy.
      */
-    public GridIoPolicy policy() {
+    public byte policy() {
         return plc;
     }
 
@@ -268,7 +267,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeByte("plc", plc != null ? (byte)plc.ordinal() : -1))
+                if (!writer.writeByte("plc", plc))
                     return false;
 
                 writer.incrementState();
@@ -367,7 +366,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
                 if (!reader.isLastRead())
                     return false;
 
-                plc = GridIoPolicy.fromOrdinal(plcOrd);
+                plc = plcOrd;
 
                 reader.incrementState();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 3078277..20aa833 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
@@ -105,7 +104,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
     private boolean sys;
 
     /** IO policy. */
-    private GridIoPolicy plc;
+    private byte plc;
 
     /**
      * Required by {@link Externalizable}.
@@ -163,7 +162,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
     /**
      * @return IO policy.
      */
-    public GridIoPolicy policy() {
+    public byte policy() {
         return plc;
     }
 
@@ -377,7 +376,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeByte("plc", plc != null ? (byte)plc.ordinal() : -1))
+                if (!writer.writeByte("plc", plc))
                     return false;
 
                 writer.incrementState();
@@ -510,7 +509,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 if (!reader.isLastRead())
                     return false;
 
-                plc = GridIoPolicy.fromOrdinal(plcOrd);
+                plc = plcOrd;
 
                 reader.incrementState();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index ac5395d..ef5d3d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.affinity.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
@@ -105,7 +104,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
         GridCacheVersion xidVer,
         GridCacheVersion commitVer,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         boolean invalidate,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index a493ebb..fe72b24 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.affinity.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.tostring.*;
@@ -111,7 +110,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
         boolean commit,
         boolean invalidate,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         boolean sysInvalidate,
         boolean syncCommit,
         boolean syncRollback,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index 841cac8..6a72c89 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
 import org.apache.ignite.internal.processors.affinity.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
@@ -106,7 +105,7 @@ public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMa
         boolean implicitSingle,
         boolean sys,
         boolean explicitLock,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index 90edb0f..b50a010 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.affinity.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
@@ -100,7 +99,7 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
         boolean implicitSingle,
         boolean sys,
         boolean explicitLock,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index 0a69910..ae13a10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
@@ -90,7 +89,7 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
         GridCacheVersion xidVer,
         GridCacheVersion commitVer,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         boolean invalidate,
@@ -149,7 +148,7 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
         GridCacheVersion xidVer,
         GridCacheVersion commitVer,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         boolean invalidate,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 15f42ff..26e4bdc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.internal.processors.affinity.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.tostring.*;
@@ -84,7 +83,7 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
         boolean commit,
         boolean invalidate,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         boolean syncCommit,
         boolean syncRollback,
         boolean explicitLock,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index fa8877a..cb391e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
@@ -111,7 +110,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter {
         boolean implicit,
         boolean implicitSingle,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
index 49283cb..4ac81f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
@@ -86,7 +85,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
         GridCacheVersion xidVer,
         GridCacheVersion commitVer,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         boolean invalidate,
@@ -143,7 +142,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
         GridCacheVersion xidVer,
         GridCacheVersion commitVer,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         boolean invalidate,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java
index cb86e0d..b16e950 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.transactions;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
@@ -246,7 +245,7 @@ public interface IgniteInternalTx extends AutoCloseable, GridTimeoutObject {
     /**
      * @return Pool where message for the given transaction must be processed.
      */
-    public GridIoPolicy ioPolicy();
+    public byte ioPolicy();
 
     /**
      * @return Last recorded topology version.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 9e8950f..709c208 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.transactions;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
@@ -136,7 +135,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
     private boolean sys;
 
     /** IO policy. */
-    private GridIoPolicy plc;
+    private byte plc;
 
     /** */
     protected boolean onePhaseCommit;
@@ -238,7 +237,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
         boolean implicitSingle,
         boolean loc,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,
@@ -296,7 +295,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
         GridCacheVersion startVer,
         long threadId,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,
@@ -399,7 +398,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public GridIoPolicy ioPolicy() {
+    @Override public byte ioPolicy() {
         return plc;
     }
 
@@ -1716,7 +1715,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
             throw new IllegalStateException("Deserialized transaction can only be used as read-only.");
         }
 
-        @Override public GridIoPolicy ioPolicy() {
+        @Override public byte ioPolicy() {
             throw new IllegalStateException("Deserialized transaction can only be used as read-only.");
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 7bc9042..0a61b1a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.transactions;
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
@@ -128,7 +127,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         boolean implicit,
         boolean implicitSingle,
         boolean sys,
-        GridIoPolicy plc,
+        byte plc,
         TransactionConcurrency concurrency,
         TransactionIsolation isolation,
         long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsContext.java
index 475a7fc..24b56d3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsContext.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.jetbrains.annotations.*;
 
@@ -148,7 +147,7 @@ public class IgfsContext {
      * @param plc Policy.
      * @throws IgniteCheckedException In case of error.
      */
-    public void send(UUID nodeId, Object topic, IgfsCommunicationMessage msg, GridIoPolicy plc)
+    public void send(UUID nodeId, Object topic, IgfsCommunicationMessage msg, byte plc)
         throws IgniteCheckedException {
         if (!kernalContext().localNodeId().equals(nodeId))
             msg.prepareMarshal(kernalContext().config().getMarshaller());
@@ -163,7 +162,7 @@ public class IgfsContext {
      * @param plc Policy.
      * @throws IgniteCheckedException In case of error.
      */
-    public void send(ClusterNode node, Object topic, IgfsCommunicationMessage msg, GridIoPolicy plc)
+    public void send(ClusterNode node, Object topic, IgfsCommunicationMessage msg, byte plc)
         throws IgniteCheckedException {
         if (!kernalContext().localNodeId().equals(node.id()))
             msg.prepareMarshal(kernalContext().config().getMarshaller());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index ecc6924..5e24b4b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -28,7 +28,6 @@ import org.jetbrains.annotations.*;
 
 import java.io.*;
 import java.lang.reflect.*;
-import java.security.*;
 import java.util.*;
 
 /**
@@ -176,7 +175,7 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Print plugin information.
+     * Print plugins information.
      */
     private void ackPluginsInfo() {
         U.quietAndInfo(log, "Configured plugins:");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/IoPool.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/IoPool.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/IoPool.java
new file mode 100644
index 0000000..e87b82c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/IoPool.java
@@ -0,0 +1,42 @@
+/*
+ * 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.plugin.extensions.communication;
+
+import org.apache.ignite.plugin.*;
+
+import java.util.concurrent.*;
+
+/**
+ * The interface of IO Messaging Pool Extension.
+ */
+public interface IoPool extends Extension {
+    /**
+     * Gets the numeric identifier of the pool. This identifier is to be taken from serialized
+     * message and used to find the appropriate executor pool to process it.
+     *
+     * @return The id.
+     */
+    public byte id();
+
+    /**
+     * Gets the Executor for this Pool. Cannot be null.
+     *
+     * @return The executor.
+     */
+    public Executor executor();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
index 3890716..eb1fd88 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
@@ -189,7 +189,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void send(ClusterNode node, GridTopic topic, Message msg, GridIoPolicy plc)
+        @Override public void send(ClusterNode node, GridTopic topic, Message msg, byte plc)
             throws IgniteCheckedException {
             // No-op.
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b437ec73/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java
index c9da7c5..8c2a0f8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -146,7 +145,7 @@ public class IgniteInternalCacheTypesTest extends GridCommonAbstractTest {
     private void checkCache(
         Ignite ignite,
         String name,
-        GridIoPolicy plc,
+        byte plc,
         boolean user,
         boolean sysTx) {
         GridCacheAdapter cache = ((IgniteKernal)ignite).context().cache().internalCache(name);


[07/50] incubator-ignite git commit: # ignite-gg-1064 allow start if can not initialize multicast

Posted by se...@apache.org.
# ignite-gg-1064 allow start if can not initialize multicast


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

Branch: refs/heads/ignite-591
Commit: b5bc06ee813471643c460aaa74ef4395ad79bd53
Parents: bade9f1
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 30 12:40:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 30 12:40:53 2015 +0300

----------------------------------------------------------------------
 .../TcpDiscoveryMulticastIpFinder.java          | 74 ++++++++++++++++----
 1 file changed, 60 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5bc06ee/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index 8e5a1fd..014d937 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -26,7 +26,6 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.marshaller.jdk.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.jetbrains.annotations.*;
@@ -278,7 +277,7 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
 
         addrSnds = new ArrayList<>(locAddrs.size());
 
-        Collection<InetAddress> reqItfs = new ArrayList<>(locAddrs.size()); // Interfaces used to send requests.
+        Set<InetAddress> reqItfs = new HashSet<>(locAddrs.size()); // Interfaces used to send requests.
 
         for (String locAddr : locAddrs) {
             InetAddress addr;
@@ -309,6 +308,8 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
             }
         }
 
+        boolean mcastErr = false;
+
         if (!clientMode) {
             if (addrSnds.isEmpty()) {
                 try {
@@ -317,13 +318,31 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
                     addrSnds.add(new AddressSender(mcastAddr, null, addrs));
                 }
                 catch (IOException e) {
-                    throw new IgniteSpiException("Failed to create multicast socket [mcastAddr=" + mcastAddr +
-                        ", mcastGrp=" + mcastGrp + ", mcastPort=" + mcastPort + ']', e);
+                    if (log.isDebugEnabled())
+                        log.debug("Failed to create multicast socket [mcastAddr=" + mcastAddr +
+                            ", mcastGrp=" + mcastGrp + ", mcastPort=" + mcastPort + ", err=" + e + ']');
+                }
+
+                if (addrSnds.isEmpty()) {
+                    try {
+                        addrSnds.add(new AddressSender(mcastAddr, mcastAddr, addrs));
+
+                        reqItfs.add(mcastAddr);
+                    }
+                    catch (IOException e) {
+                        log.debug("Failed to create multicast socket [mcastAddr=" + mcastAddr +
+                            ", mcastGrp=" + mcastGrp + ", mcastPort=" + mcastPort + ", locAddr=" + mcastAddr +
+                            ", err=" + e + ']');
+                    }
                 }
             }
 
-            for (AddressSender addrSnd : addrSnds)
-                addrSnd.start();
+            if (!addrSnds.isEmpty()) {
+                for (AddressSender addrSnd : addrSnds)
+                    addrSnd.start();
+            }
+            else
+                mcastErr = true;
         }
         else
             assert addrSnds.isEmpty() : addrSnds;
@@ -358,10 +377,30 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
                 }
             }
         }
-        else
-            ret = requestAddresses(mcastAddr, F.first(reqItfs));
+        else {
+            T2<Collection<InetSocketAddress>, Boolean> res = requestAddresses(mcastAddr, F.first(reqItfs));
+
+            ret = res.get1();
+
+            mcastErr |= res.get2();
+        }
+
+        if (ret.isEmpty()) {
+            if (mcastErr) {
+                if (getRegisteredAddresses().isEmpty()) {
+                    InetSocketAddress addr = new InetSocketAddress("localhost", TcpDiscoverySpi.DFLT_PORT);
+
+                    U.quietAndWarn(log, "TcpDiscoveryMulticastIpFinder failed to initialize multicast, " +
+                        "will use default address: " + addr);
 
-        if (!ret.isEmpty())
+                    registerAddresses(Collections.singleton(addr));
+                }
+                else
+                    U.quietAndWarn(log, "TcpDiscoveryMulticastIpFinder failed to initialize multicast, " +
+                        "will use pre-configured addresses.");
+            }
+        }
+        else
             registerAddresses(ret);
     }
 
@@ -379,11 +418,16 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
      *
      * @param mcastAddr Multicast address where to send request.
      * @param sockItf Optional interface multicast socket should be bound to.
-     * @return Collection of received addresses.
+     * @return Tuple where first value is collection of received addresses, second is boolean which is
+     *      {@code true} if got error on send.
      */
-    private Collection<InetSocketAddress> requestAddresses(InetAddress mcastAddr, @Nullable InetAddress sockItf) {
+    private T2<Collection<InetSocketAddress>, Boolean> requestAddresses(InetAddress mcastAddr,
+        @Nullable InetAddress sockItf)
+    {
         Collection<InetSocketAddress> rmtAddrs = new HashSet<>();
 
+        boolean sndErr = false;
+
         try {
             DatagramPacket reqPckt = new DatagramPacket(MSG_ADDR_REQ_DATA, MSG_ADDR_REQ_DATA.length,
                 mcastAddr, mcastPort);
@@ -414,6 +458,8 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
                         sock.send(reqPckt);
                     }
                     catch (IOException e) {
+                        sndErr = true;
+
                         if (!handleNetworkError(e))
                             break;
 
@@ -486,14 +532,14 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
             if (rmtAddrs.isEmpty() && sndError)
                 U.quietAndWarn(log, "Failed to send multicast message (is multicast enabled on this node?).");
 
-            return rmtAddrs;
+            return new T2<>(rmtAddrs, sndErr);
         }
         catch (IgniteInterruptedCheckedException ignored) {
             U.warn(log, "Got interrupted while sending address request.");
 
             Thread.currentThread().interrupt();
 
-            return rmtAddrs;
+            return new T2<>(rmtAddrs, sndErr);
         }
     }
 
@@ -610,7 +656,7 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
 
         /** {@inheritDoc} */
         @Override protected void body() throws InterruptedException {
-            addrs = requestAddresses(mcastAddr, sockAddr);
+            addrs = requestAddresses(mcastAddr, sockAddr).get1();
         }
 
         /**


[15/50] incubator-ignite git commit: ignite-1060

Posted by se...@apache.org.
ignite-1060


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

Branch: refs/heads/ignite-591
Commit: 25cef86ab016d8345086f1bd90d6c6b3f6fdc2d8
Parents: 2502b62
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 30 17:33:43 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 30 17:33:43 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java | 3 +--
 .../apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25cef86a/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java b/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
index bf329be..e62d49f 100644
--- a/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
+++ b/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
@@ -36,8 +36,7 @@ public class GarHelloWorldBean {
      * @param key Message key.
      * @return Keyed message.
      */
-    @Nullable
-    public String getMessage(String key) {
+    @Nullable public String getMessage(String key) {
         InputStream in = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25cef86a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
index 13b2641..7e46781 100644
--- a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
+++ b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
@@ -61,8 +61,7 @@ public class GarHelloWorldTask extends ComputeTaskSplitAdapter<String, String> {
                 /*
                  * Simply prints the job's argument.
                  */
-                @Nullable
-                @Override public Serializable execute() {
+                @Nullable @Override public Serializable execute() {
                     System.out.println(">>>");
                     System.out.println(">>> Printing '" + argument(0) + "' on this node from grid job.");
                     System.out.println(">>>");


[16/50] incubator-ignite git commit: Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2

Posted by se...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/712e7d5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/712e7d5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/712e7d5c

Branch: refs/heads/ignite-591
Commit: 712e7d5c070db6d3cb189343cbb585a72a7d2717
Parents: 211ad65 e91bc48
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 30 18:27:33 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 30 18:27:33 2015 -0700

----------------------------------------------------------------------
 .../ClientAbstractConnectivitySelfTest.java     |   4 +-
 .../org/apache/ignite/cluster/ClusterGroup.java |  18 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   2 +
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../configuration/CacheConfiguration.java       | 105 +--
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   5 +-
 .../internal/cluster/ClusterGroupAdapter.java   |  50 +-
 .../cluster/IgniteClusterAsyncImpl.java         |  12 +-
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    |  62 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../processors/plugin/CachePluginManager.java   |  10 +-
 .../processors/rest/GridRestProcessor.java      |   4 +-
 .../handlers/task/GridTaskCommandHandler.java   |  12 +-
 .../processors/task/GridTaskWorker.java         |   4 +-
 .../internal/util/GridConfigurationFinder.java  |  55 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../apache/ignite/internal/visor/VisorJob.java  |   2 +
 .../internal/visor/log/VisorLogSearchTask.java  |   2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   4 +
 .../visor/query/VisorQueryCleanupTask.java      |  14 +
 .../util/VisorClusterGroupEmptyException.java   |  37 +
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 151 ++--
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 103 ++-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   3 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  74 +-
 .../core/src/test/config/spark/spark-config.xml |  46 ++
 .../internal/ClusterGroupAbstractTest.java      | 777 ++++++++++++++++++
 .../internal/ClusterGroupHostsSelfTest.java     | 141 ++++
 .../ignite/internal/ClusterGroupSelfTest.java   | 251 ++++++
 .../internal/GridDiscoveryEventSelfTest.java    |  12 +-
 .../internal/GridProjectionAbstractTest.java    | 784 -------------------
 .../ignite/internal/GridProjectionSelfTest.java | 251 ------
 .../apache/ignite/internal/GridSelfTest.java    |   2 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ---
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 +++++
 ...achePartitionedMultiNodeFullApiSelfTest.java |   4 +-
 .../internal/util/IgniteUtilsSelfTest.java      |  22 +
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 265 ++++++-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   7 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 .../p2p/GridP2PContinuousDeploymentTask1.java   |   2 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 +-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 +
 .../commands/cache/VisorCacheCommand.scala      |   7 +-
 pom.xml                                         |  12 +-
 scripts/git-patch-prop.sh                       |   2 +-
 56 files changed, 2685 insertions(+), 1405 deletions(-)
----------------------------------------------------------------------



[14/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1064' into ignite-sprint-7

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1064' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: e91bc484e224ce8a039ef5bba71aa7f093dce262
Parents: 28525ac 0ef74a1
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 30 17:31:22 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 30 17:31:22 2015 +0300

----------------------------------------------------------------------
 .../processors/clock/GridClockServer.java       | 21 ++++--
 .../TcpDiscoveryMulticastIpFinder.java          | 74 ++++++++++++++++----
 2 files changed, 76 insertions(+), 19 deletions(-)
----------------------------------------------------------------------



[21/50] incubator-ignite git commit: 1.2.1-SNAPSHOT

Posted by se...@apache.org.
1.2.1-SNAPSHOT


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

Branch: refs/heads/ignite-591
Commit: 204823c3300ca5c79c2972a8cb3e8dab044ac8d3
Parents: c7e7487
Author: Ignite Teamcity <ig...@apache.org>
Authored: Wed Jul 1 13:04:20 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Wed Jul 1 13:04:20 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                  |  2 +-
 modules/aop/pom.xml                               |  2 +-
 modules/aws/pom.xml                               |  2 +-
 modules/clients/pom.xml                           |  2 +-
 modules/cloud/pom.xml                             |  2 +-
 modules/codegen/pom.xml                           |  2 +-
 modules/core/pom.xml                              |  2 +-
 modules/core/src/main/resources/ignite.properties |  2 +-
 modules/extdata/p2p/pom.xml                       |  2 +-
 modules/extdata/uri/pom.xml                       |  2 +-
 modules/gce/pom.xml                               |  2 +-
 modules/geospatial/pom.xml                        |  2 +-
 modules/hadoop/pom.xml                            |  2 +-
 modules/hibernate/pom.xml                         |  2 +-
 modules/indexing/pom.xml                          |  2 +-
 modules/jcl/pom.xml                               |  2 +-
 modules/jta/pom.xml                               |  2 +-
 modules/log4j/pom.xml                             |  2 +-
 modules/mesos/pom.xml                             |  2 +-
 modules/rest-http/pom.xml                         |  2 +-
 modules/scalar-2.10/pom.xml                       |  2 +-
 modules/scalar/pom.xml                            |  2 +-
 modules/schedule/pom.xml                          |  2 +-
 modules/schema-import/pom.xml                     |  2 +-
 modules/slf4j/pom.xml                             |  2 +-
 modules/spark-2.10/pom.xml                        |  2 +-
 modules/spark/pom.xml                             |  2 +-
 modules/spring/pom.xml                            |  2 +-
 modules/ssh/pom.xml                               |  2 +-
 modules/tools/pom.xml                             |  2 +-
 modules/urideploy/pom.xml                         |  2 +-
 modules/visor-console-2.10/pom.xml                |  2 +-
 modules/visor-console/pom.xml                     |  2 +-
 modules/visor-plugins/pom.xml                     |  2 +-
 modules/web/pom.xml                               |  2 +-
 modules/yardstick/pom.xml                         |  2 +-
 pom.xml                                           | 14 +++++++-------
 37 files changed, 43 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index bcff11e..2f292e9 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 5eea18d..704358f 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 05ecbc1..38d300e 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 7c4d2c8..ca68ef8 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index bb32689..d752588 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
     </parent>
 
     <artifactId>ignite-cloud</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <jcloud.version>1.9.0</jcloud.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 1ea5fe5..9a09a69 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 79fbc2f..c7cb953 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index b25b2ca..830ca22 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=1.1.6-SNAPSHOT
+ignite.version=1.2.1-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 26f2e50..0ee1d9b 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-p2p</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 1690ab9..f2b3936 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index 127c7a4..f132d39 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-gce</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index e28c139..10035c6 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index e300ba0..bb46b2a 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index d001b02..3130f4b 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index b044092..8c02e02 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index b764c96..9f65eb0 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 531e6f2..2d4df0b 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index af62389..3343438 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 07bee9e..491667d 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mesos</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <jetty.version>9.2.10.v20150310</jetty.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 2d7fe6d..c4cb62d 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-rest-http</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/scalar-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml
index c4b8d60..b7c9178 100644
--- a/modules/scalar-2.10/pom.xml
+++ b/modules/scalar-2.10/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar_2.10</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index a048939..7a2e243 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 735035f..49b75bd 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 2898327..7f8fff4 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schema-import</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index fb7c86e..01ad28f 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index 1b8b04e..7463d52 100644
--- a/modules/spark-2.10/pom.xml
+++ b/modules/spark-2.10/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spark_2.10</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/spark/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml
index 8c00ec8..265bb16 100644
--- a/modules/spark/pom.xml
+++ b/modules/spark/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spark</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 35638fe..ab98384 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 23ae1df..708be4f 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 9e5685d..17ba197 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 0add261..76a862b 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/visor-console-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console-2.10/pom.xml b/modules/visor-console-2.10/pom.xml
index 8806438..193e676 100644
--- a/modules/visor-console-2.10/pom.xml
+++ b/modules/visor-console-2.10/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-console_2.10</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 8c6e4c9..87fa4f9 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-console</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index e4162c0..8a80009 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-plugins</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <!-- Ignite dependencies -->

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index e6a23bd..f109880 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 5307447..a9ee178 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <yardstick.version>0.7.0</yardstick.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/204823c3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f2441c..a6d1609 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>apache-ignite</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
@@ -604,12 +604,12 @@
                                         </copy>
 
                                         <!-- appending filename to md5 and sha1 files. to be improved. -->
-                                        <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
-                                        <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
-                                        <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
-                                        <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
-                                        <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
-                                        <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
+                                        <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip" />
+                                        <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip" />
+                                        <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip" />
+                                        <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip" />
+                                        <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true" message=" ${project.artifactId}-${project.version}-src.zip" />
+                                        <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true" message=" ${project.artifactId}-${project.version}-src.zip" />
 
                                         <copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
                                     </target>


[39/50] incubator-ignite git commit: Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2

Posted by se...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/a0a31e22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a0a31e22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a0a31e22

Branch: refs/heads/ignite-591
Commit: a0a31e221b215a3ac0477d083064200991c241e2
Parents: cbbb6a1 c866902
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Jul 2 10:56:22 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Jul 2 10:56:22 2015 -0700

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |   1 -
 .../managers/communication/GridIoManager.java   | 124 +++++++++++++++----
 .../managers/communication/GridIoMessage.java   |  15 ++-
 .../managers/communication/GridIoPolicy.java    |  32 ++---
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++++++
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   5 +-
 .../TcpDiscoveryMulticastIpFinder.java          |   2 +-
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../extdata/uri/modules/uri-dependency/pom.xml  |  30 ++---
 .../deployment/uri/tasks/gar-spring-bean.xml    |  30 ++---
 modules/urideploy/pom.xml                       |  14 ---
 33 files changed, 239 insertions(+), 167 deletions(-)
----------------------------------------------------------------------



[31/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416

Posted by se...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416


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

Branch: refs/heads/ignite-591
Commit: ad3e6af49e9e86f49dd6092c29dc3de8946e0389
Parents: 7e82a68 d3783a1
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 09:50:59 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 09:50:59 2015 +0700

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../configuration/CacheConfiguration.java       | 105 +++----
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../managers/communication/GridIoManager.java   |  49 ++--
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../processors/cache/GridCacheProcessor.java    |  62 +++-
 .../processors/cache/IgniteCacheFutureImpl.java |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |   2 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../internal/util/future/IgniteFutureImpl.java  |  18 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../util/nio/GridNioMessageTracker.java         |  23 +-
 .../util/VisorClusterGroupEmptyException.java   |   6 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   2 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  74 ++++-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../core/src/test/config/spark/spark-config.xml |  46 +++
 modules/core/src/test/config/tests.properties   |   6 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++++++++++++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 --------
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 ++++++++++++
 .../GridP2PContinuousDeploymentSelfTest.java    |   2 -
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 -
 modules/docker/Dockerfile                       |  55 ++++
 modules/docker/README.txt                       |  11 +
 modules/docker/build_users_libs.sh              |  39 +++
 modules/docker/download_ignite.sh               |  49 ++++
 modules/docker/execute.sh                       |  62 ++++
 modules/docker/run.sh                           |  34 +++
 modules/extdata/p2p/pom.xml                     |   4 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 +++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 +++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 ++++
 .../src/main/resources/gar-example.properties   |  18 ++
 modules/extdata/uri/pom.xml                     |  62 +++-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 ++++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 ++
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 +++-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 ++
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |  16 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |  14 +-
 86 files changed, 1577 insertions(+), 325 deletions(-)
----------------------------------------------------------------------



[04/50] incubator-ignite git commit: sprint-7 - Merge branch ignite-1061 into ignite-sprint-7

Posted by se...@apache.org.
sprint-7 - Merge branch ignite-1061 into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: 8c55f8abe8c8e56b5f28c26482027190d5e908d7
Parents: 68c21ac b467822
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 20:34:29 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 20:34:29 2015 -0700

----------------------------------------------------------------------
 .../core/src/test/config/spark/spark-config.xml | 46 ++++++++++++++++++
 .../org/apache/ignite/spark/IgniteContext.scala | 50 ++++++++++++++++++--
 .../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +++++++
 3 files changed, 110 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[48/50] incubator-ignite git commit: Kafka module version changed

Posted by se...@apache.org.
Kafka module version changed


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

Branch: refs/heads/ignite-591
Commit: b6803e7e1d71d6f6b54b0e9cd769ec6ca91d0564
Parents: 63fce5a
Author: agura <ag...@gridgain.com>
Authored: Fri Jul 3 19:54:19 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:54:19 2015 +0300

----------------------------------------------------------------------
 modules/kafka/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6803e7e/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index 43909bc..d0e9cd9 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-kafka</artifactId>
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>


[29/50] incubator-ignite git commit: license fix

Posted by se...@apache.org.
license fix


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

Branch: refs/heads/ignite-591
Commit: d3783a1b3a00f89b35eb90867ced83337ce96d05
Parents: af3cfdf
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Wed Jul 1 21:34:40 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Wed Jul 1 21:34:40 2015 +0300

----------------------------------------------------------------------
 .../extdata/uri/modules/uri-dependency/pom.xml  | 30 ++++++++++----------
 .../deployment/uri/tasks/gar-spring-bean.xml    | 30 ++++++++++----------
 2 files changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d3783a1b/modules/extdata/uri/modules/uri-dependency/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/pom.xml b/modules/extdata/uri/modules/uri-dependency/pom.xml
index 3f3a188..c92eb38 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~  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.
-  -->
+  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.
+-->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d3783a1b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
index c3cf3e4..391b282 100644
--- a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
+++ b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~  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.
-  -->
+  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.
+-->
 
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


[28/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2

Posted by se...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/1a465a2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1a465a2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1a465a2e

Branch: refs/heads/ignite-591
Commit: 1a465a2eae96e5a008d351323d3786e1ed69d649
Parents: 234a809 af3cfdf
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 11:25:18 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 11:25:18 2015 -0700

----------------------------------------------------------------------
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[47/50] incubator-ignite git commit: ignite-428 Review fixes

Posted by se...@apache.org.
ignite-428 Review fixes


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

Branch: refs/heads/ignite-591
Commit: 63fce5a4920531ad8cd9afc47d829bb2fa4bc438
Parents: 2c41739
Author: agura <ag...@gridgain.com>
Authored: Thu Jun 25 22:18:00 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:39:12 2015 +0300

----------------------------------------------------------------------
 modules/kafka/pom.xml                           |  18 +-
 .../ignite/stream/kafka/KafkaStreamer.java      | 121 ++++++---
 .../stream/kafka/KafkaEmbeddedBroker.java       | 251 ++++++++++---------
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 131 +++++-----
 .../ignite/stream/kafka/SimplePartitioner.java  |  27 +-
 5 files changed, 293 insertions(+), 255 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index 165ec1c..43909bc 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-kafka</artifactId>
-    <version>1.1.1-SNAPSHOT</version>
+    <version>1.1.6-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -39,6 +39,7 @@
             <artifactId>ignite-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.kafka</groupId>
             <artifactId>kafka_2.10</artifactId>
@@ -66,6 +67,7 @@
                 </exclusion>
             </exclusions>
         </dependency>
+
         <dependency>
             <groupId>org.apache.zookeeper</groupId>
             <artifactId>zookeeper</artifactId>
@@ -73,12 +75,6 @@
         </dependency>
 
         <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>2.4</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-log4j</artifactId>
             <version>${project.version}</version>
@@ -90,7 +86,6 @@
             <version>4.2</version>
         </dependency>
 
-
         <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
@@ -103,13 +98,6 @@
         </dependency>
 
         <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-            <version>1.8.3</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-spring</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
index e0240ce..e9ad0bd 100644
--- a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
@@ -30,16 +30,17 @@ import java.util.*;
 import java.util.concurrent.*;
 
 /**
- * Server that subscribes to topic messages from Kafka broker, streams its to key-value pairs into {@link
- * org.apache.ignite.IgniteDataStreamer} instance.
+ * Server that subscribes to topic messages from Kafka broker and streams its to key-value pairs into
+ * {@link IgniteDataStreamer} instance.
  * <p>
- * Uses Kafka's High Level Consumer API to read messages from Kafka
+ * Uses Kafka's High Level Consumer API to read messages from Kafka.
  *
  * @see <a href="https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example">Consumer Consumer Group
  * Example</a>
  */
-public class KafkaStreamer<T, K, V>
-    extends StreamAdapter<T, K, V> {
+public class KafkaStreamer<T, K, V> extends StreamAdapter<T, K, V> {
+    /** Retry timeout. */
+    private static final long DFLT_RETRY_TIMEOUT = 10000;
 
     /** Logger. */
     private IgniteLogger log;
@@ -53,61 +54,78 @@ public class KafkaStreamer<T, K, V>
     /** Number of threads to process kafka streams. */
     private int threads;
 
-    /** Kafka Consumer Config. */
-    private ConsumerConfig consumerConfig;
+    /** Kafka consumer config. */
+    private ConsumerConfig consumerCfg;
 
-    /** Key Decoder. */
+    /** Key decoder. */
     private Decoder<K> keyDecoder;
 
-    /** Value Decoder. */
-    private Decoder<V> valueDecoder;
+    /** Value decoder. */
+    private Decoder<V> valDecoder;
 
-    /** Kafka Consumer connector. */
+    /** Kafka consumer connector. */
     private ConsumerConnector consumer;
 
+    /** Retry timeout. */
+    private long retryTimeout = DFLT_RETRY_TIMEOUT;
+
+    /** Stopped. */
+    private volatile boolean stopped;
+
     /**
-     * Sets the topic.
+     * Sets the topic name.
      *
-     * @param topic Topic Name.
+     * @param topic Topic name.
      */
-    public void setTopic(final String topic) {
+    public void setTopic(String topic) {
         this.topic = topic;
     }
 
     /**
      * Sets the threads.
      *
-     * @param threads Number of Threads.
+     * @param threads Number of threads.
      */
-    public void setThreads(final int threads) {
+    public void setThreads(int threads) {
         this.threads = threads;
     }
 
     /**
      * Sets the consumer config.
      *
-     * @param consumerConfig  Consumer configuration.
+     * @param consumerCfg Consumer configuration.
      */
-    public void setConsumerConfig(final ConsumerConfig consumerConfig) {
-        this.consumerConfig = consumerConfig;
+    public void setConsumerConfig(ConsumerConfig consumerCfg) {
+        this.consumerCfg = consumerCfg;
     }
 
     /**
      * Sets the key decoder.
      *
-     * @param keyDecoder Key Decoder.
+     * @param keyDecoder Key decoder.
      */
-    public void setKeyDecoder(final Decoder<K> keyDecoder) {
+    public void setKeyDecoder(Decoder<K> keyDecoder) {
         this.keyDecoder = keyDecoder;
     }
 
     /**
      * Sets the value decoder.
      *
-     * @param valueDecoder Value Decoder
+     * @param valDecoder Value decoder.
      */
-    public void setValueDecoder(final Decoder<V> valueDecoder) {
-        this.valueDecoder = valueDecoder;
+    public void setValueDecoder(Decoder<V> valDecoder) {
+        this.valDecoder = valDecoder;
+    }
+
+    /**
+     * Sets the retry timeout.
+     *
+     * @param retryTimeout Retry timeout.
+     */
+    public void setRetryTimeout(long retryTimeout) {
+        A.ensure(retryTimeout > 0, "retryTimeout > 0");
+
+        this.retryTimeout = retryTimeout;
     }
 
     /**
@@ -120,35 +138,56 @@ public class KafkaStreamer<T, K, V>
         A.notNull(getIgnite(), "ignite");
         A.notNull(topic, "topic");
         A.notNull(keyDecoder, "key decoder");
-        A.notNull(valueDecoder, "value decoder");
-        A.notNull(consumerConfig, "kafka consumer config");
+        A.notNull(valDecoder, "value decoder");
+        A.notNull(consumerCfg, "kafka consumer config");
         A.ensure(threads > 0, "threads > 0");
 
         log = getIgnite().log();
 
-        consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerConfig);
+        consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerCfg);
+
+        Map<String, Integer> topicCntMap = new HashMap<>();
 
-        Map<String, Integer> topicCountMap = new HashMap<>();
-        topicCountMap.put(topic, threads);
+        topicCntMap.put(topic, threads);
 
-        Map<String, List<KafkaStream<K, V>>> consumerMap = consumer.createMessageStreams(topicCountMap, keyDecoder,
-            valueDecoder);
+        Map<String, List<KafkaStream<K, V>>> consumerMap =
+            consumer.createMessageStreams(topicCntMap, keyDecoder, valDecoder);
 
         List<KafkaStream<K, V>> streams = consumerMap.get(topic);
 
         // Now launch all the consumer threads.
         executor = Executors.newFixedThreadPool(threads);
 
+        stopped = false;
+
         // Now create an object to consume the messages.
-        for (final KafkaStream<K,V> stream : streams) {
+        for (final KafkaStream<K, V> stream : streams) {
             executor.submit(new Runnable() {
                 @Override public void run() {
-
-                    ConsumerIterator<K, V> it = stream.iterator();
-
-                    while (it.hasNext()) {
-                        final MessageAndMetadata<K, V> messageAndMetadata = it.next();
-                        getStreamer().addData(messageAndMetadata.key(), messageAndMetadata.message());
+                    while (!stopped) {
+                        try {
+                            for (ConsumerIterator<K, V> it = stream.iterator(); it.hasNext() && !stopped; ) {
+                                MessageAndMetadata<K, V> msg = it.next();
+
+                                try {
+                                    getStreamer().addData(msg.key(), msg.message());
+                                }
+                                catch (Exception e) {
+                                    U.warn(log, "Message is ignored due to an error [msg=" + msg + ']', e);
+                                }
+                            }
+                        }
+                        catch (Exception e) {
+                            U.warn(log, "Message can't be consumed from stream. Retry after " +
+                                retryTimeout + " ms.", e);
+
+                            try {
+                                Thread.sleep(retryTimeout);
+                            }
+                            catch (InterruptedException ie) {
+                                // No-op.
+                            }
+                        }
                     }
                 }
             });
@@ -159,6 +198,8 @@ public class KafkaStreamer<T, K, V>
      * Stops streamer.
      */
     public void stop() {
+        stopped = true;
+
         if (consumer != null)
             consumer.shutdown();
 
@@ -168,11 +209,11 @@ public class KafkaStreamer<T, K, V>
             try {
                 if (!executor.awaitTermination(5000, TimeUnit.MILLISECONDS))
                     if (log.isDebugEnabled())
-                        log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly");
+                        log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly.");
             }
             catch (InterruptedException e) {
                 if (log.isDebugEnabled())
-                    log.debug("Interrupted during shutdown, exiting uncleanly");
+                    log.debug("Interrupted during shutdown, exiting uncleanly.");
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
index 28533f7..98b9e4c 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.stream.kafka;
 
-import org.apache.commons.io.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.zookeeper.server.*;
 
@@ -25,6 +24,7 @@ import kafka.admin.*;
 import kafka.api.*;
 import kafka.api.Request;
 import kafka.producer.*;
+import kafka.serializer.*;
 import kafka.server.*;
 import kafka.utils.*;
 import org.I0Itec.zkclient.*;
@@ -39,106 +39,104 @@ import java.util.concurrent.*;
  * Kafka Embedded Broker.
  */
 public class KafkaEmbeddedBroker {
-
-    /** Default ZooKeeper Host. */
+    /** Default ZooKeeper host. */
     private static final String ZK_HOST = "localhost";
 
-    /** Broker Port. */
+    /** Broker port. */
     private static final int BROKER_PORT = 9092;
 
-    /** ZooKeeper Connection Timeout. */
+    /** ZooKeeper connection timeout. */
     private static final int ZK_CONNECTION_TIMEOUT = 6000;
 
-    /** ZooKeeper Session Timeout. */
+    /** ZooKeeper session timeout. */
     private static final int ZK_SESSION_TIMEOUT = 6000;
 
     /** ZooKeeper port. */
     private static int zkPort = 0;
 
-    /** Is ZooKeeper Ready. */
+    /** Is ZooKeeper ready. */
     private boolean zkReady;
 
-    /** Kafka Config. */
-    private KafkaConfig brokerConfig;
+    /** Kafka config. */
+    private KafkaConfig brokerCfg;
 
-    /** Kafka Server. */
-    private KafkaServer kafkaServer;
+    /** Kafka server. */
+    private KafkaServer kafkaSrv;
 
-    /** ZooKeeper Client. */
+    /** ZooKeeper client. */
     private ZkClient zkClient;
 
     /** Embedded ZooKeeper. */
     private EmbeddedZooKeeper zooKeeper;
 
     /**
-     * Creates an embedded Kafka Broker.
+     * Creates an embedded Kafka broker.
      */
     public KafkaEmbeddedBroker() {
         try {
             setupEmbeddedZooKeeper();
+
             setupEmbeddedKafkaServer();
         }
         catch (IOException | InterruptedException e) {
-            throw new RuntimeException("failed to start Kafka Broker " + e);
+            throw new RuntimeException("Failed to start Kafka broker " + e);
         }
-
     }
 
     /**
-     * @return ZooKeeper Address.
+     * @return ZooKeeper address.
      */
     public static String getZKAddress() {
-        return ZK_HOST + ":" + zkPort;
+        return ZK_HOST + ':' + zkPort;
     }
 
     /**
      * Creates a Topic.
      *
-     * @param topic topic name
-     * @param partitions number of paritions for the topic
-     * @param replicationFactor replication factor
-     * @throws TimeoutException
-     * @throws InterruptedException
+     * @param topic Topic name.
+     * @param partitions Number of partitions for the topic.
+     * @param replicationFactor Replication factor.
+     * @throws TimeoutException If operation is timed out.
+     * @throws InterruptedException If interrupted.
      */
-    public void createTopic(String topic, final int partitions, final int replicationFactor)
+    public void createTopic(String topic, int partitions, int replicationFactor)
         throws TimeoutException, InterruptedException {
         AdminUtils.createTopic(zkClient, topic, partitions, replicationFactor, new Properties());
+
         waitUntilMetadataIsPropagated(topic, 0, 10000, 100);
     }
 
     /**
-     * Sends message to Kafka Broker.
+     * Sends message to Kafka broker.
      *
-     * @param keyedMessages List of Keyed Messages.
+     * @param keyedMessages List of keyed messages.
      * @return Producer used to send the message.
      */
-    public Producer sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
+    public Producer<String, String> sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
         Producer<String, String> producer = new Producer<>(getProducerConfig());
+
         producer.send(scala.collection.JavaConversions.asScalaBuffer(keyedMessages));
+
         return producer;
     }
 
     /**
-     * Shuts down Kafka Broker.
-     *
-     * @throws IOException
+     * Shuts down Kafka broker.
      */
-    public void shutdown()
-        throws IOException {
-
+    public void shutdown() {
         zkReady = false;
 
-        if (kafkaServer != null)
-            kafkaServer.shutdown();
+        if (kafkaSrv != null)
+            kafkaSrv.shutdown();
 
-        List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerConfig.logDirs());
+        List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerCfg.logDirs());
 
-        for (String logDir : logDirs) {
-            FileUtils.deleteDirectory(new File(logDir));
-        }
+        for (String logDir : logDirs)
+            U.delete(new File(logDir));
 
         if (zkClient != null) {
             zkClient.close();
+
             zkClient = null;
         }
 
@@ -148,16 +146,15 @@ public class KafkaEmbeddedBroker {
                 zooKeeper.shutdown();
             }
             catch (IOException e) {
-                // ignore
+                // No-op.
             }
 
             zooKeeper = null;
         }
-
     }
 
     /**
-     * @return the Zookeeper Client
+     * @return ZooKeeper client.
      */
     private ZkClient getZkClient() {
         A.ensure(zkReady, "Zookeeper not setup yet");
@@ -169,102 +166,105 @@ public class KafkaEmbeddedBroker {
     /**
      * Checks if topic metadata is propagated.
      *
-     * @param topic topic name
-     * @param partition partition
-     * @return true if propagated otherwise false
+     * @param topic Topic name.
+     * @param part Partition.
+     * @return {@code True} if propagated, otherwise {@code false}.
      */
-    private boolean isMetadataPropagated(final String topic, final int partition) {
-        final scala.Option<PartitionStateInfo> partitionStateOption = kafkaServer.apis().metadataCache().getPartitionInfo(
-            topic, partition);
-        if (partitionStateOption.isDefined()) {
-            final PartitionStateInfo partitionState = partitionStateOption.get();
-            final LeaderAndIsr leaderAndInSyncReplicas = partitionState.leaderIsrAndControllerEpoch().leaderAndIsr();
-
-            if (ZkUtils.getLeaderForPartition(getZkClient(), topic, partition) != null
-                && Request.isValidBrokerId(leaderAndInSyncReplicas.leader())
-                && leaderAndInSyncReplicas.isr().size() >= 1)
-                return true;
+    private boolean isMetadataPropagated(String topic, int part) {
+        scala.Option<PartitionStateInfo> partStateOption =
+            kafkaSrv.apis().metadataCache().getPartitionInfo(topic, part);
 
-        }
-        return false;
+        if (!partStateOption.isDefined())
+            return false;
+
+        PartitionStateInfo partState = partStateOption.get();
+
+        LeaderAndIsr LeaderAndIsr = partState.leaderIsrAndControllerEpoch().leaderAndIsr();
+
+        return ZkUtils.getLeaderForPartition(getZkClient(), topic, part) != null &&
+            Request.isValidBrokerId(LeaderAndIsr.leader()) && LeaderAndIsr.isr().size() >= 1;
     }
 
     /**
      * Waits until metadata is propagated.
      *
-     * @param topic topic name
-     * @param partition partition
-     * @param timeout timeout value in millis
-     * @param interval interval in millis to sleep
-     * @throws TimeoutException
-     * @throws InterruptedException
+     * @param topic Topic name.
+     * @param part Partition.
+     * @param timeout Timeout value in millis.
+     * @param interval Interval in millis to sleep.
+     * @throws TimeoutException If operation is timed out.
+     * @throws InterruptedException If interrupted.
      */
-    private void waitUntilMetadataIsPropagated(final String topic, final int partition, final long timeout,
-        final long interval) throws TimeoutException, InterruptedException {
+    private void waitUntilMetadataIsPropagated(String topic, int part, long timeout, long interval)
+        throws TimeoutException, InterruptedException {
         int attempt = 1;
-        final long startTime = System.currentTimeMillis();
+
+        long startTime = System.currentTimeMillis();
 
         while (true) {
-            if (isMetadataPropagated(topic, partition))
+            if (isMetadataPropagated(topic, part))
                 return;
 
-            final long duration = System.currentTimeMillis() - startTime;
+            long duration = System.currentTimeMillis() - startTime;
 
             if (duration < timeout)
                 Thread.sleep(interval);
             else
-                throw new TimeoutException("metadata propagate timed out, attempt=" + attempt);
+                throw new TimeoutException("Metadata propagation is timed out, attempt " + attempt);
 
             attempt++;
         }
-
     }
 
     /**
-     * Sets up embedded Kafka Server
+     * Sets up embedded Kafka server.
      *
-     * @throws IOException
+     * @throws IOException If failed.
      */
-    private void setupEmbeddedKafkaServer()
-        throws IOException {
+    private void setupEmbeddedKafkaServer() throws IOException {
         A.ensure(zkReady, "Zookeeper should be setup before hand");
 
-        brokerConfig = new KafkaConfig(getBrokerConfig());
-        kafkaServer = new KafkaServer(brokerConfig, SystemTime$.MODULE$);
-        kafkaServer.startup();
+        brokerCfg = new KafkaConfig(getBrokerConfig());
+
+        kafkaSrv = new KafkaServer(brokerCfg, SystemTime$.MODULE$);
+
+        kafkaSrv.startup();
     }
 
     /**
-     * Sets up embedded zooKeeper
+     * Sets up embedded ZooKeeper.
      *
-     * @throws IOException
-     * @throws InterruptedException
+     * @throws IOException If failed.
+     * @throws InterruptedException If interrupted.
      */
-    private void setupEmbeddedZooKeeper()
-        throws IOException, InterruptedException {
+    private void setupEmbeddedZooKeeper() throws IOException, InterruptedException {
         EmbeddedZooKeeper zooKeeper = new EmbeddedZooKeeper(ZK_HOST, zkPort);
+
         zooKeeper.startup();
+
         zkPort = zooKeeper.getActualPort();
+
         zkClient = new ZkClient(getZKAddress(), ZK_SESSION_TIMEOUT, ZK_CONNECTION_TIMEOUT, ZKStringSerializer$.MODULE$);
+
         zkReady = true;
     }
 
     /**
-     * @return Kafka Broker Address.
+     * @return Kafka broker address.
      */
     private static String getBrokerAddress() {
-        return ZK_HOST + ":" + BROKER_PORT;
+        return ZK_HOST + ':' + BROKER_PORT;
     }
 
     /**
-     * Gets KafKa Brofer Config
+     * Gets Kafka broker config.
      *
-     * @return Kafka Broker Config
-     * @throws IOException
+     * @return Kafka broker config.
+     * @throws IOException If failed.
      */
-    private static Properties getBrokerConfig()
-        throws IOException {
+    private static Properties getBrokerConfig() throws IOException {
         Properties props = new Properties();
+
         props.put("broker.id", "0");
         props.put("host.name", ZK_HOST);
         props.put("port", "" + BROKER_PORT);
@@ -272,60 +272,63 @@ public class KafkaEmbeddedBroker {
         props.put("zookeeper.connect", getZKAddress());
         props.put("log.flush.interval.messages", "1");
         props.put("replica.socket.timeout.ms", "1500");
+
         return props;
     }
 
     /**
-     * @return Kafka Producer Config
+     * @return Kafka Producer config.
      */
     private static ProducerConfig getProducerConfig() {
         Properties props = new Properties();
+
         props.put("metadata.broker.list", getBrokerAddress());
-        props.put("serializer.class", "kafka.serializer.StringEncoder");
-        props.put("key.serializer.class", "kafka.serializer.StringEncoder");
-        props.put("partitioner.class", "org.apache.ignite.kafka.SimplePartitioner");
+        props.put("serializer.class", StringEncoder.class.getName());
+        props.put("key.serializer.class", StringEncoder.class.getName());
+        props.put("partitioner.class", SimplePartitioner.class.getName());
+
         return new ProducerConfig(props);
     }
 
     /**
-     * Creates Temp Directory
+     * Creates temp directory.
      *
-     * @param prefix prefix
-     * @return Created File.
-     * @throws IOException
+     * @param prefix Prefix.
+     * @return Created file.
+     * @throws IOException If failed.
      */
-    private static File createTempDir(final String prefix)
-        throws IOException {
-        final Path path = Files.createTempDirectory(prefix);
-        return path.toFile();
+    private static File createTempDir( String prefix) throws IOException {
+        Path path = Files.createTempDirectory(prefix);
 
+        return path.toFile();
     }
 
     /**
-     * Creates Embedded ZooKeeper.
+     * Creates embedded ZooKeeper.
      */
     private static class EmbeddedZooKeeper {
-        /** Default ZooKeeper Host. */
+        /** Default ZooKeeper host. */
         private final String zkHost;
 
-        /** Default ZooKeeper Port. */
+        /** Default ZooKeeper port. */
         private final int zkPort;
 
-        /** NIO Context Factory. */
+        /** NIO context factory. */
         private NIOServerCnxnFactory factory;
 
-        /** Snapshot Directory. */
+        /** Snapshot directory. */
         private File snapshotDir;
 
-        /** Log Directory. */
+        /** Log directory. */
         private File logDir;
 
         /**
-         * Creates an embedded Zookeeper
-         * @param zkHost zookeeper host
-         * @param zkPort zookeeper port
+         * Creates an embedded ZooKeeper.
+         *
+         * @param zkHost ZooKeeper host.
+         * @param zkPort ZooKeeper port.
          */
-        EmbeddedZooKeeper(final String zkHost, final int zkPort) {
+        EmbeddedZooKeeper(String zkHost, int zkPort) {
             this.zkHost = zkHost;
             this.zkPort = zkPort;
         }
@@ -333,22 +336,25 @@ public class KafkaEmbeddedBroker {
         /**
          * Starts up ZooKeeper.
          *
-         * @throws IOException
-         * @throws InterruptedException
+         * @throws IOException If failed.
+         * @throws InterruptedException If interrupted.
          */
-        void startup()
-            throws IOException, InterruptedException {
+        void startup() throws IOException, InterruptedException {
             snapshotDir = createTempDir("_ss");
+
             logDir = createTempDir("_log");
-            ZooKeeperServer zooServer = new ZooKeeperServer(snapshotDir, logDir, 500);
+
+            ZooKeeperServer zkSrv = new ZooKeeperServer(snapshotDir, logDir, 500);
+
             factory = new NIOServerCnxnFactory();
+
             factory.configure(new InetSocketAddress(zkHost, zkPort), 16);
-            factory.startup(zooServer);
+
+            factory.startup(zkSrv);
         }
 
         /**
-         *
-         * @return actual port zookeeper is started
+         * @return Actual port ZooKeeper is started.
          */
         int getActualPort() {
             return factory.getLocalPort();
@@ -357,17 +363,16 @@ public class KafkaEmbeddedBroker {
         /**
          * Shuts down ZooKeeper.
          *
-         * @throws IOException
+         * @throws IOException If failed.
          */
-        void shutdown()
-            throws IOException {
+        void shutdown() throws IOException {
             if (factory != null) {
                 factory.shutdown();
 
                 U.delete(snapshotDir);
+
                 U.delete(logDir);
             }
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
index 5972639..2473990 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
@@ -32,31 +32,31 @@ import java.util.*;
 import java.util.concurrent.*;
 
 import static org.apache.ignite.events.EventType.*;
+import static org.apache.ignite.stream.kafka.KafkaEmbeddedBroker.*;
 
 /**
  * Tests {@link KafkaStreamer}.
  */
-public class KafkaIgniteStreamerSelfTest
-    extends GridCommonAbstractTest {
+public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
     /** Embedded Kafka. */
     private KafkaEmbeddedBroker embeddedBroker;
 
     /** Count. */
     private static final int CNT = 100;
 
-    /** Test Topic. */
+    /** Test topic. */
     private static final String TOPIC_NAME = "page_visits";
 
-    /** Kafka Partition. */
+    /** Kafka partition. */
     private static final int PARTITIONS = 4;
 
-    /** Kafka Replication Factor. */
+    /** Kafka replication factor. */
     private static final int REPLICATION_FACTOR = 1;
 
-    /** Topic Message Key Prefix. */
+    /** Topic message key prefix. */
     private static final String KEY_PREFIX = "192.168.2.";
 
-    /** Topic Message Value Url. */
+    /** Topic message value URL. */
     private static final String VALUE_URL = ",www.example.com,";
 
     /** Constructor. */
@@ -65,18 +65,15 @@ public class KafkaIgniteStreamerSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override
-    protected void beforeTest()
-        throws Exception {
+    @SuppressWarnings("unchecked")
+    @Override protected void beforeTest() throws Exception {
         grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
 
         embeddedBroker = new KafkaEmbeddedBroker();
     }
 
     /** {@inheritDoc} */
-    @Override
-    protected void afterTest()
-        throws Exception {
+    @Override protected void afterTest() throws Exception {
         grid().cache(null).clear();
 
         embeddedBroker.shutdown();
@@ -85,76 +82,80 @@ public class KafkaIgniteStreamerSelfTest
     /**
      * Tests Kafka streamer.
      *
-     * @throws TimeoutException
-     * @throws InterruptedException
+     * @throws TimeoutException If timed out.
+     * @throws InterruptedException If interrupted.
      */
-    public void testKafkaStreamer()
-        throws TimeoutException, InterruptedException {
+    public void testKafkaStreamer() throws TimeoutException, InterruptedException {
         embeddedBroker.createTopic(TOPIC_NAME, PARTITIONS, REPLICATION_FACTOR);
 
-        Map<String, String> keyValueMap = produceStream(TOPIC_NAME);
-        consumerStream(TOPIC_NAME, keyValueMap);
+        Map<String, String> keyValMap = produceStream(TOPIC_NAME);
+
+        consumerStream(TOPIC_NAME, keyValMap);
     }
 
     /**
-     * Produces/Sends messages to Kafka.
+     * Sends messages to Kafka.
      *
      * @param topic Topic name.
      * @return Map of key value messages.
      */
-    private Map<String, String> produceStream(final String topic) {
-        final Map<String, String> keyValueMap = new HashMap<>();
-
+    private Map<String, String> produceStream(String topic) {
         // Generate random subnets.
         List<Integer> subnet = new ArrayList<>();
 
-        int i = 0;
-        while (i <= CNT)
-            subnet.add(++i);
+        for (int i = 1; i <= CNT; i++)
+            subnet.add(i);
 
         Collections.shuffle(subnet);
 
-        final List<KeyedMessage<String, String>> messages = new ArrayList<>();
-        for (int event = 0; event < CNT; event++) {
-            long runtime = new Date().getTime();
-            String ip = KEY_PREFIX + subnet.get(event);
+        List<KeyedMessage<String, String>> messages = new ArrayList<>(CNT);
+
+        Map<String, String> keyValMap = new HashMap<>();
+
+        for (int evt = 0; evt < CNT; evt++) {
+            long runtime = System.currentTimeMillis();
+
+            String ip = KEY_PREFIX + subnet.get(evt);
+
             String msg = runtime + VALUE_URL + ip;
+
             messages.add(new KeyedMessage<>(topic, ip, msg));
-            keyValueMap.put(ip, msg);
+
+            keyValMap.put(ip, msg);
         }
 
-        final Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+        Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+
         producer.close();
 
-        return keyValueMap;
+        return keyValMap;
     }
 
     /**
-     * Consumes Kafka Stream via ignite.
+     * Consumes Kafka stream via Ignite.
      *
      * @param topic Topic name.
-     * @param keyValueMap Expected key value map.
-     * @throws TimeoutException TimeoutException.
-     * @throws InterruptedException InterruptedException.
+     * @param keyValMap Expected key value map.
+     * @throws TimeoutException If timed out.
+     * @throws InterruptedException If interrupted.
      */
-    private void consumerStream(final String topic, final Map<String, String> keyValueMap)
+    private void consumerStream(String topic, Map<String, String> keyValMap)
         throws TimeoutException, InterruptedException {
-
         KafkaStreamer<String, String, String> kafkaStmr = null;
 
-        final Ignite ignite = grid();
-        try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
+        Ignite ignite = grid();
 
+        try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
             stmr.allowOverwrite(true);
             stmr.autoFlushFrequency(10);
 
-            // Configure socket streamer.
+            // Configure Kafka streamer.
             kafkaStmr = new KafkaStreamer<>();
 
             // Get the cache.
             IgniteCache<String, String> cache = ignite.cache(null);
 
-            // Set ignite instance.
+            // Set Ignite instance.
             kafkaStmr.setIgnite(ignite);
 
             // Set data streamer instance.
@@ -167,58 +168,55 @@ public class KafkaIgniteStreamerSelfTest
             kafkaStmr.setThreads(4);
 
             // Set the consumer configuration.
-            kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(KafkaEmbeddedBroker.getZKAddress(),
-                "groupX"));
+            kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(getZKAddress(), "groupX"));
 
             // Set the decoders.
-            StringDecoder stringDecoder = new StringDecoder(new VerifiableProperties());
-            kafkaStmr.setKeyDecoder(stringDecoder);
-            kafkaStmr.setValueDecoder(stringDecoder);
+            StringDecoder strDecoder = new StringDecoder(new VerifiableProperties());
+
+            kafkaStmr.setKeyDecoder(strDecoder);
+            kafkaStmr.setValueDecoder(strDecoder);
 
             // Start kafka streamer.
             kafkaStmr.start();
 
             final CountDownLatch latch = new CountDownLatch(CNT);
+
             IgniteBiPredicate<UUID, CacheEvent> locLsnr = new IgniteBiPredicate<UUID, CacheEvent>() {
-                @Override
-                public boolean apply(UUID uuid, CacheEvent evt) {
+                @Override public boolean apply(UUID uuid, CacheEvent evt) {
                     latch.countDown();
+
                     return true;
                 }
             };
 
             ignite.events(ignite.cluster().forCacheNodes(null)).remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
-            latch.await();
 
-            for (Map.Entry<String, String> entry : keyValueMap.entrySet()) {
-                final String key = entry.getKey();
-                final String value = entry.getValue();
+            latch.await();
 
-                final String cacheValue = cache.get(key);
-                assertEquals(value, cacheValue);
-            }
+            for (Map.Entry<String, String> entry : keyValMap.entrySet())
+                assertEquals(entry.getValue(), cache.get(entry.getKey()));
         }
-
         finally {
-            // Shutdown kafka streamer.
-            kafkaStmr.stop();
+            if (kafkaStmr != null)
+                kafkaStmr.stop();
         }
     }
 
     /**
      * Creates default consumer config.
      *
-     * @param zooKeeper Zookeeper address <server:port>.
-     * @param groupId Group Id for kafka subscriber.
-     * @return {@link ConsumerConfig} kafka consumer configuration.
+     * @param zooKeeper ZooKeeper address &lt;server:port&gt;.
+     * @param grpId Group Id for kafka subscriber.
+     * @return Kafka consumer configuration.
      */
-    private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String groupId) {
+    private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String grpId) {
         A.notNull(zooKeeper, "zookeeper");
-        A.notNull(groupId, "groupId");
+        A.notNull(grpId, "groupId");
 
         Properties props = new Properties();
+
         props.put("zookeeper.connect", zooKeeper);
-        props.put("group.id", groupId);
+        props.put("group.id", grpId);
         props.put("zookeeper.session.timeout.ms", "400");
         props.put("zookeeper.sync.time.ms", "200");
         props.put("auto.commit.interval.ms", "1000");
@@ -226,5 +224,4 @@ public class KafkaIgniteStreamerSelfTest
 
         return new ConsumerConfig(props);
     }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
index b836b44..1ef4f77 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
@@ -18,29 +18,36 @@
 package org.apache.ignite.stream.kafka;
 
 import kafka.producer.*;
+import kafka.utils.*;
 
 /**
- * Simple Partitioner for Kafka.
+ * Simple partitioner for Kafka.
  */
 @SuppressWarnings("UnusedDeclaration")
-public class SimplePartitioner
-    implements Partitioner {
+public class SimplePartitioner implements Partitioner {
+    /**
+     * Constructs instance.
+     *
+     * @param props Properties.
+     */
+    public SimplePartitioner(VerifiableProperties props) {
+        // No-op.
+    }
 
     /**
      * Partitions the key based on the key value.
      *
      * @param key Key.
-     * @param partitionSize Partition size.
+     * @param partSize Partition size.
      * @return partition Partition.
      */
-    public int partition(Object key, int partitionSize) {
-        int partition = 0;
+    public int partition(Object key, int partSize) {
         String keyStr = (String)key;
+
         String[] keyValues = keyStr.split("\\.");
+
         Integer intKey = Integer.parseInt(keyValues[3]);
-        if (intKey > 0) {
-            partition = intKey % partitionSize;
-        }
-        return partition;
+
+        return intKey > 0 ? intKey % partSize : 0;
     }
 }



[12/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-1060

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-1060


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

Branch: refs/heads/ignite-591
Commit: 2502b6212b59832a03882adc554e655b51725230
Parents: d685e82 6ebcb6d
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 30 16:54:23 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 30 16:54:23 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../core/src/test/config/spark/spark-config.xml |  46 +++
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++++++++++++++
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 +++-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 ++
 11 files changed, 443 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[22/50] incubator-ignite git commit: IGNITE-1059: Fixed (thanks to Atri for help).

Posted by se...@apache.org.
IGNITE-1059: Fixed (thanks to Atri for help).


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

Branch: refs/heads/ignite-591
Commit: 5269baba23e062e19981cd4c09d6f2271925fffd
Parents: 204823c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Jul 1 16:35:38 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Jul 1 16:35:38 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheFutureImpl.java | 42 ++++++++++++++++++++
 .../processors/cache/IgniteCacheProxy.java      |  2 +-
 .../internal/util/future/IgniteFutureImpl.java  | 18 +++++++--
 3 files changed, 57 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5269baba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
new file mode 100644
index 0000000..06c28e6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
@@ -0,0 +1,42 @@
+/*
+ * 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.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+/**
+ * Implementation of public API future for cache.
+ */
+public class IgniteCacheFutureImpl<V> extends IgniteFutureImpl<V> {
+    /**
+     * Constructor.
+     *
+     * @param fut Internal future.
+     */
+    public IgniteCacheFutureImpl(IgniteInternalFuture<V> fut) {
+        super(fut);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected RuntimeException convertException(IgniteCheckedException e) {
+        return CU.convertToCacheException(e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5269baba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 48fd259..3360727 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -1555,7 +1555,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      * @param fut Future for async operation.
      */
     private <R> void setFuture(IgniteInternalFuture<R> fut) {
-        curFut.set(new IgniteFutureImpl<>(fut));
+        curFut.set(new IgniteCacheFutureImpl<>(fut));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5269baba/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
index 86ad438..764e0ea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
@@ -100,7 +100,7 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
             return fut.cancel();
         }
         catch (IgniteCheckedException e) {
-            throw U.convertException(e);
+            throw convertException(e);
         }
     }
 
@@ -110,7 +110,7 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
             return fut.get();
         }
         catch (IgniteCheckedException e) {
-            throw U.convertException(e);
+            throw convertException(e);
         }
     }
 
@@ -120,7 +120,7 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
             return fut.get(timeout);
         }
         catch (IgniteCheckedException e) {
-            throw U.convertException(e);
+            throw convertException(e);
         }
     }
 
@@ -130,10 +130,20 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
             return fut.get(timeout, unit);
         }
         catch (IgniteCheckedException e) {
-            throw U.convertException(e);
+            throw convertException(e);
         }
     }
 
+    /**
+     * Convert internal exception to public exception.
+     *
+     * @param e Internal exception.
+     * @return Public excpetion.
+     */
+    protected RuntimeException convertException(IgniteCheckedException e) {
+        return U.convertException(e);
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return "IgniteFuture [orig=" + fut + ']';


[11/50] incubator-ignite git commit: IGNITE-1062 Added tests.

Posted by se...@apache.org.
IGNITE-1062 Added tests.


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

Branch: refs/heads/ignite-591
Commit: 6ebcb6de192e1916e58226990eb9d9ec759da6ef
Parents: 8006a84
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jun 30 16:51:15 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jun 30 16:51:15 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         | 26 +--------
 .../IgniteTopologyPrintFormatSelfTest.java      | 60 +++++++++++++++++++-
 2 files changed, 61 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ebcb6de/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 1d555e4..a8ce8ff 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
@@ -101,7 +101,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     /** Predicate filtering client nodes. */
     private static final IgnitePredicate<ClusterNode> clientFilter = new P1<ClusterNode>() {
         @Override public boolean apply(ClusterNode n) {
-            return n.isClient();
+            return CU.clientNode(n);
         }
     };
 
@@ -940,9 +940,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
         Collection<ClusterNode> rmtNodes = discoCache.remoteNodes();
 
-        Collection<ClusterNode> serverNodes = discoCache.serverNodes();
+        Collection<ClusterNode> serverNodes = F.view(discoCache.allNodes(), F.not(clientFilter));
 
-        Collection<ClusterNode> clientNodes = discoCache.clientNodes();
+        Collection<ClusterNode> clientNodes = F.view(discoCache.allNodes(), clientFilter);
 
         ClusterNode locNode = discoCache.localNode();
 
@@ -2122,12 +2122,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         /** Remote nodes. */
         private final List<ClusterNode> rmtNodes;
 
-        /** Client nodes. */
-        private final List<ClusterNode> clientNodes;
-
-        /** Server nodes. */
-        private final List<ClusterNode> serverNodes;
-
         /** All nodes. */
         private final List<ClusterNode> allNodes;
 
@@ -2216,10 +2210,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
             all.addAll(rmtNodes);
 
-            clientNodes = Collections.unmodifiableList(new ArrayList<>(F.view(all, clientFilter)));
-
-            serverNodes = Collections.unmodifiableList(new ArrayList<>(F.view(all, F.not(clientFilter))));
-
             Collections.sort(all, GridNodeOrderComparator.INSTANCE);
 
             allNodes = Collections.unmodifiableList(all);
@@ -2370,16 +2360,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
             return rmtNodes;
         }
 
-        /** @return Server nodes. */
-        Collection<ClusterNode> serverNodes() {
-            return serverNodes;
-        }
-
-        /** @return Client nodes. */
-        Collection<ClusterNode> clientNodes() {
-            return clientNodes;
-        }
-
         /** @return All nodes. */
         Collection<ClusterNode> allNodes() {
             return allNodes;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ebcb6de/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
index efbc431..2a71f28 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
@@ -56,11 +56,16 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
         TcpDiscoverySpi disc = new TcpDiscoverySpi();
         disc.setIpFinder(IP_FINDER);
 
-        cfg.setDiscoverySpi(disc);
-
         if (gridName.endsWith("client"))
             cfg.setClientMode(true);
 
+        if (gridName.endsWith("client_force_server")) {
+            cfg.setClientMode(true);
+            disc.setForceServerMode(true);
+        }
+
+        cfg.setDiscoverySpi(disc);
+
         return cfg;
     }
 
@@ -176,6 +181,57 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testForceServerAndClientLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.INFO);
+
+        doForceServerAndClientTest(log);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testForceServerAndClientDebugLogs() throws Exception {
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.DEBUG);
+
+        doForceServerAndClientTest(log);
+    }
+
+    /**
+     * @param log Log.
+     * @throws Exception If failed.
+     */
+    private void doForceServerAndClientTest(MockLogger log) throws Exception {
+        try {
+            Ignite server = startGrid("server");
+
+            setLogger(log, server);
+
+            Ignite server1 = startGrid("server1");
+            Ignite client1 = startGrid("first client");
+            Ignite client2 = startGrid("second client");
+            Ignite forceServClnt3 = startGrid("third client_force_server");
+
+            waitForDiscovery(server, server1, client1, client2, forceServClnt3);
+        }
+        finally {
+            stopAllGrids();
+        }
+
+        assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
+            @Override public boolean apply(String s) {
+                return s.contains("Topology snapshot [ver=5, server nodes=2, client nodes=3,")
+                    || (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 3"));
+            }
+        }));
+    }
+
+    /**
      * Set log.
      *
      * @param log Log.


[32/50] incubator-ignite git commit: # ignite-gg-10416 Extract opne command from visor cmd.

Posted by se...@apache.org.
# ignite-gg-10416 Extract opne command from visor cmd.


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

Branch: refs/heads/ignite-591
Commit: fcff50e386d7f8e7ab1c00b86921f667d646d819
Parents: ad3e6af
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 11:31:31 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 13:53:00 2015 +0700

----------------------------------------------------------------------
 .../ignite/visor/commands/VisorConsole.scala    |   3 +-
 .../visor/commands/open/VisorOpenCommand.scala  | 319 +++++++++++++++++++
 .../scala/org/apache/ignite/visor/visor.scala   | 231 +-------------
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |   2 +
 .../commands/kill/VisorKillCommandSpec.scala    |   1 +
 .../commands/start/VisorStartCommandSpec.scala  |   1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |   1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |   1 +
 8 files changed, 340 insertions(+), 219 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index d4ac39d..bcfc6e0 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -71,6 +71,7 @@ class VisorConsole {
         org.apache.ignite.visor.commands.gc.VisorGcCommand
         org.apache.ignite.visor.commands.kill.VisorKillCommand
         org.apache.ignite.visor.commands.node.VisorNodeCommand
+        org.apache.ignite.visor.commands.open.VisorOpenCommand
         org.apache.ignite.visor.commands.ping.VisorPingCommand
         org.apache.ignite.visor.commands.start.VisorStartCommand
         org.apache.ignite.visor.commands.tasks.VisorTasksCommand
@@ -178,7 +179,7 @@ class VisorConsole {
                     buf.append(line.dropRight(1))
                 }
                 else {
-                    if (buf.size != 0) {
+                    if (buf.nonEmpty) {
                         buf.append(line)
 
                         line = buf.toString()

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
new file mode 100644
index 0000000..6498baf
--- /dev/null
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
@@ -0,0 +1,319 @@
+/*
+ *
+ *  * 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.visor.commands.open
+
+import org.apache.ignite.IgniteSystemProperties._
+import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.internal.IgniteComponentType._
+import org.apache.ignite.internal.IgniteEx
+import org.apache.ignite.internal.util.scala.impl
+import org.apache.ignite.internal.util.spring.IgniteSpringHelper
+import org.apache.ignite.internal.util.{IgniteUtils => U}
+import org.apache.ignite.logger.NullLogger
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
+import org.apache.ignite.visor.commands.common.{VisorConsoleCommand, VisorTextTable}
+import org.apache.ignite.visor.visor._
+import org.apache.ignite.visor.{VisorTag, visor}
+import org.apache.ignite.{IgniteException, IgniteSystemProperties, Ignition}
+
+import java.net.URL
+
+import scala.language.{implicitConversions, reflectiveCalls}
+
+/**
+ * ==Overview==
+ * Contains Visor command `node` implementation.
+ *
+ * ==Help==
+ * {{{
+ * +--------------------------------+
+ * | node | Prints node statistics. |
+ * +--------------------------------+
+ * }}}
+ *
+ * ====Specification====
+ * {{{
+ *     node "{-id8=<node-id8>|-id=<node-id>} {-a}"
+ *     node
+ * }}}
+ *
+ * ====Arguments====
+ * {{{
+ *     -id8=<node-id8>
+ *         ID8 of node. Either '-id8' or '-id' can be specified.
+ *         If neither specified - command starts in interactive mode.
+ *     -id=<node-id>
+ *         Full ID of node. Either '-id8' or '-id' can  be specified.
+ *         If neither specified - command starts in interactive mode.
+ *     -a
+ *         Print extended information.
+ *         By default - only abbreviated statistics is printed.
+ * }}}
+ *
+ * ====Examples====
+ * {{{
+ *     node
+ *         Starts command in interactive mode.
+ *     node "-id8=12345678"
+ *         Prints statistics for specified node.
+ *     node "-id8=12345678 -a"
+ *         Prints full statistics for specified node.
+ * }}}
+ */
+class VisorOpenCommand extends VisorConsoleCommand {
+    @impl protected val name = "open"
+
+    /** Default configuration path relative to Ignite home. */
+    private final val DFLT_CFG = "config/default-config.xml"
+
+    /**
+     * ==Command==
+     * Connects Visor console to the default grid.
+     *
+     * ==Example==
+     * <ex>open</ex>
+     * Connects to the default grid.
+     */
+    def open() {
+        open("")
+    }
+
+    /**
+     * ==Command==
+     * Connects Visor console to default or named grid.
+     *
+     * ==Examples==
+     * <ex>open -g=mygrid</ex>
+     * Connects to 'mygrid' grid.
+     *
+     * @param args Command arguments.
+     */
+    def open(args: String) {
+        assert(args != null)
+
+        if (isConnected) {
+            warn("Visor is already connected. Disconnect first.")
+
+            return
+        }
+
+        try {
+            def configuration(path: String): IgniteConfiguration = {
+                assert(path != null)
+
+                val url =
+                    try
+                        new URL(path)
+                    catch {
+                        case e: Exception =>
+                            val url = U.resolveIgniteUrl(path)
+
+                            if (url == null)
+                                throw new IgniteException("Ignite configuration path is invalid: " + path, e)
+
+                            url
+                    }
+
+                // Add no-op logger to remove no-appender warning.
+                val log4jTup =
+                    if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
+                        U.addLog4jNoOpLogger()
+                    else
+                        null
+
+                val spring: IgniteSpringHelper = SPRING.create(false)
+
+                val cfgs =
+                    try
+                        // Cache, IGFS, indexing SPI configurations should be excluded from daemon node config.
+                        spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
+                            "indexingSpi").get1()
+                    finally {
+                        if (log4jTup != null)
+                            U.removeLog4jNoOpLogger(log4jTup)
+                    }
+
+                if (cfgs == null || cfgs.isEmpty)
+                    throw new IgniteException("Can't find grid configuration in: " + url)
+
+                if (cfgs.size > 1)
+                    throw new IgniteException("More than one grid configuration found in: " + url)
+
+                val cfg = cfgs.iterator().next()
+
+                // Setting up 'Config URL' for properly print in console.
+                System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
+
+                var cpuCnt = Runtime.getRuntime.availableProcessors
+
+                if (cpuCnt < 4)
+                    cpuCnt = 4
+
+                cfg.setConnectorConfiguration(null)
+
+                // All thread pools are overridden to have size equal to number of CPUs.
+                cfg.setPublicThreadPoolSize(cpuCnt)
+                cfg.setSystemThreadPoolSize(cpuCnt)
+                cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
+
+                var ioSpi = cfg.getCommunicationSpi
+
+                if (ioSpi == null)
+                    ioSpi = new TcpCommunicationSpi()
+
+                cfg
+            }
+
+            val argLst = parseArgs(args)
+
+            val path = argValue("cpath", argLst)
+            val dflt = hasArgFlag("d", argLst)
+
+            val (cfg, cfgPath) =
+                if (path.isDefined)
+                    (configuration(path.get), path.get)
+                else if (dflt)
+                    (configuration(DFLT_CFG), "<default>")
+                else {
+                    // If configuration file is not defined in arguments,
+                    // ask to choose from the list
+                    askConfigFile() match {
+                        case Some(p) =>
+                            nl()
+
+                            (VisorTextTable() +=("Using configuration", p)) render()
+
+                            nl()
+
+                            (configuration(p), p)
+                        case None =>
+                            return
+                    }
+                }
+
+            open(cfg, cfgPath)
+        }
+        catch {
+            case e: IgniteException =>
+                warn(e.getMessage)
+                warn("Type 'help open' to see how to use this command.")
+
+                status("q")
+        }
+    }
+
+    /**
+     * Connects Visor console to configuration with path.
+     *
+     * @param cfg Configuration.
+     * @param cfgPath Configuration path.
+     */
+    def open(cfg: IgniteConfiguration, cfgPath: String) = {
+        val daemon = Ignition.isDaemon
+
+        val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
+
+        // Make sure Visor console starts as daemon node.
+        Ignition.setDaemon(true)
+
+        // Make sure visor starts without shutdown hook.
+        System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
+
+        // Set NullLoger in quite mode.
+        if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
+            cfg.setGridLogger(new NullLogger)
+
+        val startedGridName = try {
+            Ignition.start(cfg).name
+        }
+        finally {
+            Ignition.setDaemon(daemon)
+
+            System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
+        }
+
+        ignite =
+            try
+                Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+            catch {
+                case _: IllegalStateException =>
+                    throw new IgniteException("Named grid unavailable: " + startedGridName)
+            }
+
+        visor.open(startedGridName, cfgPath)
+    }
+}
+
+/**
+ * Companion object that does initialization of the command.
+ */
+object VisorOpenCommand {
+    /** Singleton command. */
+    private val cmd = new VisorOpenCommand
+
+    // Adds command's help to visor.
+    addHelp(
+        name = "open",
+        shortInfo = "Connects Visor console to the grid.",
+        longInfo = Seq(
+            "Connects Visor console to the grid. Note that P2P class loading",
+            "should be enabled on all nodes.",
+            " ",
+            "If neither '-cpath' or '-d' are provided, command will ask",
+            "user to select Ignite configuration file in interactive mode."
+        ),
+        spec = Seq(
+            "open -cpath=<path>",
+            "open -d"
+        ),
+        args = Seq(
+            "-cpath=<path>" -> Seq(
+                "Ignite configuration path.",
+                "Can be absolute, relative to Ignite home folder or any well formed URL."
+            ),
+            "-d" -> Seq(
+                "Flag forces the command to connect to grid using default Ignite configuration file.",
+                "without interactive mode."
+            )
+        ),
+        examples = Seq(
+            "open" ->
+                "Prompts user to select Ignite configuration file in interactive mode.",
+            "open -d" ->
+                "Connects Visor console to grid using default Ignite configuration file.",
+            "open -cpath=/gg/config/mycfg.xml" ->
+                "Connects Visor console to grid using Ignite configuration from provided file."
+        ),
+        emptyArgs = cmd.open,
+        withArgs = cmd.open
+    )
+
+    /**
+     * Singleton.
+     */
+    def apply() = cmd
+
+    /**
+     * Implicit converter from visor to commands "pimp".
+     *
+     * @param vs Visor tagging trait.
+     */
+    implicit def fromNode2Visor(vs: VisorTag): VisorOpenCommand = cmd
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 5f63f23..67e3d70 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -17,23 +17,17 @@
 
 package org.apache.ignite.visor
 
-import org.apache.ignite.IgniteSystemProperties._
 import org.apache.ignite._
 import org.apache.ignite.cluster.{ClusterGroup, ClusterGroupEmptyException, ClusterMetrics, ClusterNode}
-import org.apache.ignite.configuration.IgniteConfiguration
 import org.apache.ignite.events.EventType._
 import org.apache.ignite.events.{DiscoveryEvent, Event}
-import org.apache.ignite.internal.IgniteComponentType._
 import org.apache.ignite.internal.IgniteEx
 import org.apache.ignite.internal.IgniteNodeAttributes._
 import org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
-import org.apache.ignite.internal.util.spring.IgniteSpringHelper
 import org.apache.ignite.internal.util.typedef._
 import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils => U}
 import org.apache.ignite.lang._
-import org.apache.ignite.logger.NullLogger
-import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
 import org.apache.ignite.thread.IgniteThreadPoolExecutor
 import org.apache.ignite.visor.commands.common.VisorTextTable
 
@@ -213,9 +207,6 @@ object visor extends VisorTag {
      */
     private final val DFLT_LOG_PATH = "visor/visor-log"
 
-    /** Default configuration path relative to Ignite home. */
-    private final val DFLT_CFG = "config/default-config.xml"
-
     /** Log file. */
     private var logFile: File = null
 
@@ -429,42 +420,6 @@ object visor extends VisorTag {
         withArgs = status
     )
 
-    addHelp(
-        name = "open",
-        shortInfo = "Connects Visor console to the grid.",
-        longInfo = Seq(
-            "Connects Visor console to the grid. Note that P2P class loading",
-            "should be enabled on all nodes.",
-            " ",
-            "If neither '-cpath' or '-d' are provided, command will ask",
-            "user to select Ignite configuration file in interactive mode."
-        ),
-        spec = Seq(
-            "open -cpath=<path>",
-            "open -d"
-        ),
-        args = Seq(
-            "-cpath=<path>" -> Seq(
-                "Ignite configuration path.",
-                "Can be absolute, relative to Ignite home folder or any well formed URL."
-            ),
-            "-d" -> Seq(
-                "Flag forces the command to connect to grid using default Ignite configuration file.",
-                "without interactive mode."
-            )
-        ),
-        examples = Seq(
-            "open" ->
-                "Prompts user to select Ignite configuration file in interactive mode.",
-            "open -d" ->
-                "Connects Visor console to grid using default Ignite configuration file.",
-            "open -cpath=/gg/config/mycfg.xml" ->
-                "Connects Visor console to grid using Ignite configuration from provided file."
-        ),
-        emptyArgs = open,
-        withArgs = open
-    )
-
     /**
      * @param name - command name.
      */
@@ -980,7 +935,7 @@ object visor extends VisorTag {
 
             val sb = new StringBuilder()
 
-            for (i <- 0 until lst.size if lst(i).nonEmpty || sb.size != 0) {
+            for (i <- 0 until lst.size if lst(i).nonEmpty || sb.nonEmpty) {
                 val arg = sb.toString + lst(i)
 
                 arg match {
@@ -1007,7 +962,7 @@ object visor extends VisorTag {
     def hasArgValue(@Nullable v: String, args: ArgList): Boolean = {
         assert(args != null)
 
-        args.find(_._2 == v).nonEmpty
+        args.exists(_._2 == v)
     }
 
     /**
@@ -1019,7 +974,7 @@ object visor extends VisorTag {
     def hasArgName(@Nullable n: String, args: ArgList): Boolean = {
         assert(args != null)
 
-        args.find(_._1 == n).nonEmpty
+        args.exists(_._1 == n)
     }
 
     /**
@@ -1032,7 +987,7 @@ object visor extends VisorTag {
     def hasArgFlag(n: String, args: ArgList): Boolean = {
         assert(n != null && args != null)
 
-        args.find((a) => a._1 == n && a._2 == null).nonEmpty
+        args.exists((a) => a._1 == n && a._2 == null)
     }
 
     /**
@@ -1525,170 +1480,22 @@ object visor extends VisorTag {
     private def blank(len: Int) = new String().padTo(len, ' ')
 
     /**
-     * ==Command==
-     * Connects Visor console to default or named grid.
-     *
-     * ==Examples==
-     * <ex>open -g=mygrid</ex>
-     * Connects to 'mygrid' grid.
-     *
-     * @param args Command arguments.
-     */
-    def open(args: String) {
-        assert(args != null)
-
-        if (isConnected) {
-            warn("Visor is already connected. Disconnect first.")
-
-            return
-        }
-
-        try {
-            def configuration(path: String): IgniteConfiguration = {
-                assert(path != null)
-
-                val url =
-                    try
-                        new URL(path)
-                    catch {
-                        case e: Exception =>
-                            val url = U.resolveIgniteUrl(path)
-
-                            if (url == null)
-                                throw new IgniteException("Ignite configuration path is invalid: " + path, e)
-
-                            url
-                    }
-
-                // Add no-op logger to remove no-appender warning.
-                val log4jTup =
-                    if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
-                        U.addLog4jNoOpLogger()
-                    else
-                        null
-
-                val spring: IgniteSpringHelper = SPRING.create(false)
-
-                val cfgs =
-                    try
-                        // Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
-                        spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
-                            "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
-                            "interopConfiguration", "indexingSpi").get1()
-                    finally {
-                        if (log4jTup != null)
-                            U.removeLog4jNoOpLogger(log4jTup)
-                    }
-
-                if (cfgs == null || cfgs.isEmpty)
-                    throw new IgniteException("Can't find grid configuration in: " + url)
-
-                if (cfgs.size > 1)
-                    throw new IgniteException("More than one grid configuration found in: " + url)
-
-                val cfg = cfgs.iterator().next()
-
-                // Setting up 'Config URL' for properly print in console.
-                System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
-
-                var cpuCnt = Runtime.getRuntime.availableProcessors
-
-                if (cpuCnt < 4)
-                    cpuCnt = 4
-
-                cfg.setConnectorConfiguration(null)
-
-                // All thread pools are overridden to have size equal to number of CPUs.
-                cfg.setPublicThreadPoolSize(cpuCnt)
-                cfg.setSystemThreadPoolSize(cpuCnt)
-                cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
-
-                var ioSpi = cfg.getCommunicationSpi
-
-                if (ioSpi == null)
-                    ioSpi = new TcpCommunicationSpi()
-
-                cfg
-            }
-
-            val argLst = parseArgs(args)
-
-            val path = argValue("cpath", argLst)
-            val dflt = hasArgFlag("d", argLst)
-
-            val (cfg, cfgPath) =
-                if (path.isDefined)
-                    (configuration(path.get), path.get)
-                else if (dflt)
-                    (configuration(DFLT_CFG), "<default>")
-                else {
-                    // If configuration file is not defined in arguments,
-                    // ask to choose from the list
-                    askConfigFile() match {
-                        case Some(p) =>
-                            nl()
-
-                            (VisorTextTable() +=("Using configuration", p)) render()
-
-                            nl()
-
-                            (configuration(p), p)
-                        case None =>
-                            return
-                    }
-                }
-
-            open(cfg, cfgPath)
-        }
-        catch {
-            case e: IgniteException =>
-                warn(e.getMessage)
-                warn("Type 'help open' to see how to use this command.")
-
-                status("q")
-        }
-    }
-
-    /**
      * Connects Visor console to configuration with path.
      *
-     * @param cfg Configuration.
+     * @param gridName Name of grid instance.
      * @param cfgPath Configuration path.
      */
-    def open(cfg: IgniteConfiguration, cfgPath: String) {
-        val daemon = Ignition.isDaemon
-
-        val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
-
-        // Make sure Visor console starts as daemon node.
-        Ignition.setDaemon(true)
-
-        // Make sure visor starts without shutdown hook.
-        System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
-
-        // Set NullLoger in quite mode.
-        if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
-            cfg.setGridLogger(new NullLogger)
-
-        val startedGridName = try {
-             Ignition.start(cfg).name
-        }
-        finally {
-            Ignition.setDaemon(daemon)
-
-            System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
-        }
-
+    def open(gridName: String, cfgPath: String) {
         this.cfgPath = cfgPath
 
         ignite =
             try
-                Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+                Ignition.ignite(gridName).asInstanceOf[IgniteEx]
             catch {
                 case _: IllegalStateException =>
                     this.cfgPath = null
 
-                    throw new IgniteException("Named grid unavailable: " + startedGridName)
+                    throw new IgniteException("Named grid unavailable: " + gridName)
             }
 
         assert(cfgPath != null)
@@ -1824,18 +1631,6 @@ object visor extends VisorTag {
     }
 
     /**
-     * ==Command==
-     * Connects Visor console to the default grid.
-     *
-     * ==Example==
-     * <ex>open</ex>
-     * Connects to the default grid.
-     */
-    def open() {
-        open("")
-    }
-
-    /**
      * Returns string with node id8, its memory variable, if available, and its
      * IP address (first internal address), if node is alive.
      *
@@ -2016,7 +1811,7 @@ object visor extends VisorTag {
         else if (nodes.size == 1)
             Some(nodes.head.id)
         else {
-            (0 until nodes.size) foreach (i => {
+            nodes.indices foreach (i => {
                 val n = nodes(i)
 
                 val m = n.metrics
@@ -2080,7 +1875,7 @@ object visor extends VisorTag {
             None
         }
         else {
-            (0 until neighborhood.size) foreach (i => {
+            neighborhood.indices foreach (i => {
                 val neighbors = neighborhood(i)
 
                 var ips = immutable.Set.empty[String]
@@ -2229,7 +2024,7 @@ object visor extends VisorTag {
 
         val ids = ignite.cluster.forRemotes().nodes().map(nid8).toList
 
-        (0 until ids.size).foreach(i => println((i + 1) + ": " + ids(i)))
+        ids.indices.foreach(i => println((i + 1) + ": " + ids(i)))
 
         nl()
 
@@ -2758,7 +2553,7 @@ object visor extends VisorTag {
         help()
     }
 
-    lazy val commands = cmdLst.map(_.name) ++ cmdLst.map(_.aliases).flatten
+    lazy val commands = cmdLst.map(_.name) ++ cmdLst.flatMap(_.aliases)
 
     def searchCmd(cmd: String) = cmdLst.find(c => c.name.equals(cmd) || (c.aliases != null && c.aliases.contains(cmd)))
 
@@ -2851,7 +2646,7 @@ object visor extends VisorTag {
 
                 var dec = BigDecimal.valueOf(0L)
 
-                for (i <- 0 until octets.length) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
+                for (i <- octets.indices) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
 
                 dec
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
index f27bae3..1c5e232 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
@@ -19,6 +19,8 @@ package org.apache.ignite.visor
 
 import org.apache.ignite.Ignition
 import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
+
 import org.scalatest._
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
index 2c659b5..4719606 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.kill
 import org.apache.ignite.visor.visor
 import org.scalatest._
 
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
 import org.apache.ignite.visor.commands.kill.VisorKillCommand._
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
index c6404b5..49a861c 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.start
 import org.apache.ignite.visor.visor
 import org.scalatest._
 
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
 import org.apache.ignite.visor.commands.start.VisorStartCommand._
 import org.apache.ignite.visor.commands.top.VisorTopologyCommand._
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
index db07543..fe364bc 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
@@ -26,6 +26,7 @@ import org.scalatest._
 
 import java.util
 
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
 import org.apache.ignite.visor.commands.tasks.VisorTasksCommand._
 
 import scala.collection.JavaConversions._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
index 1a4bc3e..022f6d6 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.vvm
 import org.apache.ignite.visor.visor
 import org.scalatest._
 
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
 import org.apache.ignite.visor.commands.vvm.VisorVvmCommand._
 
 /**


[40/50] incubator-ignite git commit: IGNITE-621 - Merge branch ignite-621 into sprint-7

Posted by se...@apache.org.
IGNITE-621 - Merge branch ignite-621 into sprint-7


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

Branch: refs/heads/ignite-591
Commit: 1427d75b9ea46d3044caddc51b44c03abc71901d
Parents: c866902 ac93958
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jul 2 12:10:09 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jul 2 12:10:09 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../processors/cache/CacheOperationContext.java |  44 ++++-
 .../processors/cache/GridCacheAdapter.java      |  91 ++++++----
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheUtils.java        |  42 +++++
 .../processors/cache/IgniteCacheProxy.java      |  36 +++-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 +++++++++++++++++--
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +--
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +--
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 +++++++++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 ++++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 22 files changed, 665 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1427d75b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------


[46/50] incubator-ignite git commit: ignite-428 Implement IgniteKafkaStreamer to stream data from Apache Kafka

Posted by se...@apache.org.
ignite-428 Implement IgniteKafkaStreamer to stream data from Apache Kafka


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

Branch: refs/heads/ignite-591
Commit: 2c41739dcd83751270b6bd30c6f2595edc68a1b1
Parents: 9f6a7f9
Author: vishal.garg <vi...@workday.com>
Authored: Mon Jun 22 19:35:08 2015 -0700
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:39:11 2015 +0300

----------------------------------------------------------------------
 modules/kafka/pom.xml                           | 128 +++++++
 .../ignite/stream/kafka/KafkaStreamer.java      | 179 +++++++++
 .../stream/kafka/KafkaEmbeddedBroker.java       | 373 +++++++++++++++++++
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 230 ++++++++++++
 .../ignite/stream/kafka/SimplePartitioner.java  |  46 +++
 pom.xml                                         |   1 +
 6 files changed, 957 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
new file mode 100644
index 0000000..165ec1c
--- /dev/null
+++ b/modules/kafka/pom.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!--
+    POM file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../parent</relativePath>
+    </parent>
+
+    <artifactId>ignite-kafka</artifactId>
+    <version>1.1.1-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka_2.10</artifactId>
+            <version>0.8.2.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.sun.jmx</groupId>
+                    <artifactId>jmxri</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.sun.jdmk</groupId>
+                    <artifactId>jmxtools</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>net.sf.jopt-simple</groupId>
+                    <artifactId>jopt-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.zookeeper</groupId>
+                    <artifactId>zookeeper</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.4.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-log4j</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <version>4.2</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.gridgain</groupId>
+            <artifactId>ignite-shmem</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.8.3</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-spring</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
new file mode 100644
index 0000000..e0240ce
--- /dev/null
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
@@ -0,0 +1,179 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.stream.*;
+
+import kafka.consumer.*;
+import kafka.javaapi.consumer.ConsumerConnector;
+import kafka.message.*;
+import kafka.serializer.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Server that subscribes to topic messages from Kafka broker, streams its to key-value pairs into {@link
+ * org.apache.ignite.IgniteDataStreamer} instance.
+ * <p>
+ * Uses Kafka's High Level Consumer API to read messages from Kafka
+ *
+ * @see <a href="https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example">Consumer Consumer Group
+ * Example</a>
+ */
+public class KafkaStreamer<T, K, V>
+    extends StreamAdapter<T, K, V> {
+
+    /** Logger. */
+    private IgniteLogger log;
+
+    /** Executor used to submit kafka streams. */
+    private ExecutorService executor;
+
+    /** Topic. */
+    private String topic;
+
+    /** Number of threads to process kafka streams. */
+    private int threads;
+
+    /** Kafka Consumer Config. */
+    private ConsumerConfig consumerConfig;
+
+    /** Key Decoder. */
+    private Decoder<K> keyDecoder;
+
+    /** Value Decoder. */
+    private Decoder<V> valueDecoder;
+
+    /** Kafka Consumer connector. */
+    private ConsumerConnector consumer;
+
+    /**
+     * Sets the topic.
+     *
+     * @param topic Topic Name.
+     */
+    public void setTopic(final String topic) {
+        this.topic = topic;
+    }
+
+    /**
+     * Sets the threads.
+     *
+     * @param threads Number of Threads.
+     */
+    public void setThreads(final int threads) {
+        this.threads = threads;
+    }
+
+    /**
+     * Sets the consumer config.
+     *
+     * @param consumerConfig  Consumer configuration.
+     */
+    public void setConsumerConfig(final ConsumerConfig consumerConfig) {
+        this.consumerConfig = consumerConfig;
+    }
+
+    /**
+     * Sets the key decoder.
+     *
+     * @param keyDecoder Key Decoder.
+     */
+    public void setKeyDecoder(final Decoder<K> keyDecoder) {
+        this.keyDecoder = keyDecoder;
+    }
+
+    /**
+     * Sets the value decoder.
+     *
+     * @param valueDecoder Value Decoder
+     */
+    public void setValueDecoder(final Decoder<V> valueDecoder) {
+        this.valueDecoder = valueDecoder;
+    }
+
+    /**
+     * Starts streamer.
+     *
+     * @throws IgniteException If failed.
+     */
+    public void start() {
+        A.notNull(getStreamer(), "streamer");
+        A.notNull(getIgnite(), "ignite");
+        A.notNull(topic, "topic");
+        A.notNull(keyDecoder, "key decoder");
+        A.notNull(valueDecoder, "value decoder");
+        A.notNull(consumerConfig, "kafka consumer config");
+        A.ensure(threads > 0, "threads > 0");
+
+        log = getIgnite().log();
+
+        consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerConfig);
+
+        Map<String, Integer> topicCountMap = new HashMap<>();
+        topicCountMap.put(topic, threads);
+
+        Map<String, List<KafkaStream<K, V>>> consumerMap = consumer.createMessageStreams(topicCountMap, keyDecoder,
+            valueDecoder);
+
+        List<KafkaStream<K, V>> streams = consumerMap.get(topic);
+
+        // Now launch all the consumer threads.
+        executor = Executors.newFixedThreadPool(threads);
+
+        // Now create an object to consume the messages.
+        for (final KafkaStream<K,V> stream : streams) {
+            executor.submit(new Runnable() {
+                @Override public void run() {
+
+                    ConsumerIterator<K, V> it = stream.iterator();
+
+                    while (it.hasNext()) {
+                        final MessageAndMetadata<K, V> messageAndMetadata = it.next();
+                        getStreamer().addData(messageAndMetadata.key(), messageAndMetadata.message());
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Stops streamer.
+     */
+    public void stop() {
+        if (consumer != null)
+            consumer.shutdown();
+
+        if (executor != null) {
+            executor.shutdown();
+
+            try {
+                if (!executor.awaitTermination(5000, TimeUnit.MILLISECONDS))
+                    if (log.isDebugEnabled())
+                        log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly");
+            }
+            catch (InterruptedException e) {
+                if (log.isDebugEnabled())
+                    log.debug("Interrupted during shutdown, exiting uncleanly");
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
new file mode 100644
index 0000000..28533f7
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
@@ -0,0 +1,373 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.commons.io.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.zookeeper.server.*;
+
+import kafka.admin.*;
+import kafka.api.*;
+import kafka.api.Request;
+import kafka.producer.*;
+import kafka.server.*;
+import kafka.utils.*;
+import org.I0Itec.zkclient.*;
+
+import java.io.*;
+import java.net.*;
+import java.nio.file.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Kafka Embedded Broker.
+ */
+public class KafkaEmbeddedBroker {
+
+    /** Default ZooKeeper Host. */
+    private static final String ZK_HOST = "localhost";
+
+    /** Broker Port. */
+    private static final int BROKER_PORT = 9092;
+
+    /** ZooKeeper Connection Timeout. */
+    private static final int ZK_CONNECTION_TIMEOUT = 6000;
+
+    /** ZooKeeper Session Timeout. */
+    private static final int ZK_SESSION_TIMEOUT = 6000;
+
+    /** ZooKeeper port. */
+    private static int zkPort = 0;
+
+    /** Is ZooKeeper Ready. */
+    private boolean zkReady;
+
+    /** Kafka Config. */
+    private KafkaConfig brokerConfig;
+
+    /** Kafka Server. */
+    private KafkaServer kafkaServer;
+
+    /** ZooKeeper Client. */
+    private ZkClient zkClient;
+
+    /** Embedded ZooKeeper. */
+    private EmbeddedZooKeeper zooKeeper;
+
+    /**
+     * Creates an embedded Kafka Broker.
+     */
+    public KafkaEmbeddedBroker() {
+        try {
+            setupEmbeddedZooKeeper();
+            setupEmbeddedKafkaServer();
+        }
+        catch (IOException | InterruptedException e) {
+            throw new RuntimeException("failed to start Kafka Broker " + e);
+        }
+
+    }
+
+    /**
+     * @return ZooKeeper Address.
+     */
+    public static String getZKAddress() {
+        return ZK_HOST + ":" + zkPort;
+    }
+
+    /**
+     * Creates a Topic.
+     *
+     * @param topic topic name
+     * @param partitions number of paritions for the topic
+     * @param replicationFactor replication factor
+     * @throws TimeoutException
+     * @throws InterruptedException
+     */
+    public void createTopic(String topic, final int partitions, final int replicationFactor)
+        throws TimeoutException, InterruptedException {
+        AdminUtils.createTopic(zkClient, topic, partitions, replicationFactor, new Properties());
+        waitUntilMetadataIsPropagated(topic, 0, 10000, 100);
+    }
+
+    /**
+     * Sends message to Kafka Broker.
+     *
+     * @param keyedMessages List of Keyed Messages.
+     * @return Producer used to send the message.
+     */
+    public Producer sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
+        Producer<String, String> producer = new Producer<>(getProducerConfig());
+        producer.send(scala.collection.JavaConversions.asScalaBuffer(keyedMessages));
+        return producer;
+    }
+
+    /**
+     * Shuts down Kafka Broker.
+     *
+     * @throws IOException
+     */
+    public void shutdown()
+        throws IOException {
+
+        zkReady = false;
+
+        if (kafkaServer != null)
+            kafkaServer.shutdown();
+
+        List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerConfig.logDirs());
+
+        for (String logDir : logDirs) {
+            FileUtils.deleteDirectory(new File(logDir));
+        }
+
+        if (zkClient != null) {
+            zkClient.close();
+            zkClient = null;
+        }
+
+        if (zooKeeper != null) {
+
+            try {
+                zooKeeper.shutdown();
+            }
+            catch (IOException e) {
+                // ignore
+            }
+
+            zooKeeper = null;
+        }
+
+    }
+
+    /**
+     * @return the Zookeeper Client
+     */
+    private ZkClient getZkClient() {
+        A.ensure(zkReady, "Zookeeper not setup yet");
+        A.notNull(zkClient, "Zookeeper client is not yet initialized");
+
+        return zkClient;
+    }
+
+    /**
+     * Checks if topic metadata is propagated.
+     *
+     * @param topic topic name
+     * @param partition partition
+     * @return true if propagated otherwise false
+     */
+    private boolean isMetadataPropagated(final String topic, final int partition) {
+        final scala.Option<PartitionStateInfo> partitionStateOption = kafkaServer.apis().metadataCache().getPartitionInfo(
+            topic, partition);
+        if (partitionStateOption.isDefined()) {
+            final PartitionStateInfo partitionState = partitionStateOption.get();
+            final LeaderAndIsr leaderAndInSyncReplicas = partitionState.leaderIsrAndControllerEpoch().leaderAndIsr();
+
+            if (ZkUtils.getLeaderForPartition(getZkClient(), topic, partition) != null
+                && Request.isValidBrokerId(leaderAndInSyncReplicas.leader())
+                && leaderAndInSyncReplicas.isr().size() >= 1)
+                return true;
+
+        }
+        return false;
+    }
+
+    /**
+     * Waits until metadata is propagated.
+     *
+     * @param topic topic name
+     * @param partition partition
+     * @param timeout timeout value in millis
+     * @param interval interval in millis to sleep
+     * @throws TimeoutException
+     * @throws InterruptedException
+     */
+    private void waitUntilMetadataIsPropagated(final String topic, final int partition, final long timeout,
+        final long interval) throws TimeoutException, InterruptedException {
+        int attempt = 1;
+        final long startTime = System.currentTimeMillis();
+
+        while (true) {
+            if (isMetadataPropagated(topic, partition))
+                return;
+
+            final long duration = System.currentTimeMillis() - startTime;
+
+            if (duration < timeout)
+                Thread.sleep(interval);
+            else
+                throw new TimeoutException("metadata propagate timed out, attempt=" + attempt);
+
+            attempt++;
+        }
+
+    }
+
+    /**
+     * Sets up embedded Kafka Server
+     *
+     * @throws IOException
+     */
+    private void setupEmbeddedKafkaServer()
+        throws IOException {
+        A.ensure(zkReady, "Zookeeper should be setup before hand");
+
+        brokerConfig = new KafkaConfig(getBrokerConfig());
+        kafkaServer = new KafkaServer(brokerConfig, SystemTime$.MODULE$);
+        kafkaServer.startup();
+    }
+
+    /**
+     * Sets up embedded zooKeeper
+     *
+     * @throws IOException
+     * @throws InterruptedException
+     */
+    private void setupEmbeddedZooKeeper()
+        throws IOException, InterruptedException {
+        EmbeddedZooKeeper zooKeeper = new EmbeddedZooKeeper(ZK_HOST, zkPort);
+        zooKeeper.startup();
+        zkPort = zooKeeper.getActualPort();
+        zkClient = new ZkClient(getZKAddress(), ZK_SESSION_TIMEOUT, ZK_CONNECTION_TIMEOUT, ZKStringSerializer$.MODULE$);
+        zkReady = true;
+    }
+
+    /**
+     * @return Kafka Broker Address.
+     */
+    private static String getBrokerAddress() {
+        return ZK_HOST + ":" + BROKER_PORT;
+    }
+
+    /**
+     * Gets KafKa Brofer Config
+     *
+     * @return Kafka Broker Config
+     * @throws IOException
+     */
+    private static Properties getBrokerConfig()
+        throws IOException {
+        Properties props = new Properties();
+        props.put("broker.id", "0");
+        props.put("host.name", ZK_HOST);
+        props.put("port", "" + BROKER_PORT);
+        props.put("log.dir", createTempDir("_cfg").getAbsolutePath());
+        props.put("zookeeper.connect", getZKAddress());
+        props.put("log.flush.interval.messages", "1");
+        props.put("replica.socket.timeout.ms", "1500");
+        return props;
+    }
+
+    /**
+     * @return Kafka Producer Config
+     */
+    private static ProducerConfig getProducerConfig() {
+        Properties props = new Properties();
+        props.put("metadata.broker.list", getBrokerAddress());
+        props.put("serializer.class", "kafka.serializer.StringEncoder");
+        props.put("key.serializer.class", "kafka.serializer.StringEncoder");
+        props.put("partitioner.class", "org.apache.ignite.kafka.SimplePartitioner");
+        return new ProducerConfig(props);
+    }
+
+    /**
+     * Creates Temp Directory
+     *
+     * @param prefix prefix
+     * @return Created File.
+     * @throws IOException
+     */
+    private static File createTempDir(final String prefix)
+        throws IOException {
+        final Path path = Files.createTempDirectory(prefix);
+        return path.toFile();
+
+    }
+
+    /**
+     * Creates Embedded ZooKeeper.
+     */
+    private static class EmbeddedZooKeeper {
+        /** Default ZooKeeper Host. */
+        private final String zkHost;
+
+        /** Default ZooKeeper Port. */
+        private final int zkPort;
+
+        /** NIO Context Factory. */
+        private NIOServerCnxnFactory factory;
+
+        /** Snapshot Directory. */
+        private File snapshotDir;
+
+        /** Log Directory. */
+        private File logDir;
+
+        /**
+         * Creates an embedded Zookeeper
+         * @param zkHost zookeeper host
+         * @param zkPort zookeeper port
+         */
+        EmbeddedZooKeeper(final String zkHost, final int zkPort) {
+            this.zkHost = zkHost;
+            this.zkPort = zkPort;
+        }
+
+        /**
+         * Starts up ZooKeeper.
+         *
+         * @throws IOException
+         * @throws InterruptedException
+         */
+        void startup()
+            throws IOException, InterruptedException {
+            snapshotDir = createTempDir("_ss");
+            logDir = createTempDir("_log");
+            ZooKeeperServer zooServer = new ZooKeeperServer(snapshotDir, logDir, 500);
+            factory = new NIOServerCnxnFactory();
+            factory.configure(new InetSocketAddress(zkHost, zkPort), 16);
+            factory.startup(zooServer);
+        }
+
+        /**
+         *
+         * @return actual port zookeeper is started
+         */
+        int getActualPort() {
+            return factory.getLocalPort();
+        }
+
+        /**
+         * Shuts down ZooKeeper.
+         *
+         * @throws IOException
+         */
+        void shutdown()
+            throws IOException {
+            if (factory != null) {
+                factory.shutdown();
+
+                U.delete(snapshotDir);
+                U.delete(logDir);
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
new file mode 100644
index 0000000..5972639
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
@@ -0,0 +1,230 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.ignite.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import kafka.consumer.*;
+import kafka.producer.*;
+import kafka.serializer.*;
+import kafka.utils.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.ignite.events.EventType.*;
+
+/**
+ * Tests {@link KafkaStreamer}.
+ */
+public class KafkaIgniteStreamerSelfTest
+    extends GridCommonAbstractTest {
+    /** Embedded Kafka. */
+    private KafkaEmbeddedBroker embeddedBroker;
+
+    /** Count. */
+    private static final int CNT = 100;
+
+    /** Test Topic. */
+    private static final String TOPIC_NAME = "page_visits";
+
+    /** Kafka Partition. */
+    private static final int PARTITIONS = 4;
+
+    /** Kafka Replication Factor. */
+    private static final int REPLICATION_FACTOR = 1;
+
+    /** Topic Message Key Prefix. */
+    private static final String KEY_PREFIX = "192.168.2.";
+
+    /** Topic Message Value Url. */
+    private static final String VALUE_URL = ",www.example.com,";
+
+    /** Constructor. */
+    public KafkaIgniteStreamerSelfTest() {
+        super(true);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void beforeTest()
+        throws Exception {
+        grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
+
+        embeddedBroker = new KafkaEmbeddedBroker();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void afterTest()
+        throws Exception {
+        grid().cache(null).clear();
+
+        embeddedBroker.shutdown();
+    }
+
+    /**
+     * Tests Kafka streamer.
+     *
+     * @throws TimeoutException
+     * @throws InterruptedException
+     */
+    public void testKafkaStreamer()
+        throws TimeoutException, InterruptedException {
+        embeddedBroker.createTopic(TOPIC_NAME, PARTITIONS, REPLICATION_FACTOR);
+
+        Map<String, String> keyValueMap = produceStream(TOPIC_NAME);
+        consumerStream(TOPIC_NAME, keyValueMap);
+    }
+
+    /**
+     * Produces/Sends messages to Kafka.
+     *
+     * @param topic Topic name.
+     * @return Map of key value messages.
+     */
+    private Map<String, String> produceStream(final String topic) {
+        final Map<String, String> keyValueMap = new HashMap<>();
+
+        // Generate random subnets.
+        List<Integer> subnet = new ArrayList<>();
+
+        int i = 0;
+        while (i <= CNT)
+            subnet.add(++i);
+
+        Collections.shuffle(subnet);
+
+        final List<KeyedMessage<String, String>> messages = new ArrayList<>();
+        for (int event = 0; event < CNT; event++) {
+            long runtime = new Date().getTime();
+            String ip = KEY_PREFIX + subnet.get(event);
+            String msg = runtime + VALUE_URL + ip;
+            messages.add(new KeyedMessage<>(topic, ip, msg));
+            keyValueMap.put(ip, msg);
+        }
+
+        final Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+        producer.close();
+
+        return keyValueMap;
+    }
+
+    /**
+     * Consumes Kafka Stream via ignite.
+     *
+     * @param topic Topic name.
+     * @param keyValueMap Expected key value map.
+     * @throws TimeoutException TimeoutException.
+     * @throws InterruptedException InterruptedException.
+     */
+    private void consumerStream(final String topic, final Map<String, String> keyValueMap)
+        throws TimeoutException, InterruptedException {
+
+        KafkaStreamer<String, String, String> kafkaStmr = null;
+
+        final Ignite ignite = grid();
+        try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
+
+            stmr.allowOverwrite(true);
+            stmr.autoFlushFrequency(10);
+
+            // Configure socket streamer.
+            kafkaStmr = new KafkaStreamer<>();
+
+            // Get the cache.
+            IgniteCache<String, String> cache = ignite.cache(null);
+
+            // Set ignite instance.
+            kafkaStmr.setIgnite(ignite);
+
+            // Set data streamer instance.
+            kafkaStmr.setStreamer(stmr);
+
+            // Set the topic.
+            kafkaStmr.setTopic(topic);
+
+            // Set the number of threads.
+            kafkaStmr.setThreads(4);
+
+            // Set the consumer configuration.
+            kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(KafkaEmbeddedBroker.getZKAddress(),
+                "groupX"));
+
+            // Set the decoders.
+            StringDecoder stringDecoder = new StringDecoder(new VerifiableProperties());
+            kafkaStmr.setKeyDecoder(stringDecoder);
+            kafkaStmr.setValueDecoder(stringDecoder);
+
+            // Start kafka streamer.
+            kafkaStmr.start();
+
+            final CountDownLatch latch = new CountDownLatch(CNT);
+            IgniteBiPredicate<UUID, CacheEvent> locLsnr = new IgniteBiPredicate<UUID, CacheEvent>() {
+                @Override
+                public boolean apply(UUID uuid, CacheEvent evt) {
+                    latch.countDown();
+                    return true;
+                }
+            };
+
+            ignite.events(ignite.cluster().forCacheNodes(null)).remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
+            latch.await();
+
+            for (Map.Entry<String, String> entry : keyValueMap.entrySet()) {
+                final String key = entry.getKey();
+                final String value = entry.getValue();
+
+                final String cacheValue = cache.get(key);
+                assertEquals(value, cacheValue);
+            }
+        }
+
+        finally {
+            // Shutdown kafka streamer.
+            kafkaStmr.stop();
+        }
+    }
+
+    /**
+     * Creates default consumer config.
+     *
+     * @param zooKeeper Zookeeper address <server:port>.
+     * @param groupId Group Id for kafka subscriber.
+     * @return {@link ConsumerConfig} kafka consumer configuration.
+     */
+    private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String groupId) {
+        A.notNull(zooKeeper, "zookeeper");
+        A.notNull(groupId, "groupId");
+
+        Properties props = new Properties();
+        props.put("zookeeper.connect", zooKeeper);
+        props.put("group.id", groupId);
+        props.put("zookeeper.session.timeout.ms", "400");
+        props.put("zookeeper.sync.time.ms", "200");
+        props.put("auto.commit.interval.ms", "1000");
+        props.put("auto.offset.reset", "smallest");
+
+        return new ConsumerConfig(props);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
new file mode 100644
index 0000000..b836b44
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
@@ -0,0 +1,46 @@
+/*
+ * 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.stream.kafka;
+
+import kafka.producer.*;
+
+/**
+ * Simple Partitioner for Kafka.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public class SimplePartitioner
+    implements Partitioner {
+
+    /**
+     * Partitions the key based on the key value.
+     *
+     * @param key Key.
+     * @param partitionSize Partition size.
+     * @return partition Partition.
+     */
+    public int partition(Object key, int partitionSize) {
+        int partition = 0;
+        String keyStr = (String)key;
+        String[] keyValues = keyStr.split("\\.");
+        Integer intKey = Integer.parseInt(keyValues[3]);
+        if (intKey > 0) {
+            partition = intKey % partitionSize;
+        }
+        return partition;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a6d1609..b47d34b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,6 +70,7 @@
         <module>modules/gce</module>
         <module>modules/cloud</module>
         <module>modules/mesos</module>
+        <module>modules/kafka</module>
     </modules>
 
     <profiles>


[08/50] incubator-ignite git commit: # ignite-gg-1064 use loopback address in clock server if failed to get local host

Posted by se...@apache.org.
# ignite-gg-1064 use loopback address in clock server if failed to get local host


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

Branch: refs/heads/ignite-591
Commit: 0ef74a1449d503ae65a200e48da735b545e923da
Parents: b5bc06e
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 30 15:07:18 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 30 15:07:18 2015 +0300

----------------------------------------------------------------------
 .../processors/clock/GridClockServer.java       | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef74a14/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
index e47d1fa..a835da8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
@@ -62,9 +62,20 @@ public class GridClockServer {
             int startPort = ctx.config().getTimeServerPortBase();
             int endPort = startPort + ctx.config().getTimeServerPortRange() - 1;
 
-            InetAddress locHost = !F.isEmpty(ctx.config().getLocalHost()) ?
-                InetAddress.getByName(ctx.config().getLocalHost()) :
-                U.getLocalHost();
+            InetAddress locHost;
+
+            if (F.isEmpty(ctx.config().getLocalHost())) {
+                try {
+                    locHost = U.getLocalHost();
+                }
+                catch (IOException e) {
+                    locHost = InetAddress.getLoopbackAddress();
+
+                    U.warn(log, "Failed to get local host address, will use loopback address: " + locHost);
+                }
+            }
+            else
+                locHost = InetAddress.getByName(ctx.config().getLocalHost());
 
             for (int p = startPort; p <= endPort; p++) {
                 try {
@@ -83,8 +94,8 @@ public class GridClockServer {
             }
 
             if (sock == null)
-                throw new IgniteCheckedException("Failed to bind time server socket within specified port range [locHost=" +
-                    locHost + ", startPort=" + startPort + ", endPort=" + endPort + ']');
+                throw new IgniteCheckedException("Failed to bind time server socket within specified port range " +
+                    "[locHost=" + locHost + ", startPort=" + startPort + ", endPort=" + endPort + ']');
         }
         catch (IOException e) {
             throw new IgniteCheckedException("Failed to start time server (failed to get local host address)", e);


[43/50] incubator-ignite git commit: muted GridCachePartitionedFailoverSelfTest

Posted by se...@apache.org.
muted GridCachePartitionedFailoverSelfTest


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

Branch: refs/heads/ignite-591
Commit: 7828d19f3fc2b3793c2882ac1305b95960646e5c
Parents: beb697a
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jul 3 16:43:17 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jul 3 16:43:17 2015 +0300

----------------------------------------------------------------------
 .../distributed/near/GridCachePartitionedFailoverSelfTest.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7828d19f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
index 553d748..64e8f81 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
@@ -27,6 +27,11 @@ import static org.apache.ignite.cache.CacheMode.*;
  */
 public class GridCachePartitionedFailoverSelfTest extends GridCacheAbstractFailoverTxSelfTest {
     /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-1092");
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
         return PARTITIONED;
     }


[44/50] incubator-ignite git commit: # ignite-1055: review (add option to help)

Posted by se...@apache.org.
# ignite-1055: review (add option to help)


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

Branch: refs/heads/ignite-591
Commit: 251f0c88377b05821e9cfcb4a6ee6caa9026adb9
Parents: 7030ee1
Author: ashutak <as...@gridgain.com>
Authored: Fri Jul 3 17:51:24 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jul 3 17:51:24 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/startup/cmdline/CommandLineStartup.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/251f0c88/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
index 4ddbbd0..5b39069 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
@@ -158,7 +158,8 @@ public final class CommandLineStartup {
                 "    Where:",
                 "    ?, /help, -help, - show this message.",
                 "    -v               - verbose mode (quiet by default).",
-                "    -np              - no pause on exit (pause by default)");
+                "    -np              - no pause on exit (pause by default)",
+                "    -nojmx           - disable JMX monitoring (enabled by default)");
 
             if (ignite) {
                 X.error(


[02/50] incubator-ignite git commit: # sprint-7 Minor fixes in javadocs.

Posted by se...@apache.org.
# sprint-7 Minor fixes in javadocs.


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

Branch: refs/heads/ignite-591
Commit: 596c5389b0faf1de1be5cbe2a88b5579a93683b2
Parents: 1a21477
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 30 10:26:12 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 30 10:26:12 2015 +0700

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/schema/model/PojoDescriptor.java   | 2 ++
 .../src/main/java/org/apache/ignite/schema/model/PojoField.java    | 1 +
 .../apache/ignite/schema/parser/dialect/OracleMetadataDialect.java | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
index 4ef8b00..5e1da06 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
@@ -304,6 +304,8 @@ public class PojoDescriptor {
 
     /**
      * Gets indexes groups.
+     *
+     * @return Map with indexes.
      */
     public Map<String, Map<String, IndexItem>> groups() {
         Map<String, Map<String, Boolean>> idxs = tbl.indexes();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
index 10939d9..88e4008 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
@@ -184,6 +184,7 @@ public class PojoField {
 
     /**
      * @param jdbcType String name for JDBC type.
+     * @return String name for JDBC type.
      */
     private static String jdbcTypeName(int jdbcType) {
         switch (jdbcType) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
index 6b16042..855c9f7 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
@@ -189,7 +189,7 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
      * @param owner DB owner.
      * @param tbl Table name.
      * @return Index columns.
-     * @throws SQLException If failed to retrieve indexe columns.
+     * @throws SQLException If failed to retrieve indexes columns.
      */
     private Map<String, Map<String, Boolean>> indexes(PreparedStatement stmt, String owner, String tbl)
         throws SQLException {


[49/50] incubator-ignite git commit: Kafka streamer test suite added

Posted by se...@apache.org.
Kafka streamer test suite added


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

Branch: refs/heads/ignite-591
Commit: f72b291498d413d870669e8dcd7cc2a5f3b81b51
Parents: b6803e7
Author: agura <ag...@gridgain.com>
Authored: Fri Jul 3 21:18:57 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 21:18:57 2015 +0300

----------------------------------------------------------------------
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f72b2914/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
new file mode 100644
index 0000000..a2dfd17
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
@@ -0,0 +1,37 @@
+/*
+ * 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.stream.kafka;
+
+import junit.framework.*;
+
+/**
+ * Apache Kafka streamer tests.
+ */
+public class IgniteKafkaStreamerSelfTestSuite extends TestSuite {
+    /**
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        TestSuite suite = new TestSuite("Apache Kafka streamer Test Suite");
+
+        suite.addTest(new TestSuite(KafkaIgniteStreamerSelfTest.class));
+
+        return suite;
+    }
+}


[25/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1060' into ignite-sprint-7

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1060' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: 44b187d44e3270b69f95e8ed690ec772557b05b4
Parents: da6ff64 25cef86
Author: Anton <av...@gridgain.com>
Authored: Wed Jul 1 19:19:34 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Wed Jul 1 19:19:34 2015 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 modules/core/src/test/config/tests.properties   |   6 +-
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 --
 modules/extdata/p2p/pom.xml                     |   2 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 +++++++++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 ++++++++++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 ++++++++++++++
 .../src/main/resources/gar-example.properties   |  18 +++++
 modules/extdata/uri/pom.xml                     |  60 +++++++++++++-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 +++++++++++++++++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 +++++++
 modules/urideploy/pom.xml                       |  14 ++++
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +--
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 16 files changed, 347 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44b187d4/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44b187d4/modules/extdata/uri/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44b187d4/modules/urideploy/pom.xml
----------------------------------------------------------------------


[41/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: ea90d8633265723076f729b2dca02873c033ce55
Parents: 1427d75 a0a31e2
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jul 2 12:10:38 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jul 2 12:10:38 2015 -0700

----------------------------------------------------------------------
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++++++-------
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 8 files changed, 179 insertions(+), 107 deletions(-)
----------------------------------------------------------------------



[34/50] incubator-ignite git commit: project release fix

Posted by se...@apache.org.
project release fix


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

Branch: refs/heads/ignite-591
Commit: 872fc387aa6f839123c9a9fbb0b100f2c989e65c
Parents: 7ea64e0
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Thu Jul 2 11:00:30 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Thu Jul 2 11:00:30 2015 +0300

----------------------------------------------------------------------
 modules/urideploy/pom.xml | 14 --------------
 1 file changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/872fc387/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 4e971d7..76a862b 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -143,19 +143,5 @@
             <artifactId>log4j</artifactId>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-extdata-uri</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-extdata-p2p</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>


[35/50] incubator-ignite git commit: # ignite-sprint-7 warning in AddressSender

Posted by se...@apache.org.
# ignite-sprint-7 warning in AddressSender


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

Branch: refs/heads/ignite-591
Commit: 91e1cb211f9fbd56ab37fa278866f80bd4239106
Parents: 872fc38
Author: sboikov <sb...@gridgain.com>
Authored: Thu Jul 2 12:46:20 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Jul 2 12:46:20 2015 +0300

----------------------------------------------------------------------
 .../tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91e1cb21/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index 014d937..bdc7865 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -777,7 +777,7 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
                 }
                 catch (IOException e) {
                     if (!isInterrupted()) {
-                        U.error(log, "Failed to send/receive address message (will try to reconnect).", e);
+                        LT.warn(log, e, "Failed to send/receive address message (will try to reconnect).");
 
                         synchronized (this) {
                             U.close(sock);


[19/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: bccba308a884ef527cf7f84f7f6dd57d55b1e51a
Parents: aea804b e0c53b8
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Wed Jul 1 11:13:36 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Wed Jul 1 11:13:36 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[05/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: bade9f16b64416b4ea032699a8a651d0a3ad064f
Parents: 596c538 8c55f8a
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 30 10:39:09 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 30 10:39:09 2015 +0700

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../discovery/GridDiscoveryManager.java         |   6 +
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../processors/cache/GridCacheProcessor.java    |  62 ++++--
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../core/src/test/config/spark/spark-config.xml |  46 +++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ------------
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 +++++++++++++++++++
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../org/apache/ignite/spark/IgniteContext.scala |  50 ++++-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 ++
 pom.xml                                         |  12 +-
 13 files changed, 380 insertions(+), 149 deletions(-)
----------------------------------------------------------------------



[23/50] incubator-ignite git commit: ignite-sprint-7: merge from ignite-934

Posted by se...@apache.org.
ignite-sprint-7: merge from ignite-934


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

Branch: refs/heads/ignite-591
Commit: cc0936fa76eba5556402632eef5f06325206bac0
Parents: e91bc48
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 1 16:59:14 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 1 16:59:14 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java    | 2 +-
 .../org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cc0936fa/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
index bc4b3c2..7b3b0d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
@@ -73,7 +73,7 @@ public abstract class ComputeTaskSplitAdapter<T, R> extends ComputeTaskAdapter<T
 
     /** Load balancer. */
     @LoadBalancerResource
-    private transient ComputeLoadBalancer balancer;
+    private ComputeLoadBalancer balancer;
 
     /**
      * This is a simplified version of {@link ComputeTask#map(List, Object)} method.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cc0936fa/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
index 6b3ad63..c71ccbb 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
@@ -98,8 +98,6 @@ public class GridP2PContinuousDeploymentSelfTest extends GridCommonAbstractTest
      */
     @SuppressWarnings("unchecked")
     public void testDeployment() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-934");
-
         Ignite ignite = startGrid(GRID_NAME);
 
         Class cls = getExternalClassLoader().loadClass(TEST_TASK_1);


[13/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' into ignite-1063

Posted by se...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-1063


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

Branch: refs/heads/ignite-591
Commit: 28525acbe2e19f5605137dbb7e9b3824eab25987
Parents: ef7a35c 6ebcb6d
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jun 30 16:56:15 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jun 30 16:56:15 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  26 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++++++++++++++
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 3 files changed, 310 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[45/50] incubator-ignite git commit: Merge branch 'ignite-1055' into ignite-sprint-7

Posted by se...@apache.org.
Merge branch 'ignite-1055' into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: 9f6a7f9bed05bd15807c534eb14d801bedd37970
Parents: 7828d19 251f0c8
Author: ashutak <as...@gridgain.com>
Authored: Fri Jul 3 17:52:00 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jul 3 17:52:00 2015 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                              | 8 ++++++--
 bin/ignite.sh                                               | 6 +++++-
 bin/include/parseargs.bat                                   | 1 +
 bin/include/parseargs.sh                                    | 3 +++
 .../apache/ignite/startup/cmdline/CommandLineStartup.java   | 3 ++-
 .../ignite/startup/cmdline/CommandLineTransformer.java      | 9 +++++++++
 6 files changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[03/50] incubator-ignite git commit: IGNITE-1061 - Fixed as discussed.

Posted by se...@apache.org.
IGNITE-1061 - Fixed as discussed.


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

Branch: refs/heads/ignite-591
Commit: b467822d55c8f796de2d7b3c2aa80b46f81811c1
Parents: 68c21ac
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 20:33:20 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 20:33:20 2015 -0700

----------------------------------------------------------------------
 .../core/src/test/config/spark/spark-config.xml | 46 ++++++++++++++++++
 .../org/apache/ignite/spark/IgniteContext.scala | 50 ++++++++++++++++++--
 .../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +++++++
 3 files changed, 110 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/core/src/test/config/spark/spark-config.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spark/spark-config.xml b/modules/core/src/test/config/spark/spark-config.xml
new file mode 100644
index 0000000..4b7ffe1
--- /dev/null
+++ b/modules/core/src/test/config/spark/spark-config.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="localHost" value="127.0.0.1"/>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <value>127.0.0.1:47500</value>
+                                <value>127.0.0.1:47501</value>
+                                <value>127.0.0.1:47502</value>
+                                <value>127.0.0.1:47503</value>
+                                <value>127.0.0.1:47504</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
index e52555a..5dbb1d3 100644
--- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
+++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
@@ -33,11 +33,13 @@ import org.apache.spark.sql.SQLContext
  * @tparam V Value type.
  */
 class IgniteContext[K, V](
-    @scala.transient val sparkContext: SparkContext,
+    @transient val sparkContext: SparkContext,
     cfgF: () ⇒ IgniteConfiguration,
     client: Boolean = true
 ) extends Serializable with Logging {
-    @scala.transient private val driver = true
+    @transient private val driver = true
+
+    private val cfgClo = new Once(cfgF)
 
     if (!client) {
         val workers = sparkContext.getExecutorStorageStatus.length - 1
@@ -51,6 +53,15 @@ class IgniteContext[K, V](
         sparkContext.parallelize(1 to workers, workers).foreach(it ⇒ ignite())
     }
 
+    // Make sure to start Ignite on context creation.
+    ignite()
+
+    /**
+     * Creates an instance of IgniteContext with the given spring configuration.
+     *
+     * @param sc Spark context.
+     * @param springUrl Spring configuration path.
+     */
     def this(
         sc: SparkContext,
         springUrl: String
@@ -58,6 +69,17 @@ class IgniteContext[K, V](
         this(sc, () ⇒ IgnitionEx.loadConfiguration(springUrl).get1())
     }
 
+    /**
+     * Creates an instance of IgniteContext with default Ignite configuration.
+     * By default this method will use grid configuration defined in `IGNITE_HOME/config/default-config.xml`
+     * configuration file.
+     *
+     * @param sc Spark context.
+     */
+    def this(sc: SparkContext) {
+        this(sc, IgnitionEx.DFLT_CFG)
+    }
+
     val sqlContext = new SQLContext(sparkContext)
 
     /**
@@ -89,7 +111,7 @@ class IgniteContext[K, V](
      * @return Ignite instance.
      */
     def ignite(): Ignite = {
-        val igniteCfg = cfgF()
+        val igniteCfg = cfgClo()
 
         try {
             Ignition.ignite(igniteCfg.getGridName)
@@ -112,8 +134,28 @@ class IgniteContext[K, V](
      * a no-op.
      */
     def close() = {
-        val igniteCfg = cfgF()
+        val igniteCfg = cfgClo()
 
         Ignition.stop(igniteCfg.getGridName, false)
     }
 }
+
+/**
+ * Auxiliary closure that ensures that passed in closure is executed only once.
+ *
+ * @param clo Closure to wrap.
+ */
+private class Once(clo: () ⇒ IgniteConfiguration) extends Serializable {
+    @transient @volatile var res: IgniteConfiguration = null
+
+    def apply(): IgniteConfiguration = {
+        if (res == null) {
+            this.synchronized {
+                if (res == null)
+                    res = clo()
+            }
+        }
+
+        res
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
index 26ce693..8fa6949 100644
--- a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
+++ b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
@@ -147,6 +147,24 @@ class IgniteRddSpec extends FunSpec with Matchers with BeforeAndAfterAll with Be
                 sc.stop()
             }
         }
+
+        it("should successfully start spark context with XML configuration") {
+            val sc = new SparkContext("local[*]", "test")
+
+            try {
+                val ic = new IgniteContext[String, String](sc,
+                    "modules/core/src/test/config/spark/spark-config.xml")
+
+                val cache: IgniteRDD[String, String] = ic.fromCache(PARTITIONED_CACHE_NAME)
+
+                cache.savePairs(sc.parallelize(1 to 1000, 2).map(i ⇒ (String.valueOf(i), "val" + i)))
+
+                assert(1000 == cache.count())
+            }
+            finally {
+                sc.stop()
+            }
+        }
     }
 
     override protected def beforeEach() = {


[24/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-7

Posted by se...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-7


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

Branch: refs/heads/ignite-591
Commit: da6ff647913a6e97a567e8108a2fefcd12709e94
Parents: cc0936f 5269bab
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 1 16:59:39 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 1 16:59:39 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |  2 +-
 modules/aop/pom.xml                             |  2 +-
 modules/aws/pom.xml                             |  2 +-
 modules/clients/pom.xml                         |  2 +-
 modules/cloud/pom.xml                           |  2 +-
 modules/codegen/pom.xml                         |  2 +-
 modules/core/pom.xml                            |  2 +-
 .../managers/communication/GridIoManager.java   | 49 +++++++++-------
 .../processors/cache/IgniteCacheFutureImpl.java | 42 +++++++++++++
 .../processors/cache/IgniteCacheProxy.java      |  2 +-
 .../internal/util/future/IgniteFutureImpl.java  | 18 ++++--
 .../util/nio/GridNioMessageTracker.java         | 23 +++++++-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  2 +-
 .../core/src/main/resources/ignite.properties   |  2 +-
 modules/docker/Dockerfile                       | 55 +++++++++++++++++
 modules/docker/README.txt                       | 11 ++++
 modules/docker/build_users_libs.sh              | 39 ++++++++++++
 modules/docker/download_ignite.sh               | 49 ++++++++++++++++
 modules/docker/execute.sh                       | 62 ++++++++++++++++++++
 modules/docker/run.sh                           | 34 +++++++++++
 modules/extdata/p2p/pom.xml                     |  2 +-
 modules/extdata/uri/pom.xml                     |  2 +-
 modules/gce/pom.xml                             |  2 +-
 modules/geospatial/pom.xml                      |  2 +-
 modules/hadoop/pom.xml                          |  2 +-
 modules/hibernate/pom.xml                       |  2 +-
 modules/indexing/pom.xml                        |  2 +-
 modules/jcl/pom.xml                             |  2 +-
 modules/jta/pom.xml                             |  2 +-
 modules/log4j/pom.xml                           |  2 +-
 modules/mesos/pom.xml                           |  2 +-
 modules/rest-http/pom.xml                       |  2 +-
 modules/scalar-2.10/pom.xml                     |  2 +-
 modules/scalar/pom.xml                          |  2 +-
 modules/schedule/pom.xml                        |  2 +-
 modules/schema-import/pom.xml                   |  2 +-
 modules/slf4j/pom.xml                           |  2 +-
 modules/spark-2.10/pom.xml                      |  2 +-
 modules/spark/pom.xml                           |  2 +-
 modules/spring/pom.xml                          |  2 +-
 modules/ssh/pom.xml                             |  2 +-
 modules/tools/pom.xml                           |  2 +-
 modules/urideploy/pom.xml                       |  2 +-
 modules/visor-console-2.10/pom.xml              |  2 +-
 modules/visor-console/pom.xml                   |  2 +-
 modules/visor-plugins/pom.xml                   |  2 +-
 modules/web/pom.xml                             |  2 +-
 modules/yardstick/pom.xml                       |  2 +-
 pom.xml                                         | 14 ++---
 49 files changed, 399 insertions(+), 73 deletions(-)
----------------------------------------------------------------------



[30/50] incubator-ignite git commit: ignite-973-2 - stop nodes after test

Posted by se...@apache.org.
ignite-973-2 - stop nodes after test


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

Branch: refs/heads/ignite-591
Commit: cbbb6a1198426398ad344282854f9c5e65054f6c
Parents: 1a465a2
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 15:59:51 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 15:59:51 2015 -0700

----------------------------------------------------------------------
 .../distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbbb6a11/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
index 93831cc..e65d152 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
@@ -325,6 +325,11 @@ public class IgniteCacheQueryNodeRestartSelfTest2 extends GridCommonAbstractTest
         info("Queries stopped.");
     }
 
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+    }
+
     /**
      *
      */


[17/50] incubator-ignite git commit: # ignite-sprint-7 minor

Posted by se...@apache.org.
# ignite-sprint-7 minor


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

Branch: refs/heads/ignite-591
Commit: e0c53b8171add7bfed0249c67a8e743443b7593f
Parents: e91bc48
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jul 1 10:06:20 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jul 1 10:06:20 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e0c53b81/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index fa3e564..720ce3a 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -2332,7 +2332,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                 LT.warn(log, null, "Local node has detected failed nodes and started cluster-wide procedure. " +
                         "To speed up failure detection please see 'Failure Detection' section under javadoc" +
-                        "for 'TcpDiscoverySpi'");
+                        " for 'TcpDiscoverySpi'");
             }
         }
 


[27/50] incubator-ignite git commit: ignite-sprint-7 - compilation

Posted by se...@apache.org.
ignite-sprint-7 - compilation


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

Branch: refs/heads/ignite-591
Commit: af3cfdf16ad68ce2ec3e7b1cab1d0b3116d831eb
Parents: 44b187d
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 11:19:43 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 11:19:43 2015 -0700

----------------------------------------------------------------------
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af3cfdf1/modules/extdata/uri/modules/uri-dependency/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/pom.xml b/modules/extdata/uri/modules/uri-dependency/pom.xml
index 5f45bbe..3f3a188 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -29,7 +29,7 @@
     <artifactId>ignite-extdata-uri-dep</artifactId>
     <packaging>jar</packaging>
 
-    <version>1.1.6-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <modelVersion>4.0.0</modelVersion>
 
     <dependencies>


[26/50] incubator-ignite git commit: Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2

Posted by se...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/234a8095
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/234a8095
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/234a8095

Branch: refs/heads/ignite-591
Commit: 234a809597bb07a7b78a51f4810ad217d9ab45a4
Parents: 712e7d5 44b187d
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 10:39:44 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 10:39:44 2015 -0700

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../managers/communication/GridIoManager.java   |  49 ++++++-----
 .../processors/cache/IgniteCacheFutureImpl.java |  42 ++++++++++
 .../processors/cache/IgniteCacheProxy.java      |   2 +-
 .../internal/util/future/IgniteFutureImpl.java  |  18 ++++-
 .../util/nio/GridNioMessageTracker.java         |  23 +++++-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   2 +-
 .../core/src/main/resources/ignite.properties   |   2 +-
 modules/core/src/test/config/tests.properties   |   6 +-
 .../GridP2PContinuousDeploymentSelfTest.java    |   2 -
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 --
 modules/docker/Dockerfile                       |  55 +++++++++++++
 modules/docker/README.txt                       |  11 +++
 modules/docker/build_users_libs.sh              |  39 +++++++++
 modules/docker/download_ignite.sh               |  49 +++++++++++
 modules/docker/execute.sh                       |  62 ++++++++++++++
 modules/docker/run.sh                           |  34 ++++++++
 modules/extdata/p2p/pom.xml                     |   4 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 +++++++++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 ++++++++++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 ++++++++++++++
 .../src/main/resources/gar-example.properties   |  18 +++++
 modules/extdata/uri/pom.xml                     |  62 ++++++++++++--
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 +++++++++++++++++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 +++++++
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |  16 +++-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +--
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |  14 ++--
 64 files changed, 747 insertions(+), 101 deletions(-)
----------------------------------------------------------------------



[38/50] incubator-ignite git commit: ignite-820 GridCacheEvictionFilterSelfTest#testPartitionedMixed enabled

Posted by se...@apache.org.
ignite-820 GridCacheEvictionFilterSelfTest#testPartitionedMixed enabled


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

Branch: refs/heads/ignite-591
Commit: c866902b2abbedd26ef1d968aabae1cd74657c95
Parents: b437ec7
Author: agura <ag...@gridgain.com>
Authored: Thu Jul 2 16:10:25 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu Jul 2 16:10:25 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/eviction/GridCacheEvictionFilterSelfTest.java | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c866902b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index ea926ee..3cdb3d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -185,8 +185,6 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testPartitionedMixed() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-820");
-
         mode = PARTITIONED;
         nearEnabled = false;
 


[10/50] incubator-ignite git commit: ignite-1060

Posted by se...@apache.org.
ignite-1060


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

Branch: refs/heads/ignite-591
Commit: d685e82a5f4858a79e40a39eeb45c42ba9713f70
Parents: 3a0ccb5
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 30 16:40:22 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 30 16:40:22 2015 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 --
 modules/extdata/uri/META-INF/ignite.xml         |  38 +++++++++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 ++++++++++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  61 ++++++++++++++
 .../src/main/resources/gar-example.properties   |  18 ++++
 modules/extdata/uri/pom.xml                     |  60 +++++++++++++-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  82 +++++++++++++++++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 +++++++
 modules/urideploy/pom.xml                       |  14 ++++
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +--
 13 files changed, 344 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
index c6668f6..b4808e7 100644
--- a/assembly/dependencies-fabric.xml
+++ b/assembly/dependencies-fabric.xml
@@ -110,6 +110,7 @@
                 <exclude>org.apache.ignite:ignite-tools</exclude>
                 <exclude>org.apache.ignite:ignite-extdata-p2p</exclude>
                 <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
                 <exclude>org.apache.ignite:ignite-examples</exclude>
                 <exclude>org.apache.ignite:ignite-indexing</exclude>
                 <exclude>org.apache.ignite:ignite-visor-console</exclude>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/core/src/test/resources/helloworld.gar
----------------------------------------------------------------------
diff --git a/modules/core/src/test/resources/helloworld.gar b/modules/core/src/test/resources/helloworld.gar
deleted file mode 100644
index 3b4555a..0000000
Binary files a/modules/core/src/test/resources/helloworld.gar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/core/src/test/resources/helloworld1.gar
----------------------------------------------------------------------
diff --git a/modules/core/src/test/resources/helloworld1.gar b/modules/core/src/test/resources/helloworld1.gar
deleted file mode 100644
index 3b4555a..0000000
Binary files a/modules/core/src/test/resources/helloworld1.gar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/core/src/test/resources/readme.txt
----------------------------------------------------------------------
diff --git a/modules/core/src/test/resources/readme.txt b/modules/core/src/test/resources/readme.txt
deleted file mode 100644
index 195d655..0000000
--- a/modules/core/src/test/resources/readme.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This folder is created for test GridTaskUriDeploymentDeadlockSelfTest. It contains helloworld.gar and helloworld1.gar
-which are the same and were copied from Apache Ignite GAR example.
-
-We put two files here to have a collision and make deployment SPI to unregister class loaders.
-
-This is intended to test GG-2852 issue.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/META-INF/ignite.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/META-INF/ignite.xml b/modules/extdata/uri/META-INF/ignite.xml
new file mode 100644
index 0000000..5ac671a
--- /dev/null
+++ b/modules/extdata/uri/META-INF/ignite.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!--
+    Spring configuration file for test classes in gar-file.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+    <description>Ignite Spring configuration file in gar-file.</description>
+
+    <!--
+        Optional test tasks specification. If not provided, then all
+        tasks found inside GAR will be deployed.
+    -->
+    <util:list id="tasks">
+        <value>org.apache.ignite.spi.deployment.uri.tasks.GarHelloWorldTask</value>
+    </util:list>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/modules/uri-dependency/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/pom.xml b/modules/extdata/uri/modules/uri-dependency/pom.xml
new file mode 100644
index 0000000..5f45bbe
--- /dev/null
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../../../../parent</relativePath>
+    </parent>
+
+    <artifactId>ignite-extdata-uri-dep</artifactId>
+    <packaging>jar</packaging>
+
+    <version>1.1.6-SNAPSHOT</version>
+    <modelVersion>4.0.0</modelVersion>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java b/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
new file mode 100644
index 0000000..bf329be
--- /dev/null
+++ b/modules/extdata/uri/modules/uri-dependency/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldBean.java
@@ -0,0 +1,61 @@
+package org.apache.ignite.spi.deployment.uri.tasks;
+/*
+ *  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.
+ */
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Imported class which should be placed in JAR file in GAR/lib folder.
+ * Loads message resource file via class loader.
+ */
+public class GarHelloWorldBean {
+    /** */
+    public static final String RESOURCE = "gar-example.properties";
+
+    /**
+     * Gets keyed message.
+     *
+     * @param key Message key.
+     * @return Keyed message.
+     */
+    @Nullable
+    public String getMessage(String key) {
+        InputStream in = null;
+
+        try {
+            in = getClass().getClassLoader().getResourceAsStream(RESOURCE);
+
+            Properties props = new Properties();
+
+            props.load(in);
+
+            return props.getProperty(key);
+        }
+        catch (IOException e) {
+            e.printStackTrace();
+        }
+        finally {
+            U.close(in, null);
+        }
+
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/modules/uri-dependency/src/main/resources/gar-example.properties
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/src/main/resources/gar-example.properties b/modules/extdata/uri/modules/uri-dependency/src/main/resources/gar-example.properties
new file mode 100644
index 0000000..e892a3c
--- /dev/null
+++ b/modules/extdata/uri/modules/uri-dependency/src/main/resources/gar-example.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+
+HELLOWORLD.MSG=Hello World!
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 3d43040..a88bced 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -20,8 +20,10 @@
 <!--
     POM file.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
+    <packaging>pom</packaging>
 
     <parent>
         <groupId>org.apache.ignite</groupId>
@@ -51,8 +53,18 @@
             <artifactId>spring-beans</artifactId>
             <version>${spring.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-extdata-uri-dep</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
+    <modules>
+        <module>modules/uri-dependency</module>
+    </modules>
+
     <build>
         <resources>
             <resource>
@@ -86,6 +98,21 @@
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <!-- need to compile sources. pom packaging will not compile automatically. -->
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <version>1.7</version>
                 <dependencies>
@@ -110,11 +137,36 @@
                         <phase>compile</phase>
                         <configuration>
                             <target>
-                                <copy file="${settings.localRepository}/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar" todir="${basedir}/target/classes/lib" />
+                                <!-- copying resources to classes -->
+                                <copy todir="${basedir}/target/classes">
+                                    <fileset dir="${basedir}/src/main/java">
+                                        <include name="**/*.xml"/>
+                                        <include name="**/*.properties"/>
+                                    </fileset>
+                                </copy>
+
+                                <copy
+                                    file="${settings.localRepository}/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar"
+                                    todir="${basedir}/target/classes/lib"/>
+
+                                <zip destfile="${basedir}/target/classes/lib/depend.jar" encoding="UTF-8">
+                                    <zipfileset dir="modules/uri-dependency/target/classes"/>
+                                </zip>
+
+                                <taskdef name="gar"
+                                         classname="org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask"/>
 
-                                <taskdef name="gar" classname="org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask" />
+                                <gar destfile="${basedir}/target/deploy/uri.gar" basedir="${basedir}/target/classes"/>
 
-                                <gar destfile="${basedir}/target/deploy/uri.gar" basedir="${basedir}/target/classes" />
+                                <!--
+                                This is created for test GridTaskUriDeploymentDeadlockSelfTest.
+                                We put two files here to have a collision and make deployment SPI to unregister class loaders.
+                                This is intended to test GG-2852 issue.
+                                -->
+                                <gar destfile="${basedir}/target/resources/helloworld.gar"
+                                     descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes"/>
+                                <gar destfile="${basedir}/target/resources/helloworld1.gar"
+                                     descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes"/>
                             </target>
                         </configuration>
                     </execution>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
new file mode 100644
index 0000000..13b2641
--- /dev/null
+++ b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/GarHelloWorldTask.java
@@ -0,0 +1,82 @@
+/*
+ *  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.deployment.uri.tasks;
+
+import org.apache.ignite.*;
+import org.apache.ignite.compute.*;
+import org.jetbrains.annotations.*;
+import org.springframework.beans.factory.support.*;
+import org.springframework.beans.factory.xml.*;
+import org.springframework.core.io.*;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * This class defines grid task for this example. Grid task is responsible for splitting the task into jobs. This
+ * particular implementation splits given string into individual words and creates grid jobs for each word. Task class
+ * in that example should be placed in GAR file.
+ */
+@ComputeTaskName("GarHelloWorldTask")
+public class GarHelloWorldTask extends ComputeTaskSplitAdapter<String, String> {
+    /** {@inheritDoc} */
+    @Override public Collection<? extends ComputeJob> split(int gridSize, String arg) throws IgniteException {
+        // Create Spring context.
+        AbstractBeanFactory fac = new XmlBeanFactory(
+            new ClassPathResource("org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml", getClass().getClassLoader()));
+
+        fac.setBeanClassLoader(getClass().getClassLoader());
+
+        // Load imported bean from GAR/lib folder.
+        GarHelloWorldBean bean = (GarHelloWorldBean)fac.getBean("example.bean");
+
+        String msg = bean.getMessage(arg);
+
+        assert msg != null;
+
+        // Split the passed in phrase into multiple words separated by spaces.
+        List<String> words = Arrays.asList(msg.split(" "));
+
+        Collection<ComputeJob> jobs = new ArrayList<>(words.size());
+
+        // Use imperative OOP APIs.
+        for (String word : words) {
+            // Every job gets its own word as an argument.
+            jobs.add(new ComputeJobAdapter(word) {
+                /*
+                 * Simply prints the job's argument.
+                 */
+                @Nullable
+                @Override public Serializable execute() {
+                    System.out.println(">>>");
+                    System.out.println(">>> Printing '" + argument(0) + "' on this node from grid job.");
+                    System.out.println(">>>");
+
+                    // This job does not return any result.
+                    return null;
+                }
+            });
+        }
+
+        return jobs;
+    }
+
+    @Nullable @Override public String reduce(List<ComputeJobResult> results) throws IgniteException {
+        return String.valueOf(results.size());
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
new file mode 100644
index 0000000..c3cf3e4
--- /dev/null
+++ b/modules/extdata/uri/src/main/java/org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+    <description>Spring file for GAR example.</description>
+
+    <!--
+        Bean used from imported jar file from GAR/lib.
+    -->
+    <bean id="example.bean" class="org.apache.ignite.spi.deployment.uri.tasks.GarHelloWorldBean" scope="singleton"/>
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 0add261..d14cff7 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -143,5 +143,19 @@
             <artifactId>log4j</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-extdata-uri</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-extdata-p2p</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d685e82a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java
index a060868..d41542f 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java
@@ -44,7 +44,7 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes
         UriDeploymentSpi deploymentSpi = new UriDeploymentSpi();
 
         deploymentSpi.setUriList(
-            Arrays.asList(U.resolveIgniteUrl("modules/core/src/test/resources/").toURI().toString()));
+            Arrays.asList(U.resolveIgniteUrl("modules/extdata/uri/target/resources/").toURI().toString()));
 
         if (gridName.endsWith("2")) {
             // Delay deployment for 2nd grid only.
@@ -91,18 +91,11 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes
 
             info(">>> Starting task.");
 
-            executeAsync(compute(g.cluster().forPredicate(F.equalTo(F.first(g.cluster().forRemotes().nodes())))),
-                "GridGarHelloWorldTask", "HELLOWORLD.MSG").get(60000);
+            assert "2".equals(executeAsync(compute(g.cluster().forPredicate(F.equalTo(F.first(g.cluster().forRemotes().nodes())))),
+                "GarHelloWorldTask", "HELLOWORLD.MSG").get(60000));
 
             f.get();
         }
-        catch (Exception e) {
-            error("Test failed.", e);
-
-            // With former version of GridDeploymentLocalStore test hangs forever.
-            // So, we need to forcibly exit.
-            // System.exit(1);
-        }
         finally {
             stopAllGrids();
         }


[42/50] incubator-ignite git commit: Merge branches 'ignite-gg-10416' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416

Posted by se...@apache.org.
Merge branches 'ignite-gg-10416' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416


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

Branch: refs/heads/ignite-591
Commit: beb697afabec3342195d301d1c68a58b3154b689
Parents: fcff50e ea90d86
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jul 3 10:07:42 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jul 3 10:07:42 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../apache/ignite/internal/IgniteKernal.java    |   1 -
 .../managers/communication/GridIoManager.java   | 124 +++++++--
 .../managers/communication/GridIoMessage.java   |  15 +-
 .../managers/communication/GridIoPolicy.java    |  32 +--
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../processors/cache/CacheOperationContext.java |  44 +++-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheAdapter.java      |  91 ++++---
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++++++-------
 .../processors/cache/GridCacheUtils.java        |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |  36 ++-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 +++++++++++--
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +-
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +-
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   5 +-
 .../TcpDiscoveryMulticastIpFinder.java          |   2 +-
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 +++++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 +++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 modules/urideploy/pom.xml                       |  14 -
 61 files changed, 1053 insertions(+), 378 deletions(-)
----------------------------------------------------------------------



[33/50] incubator-ignite git commit: # ignite-sprint-7 fixed failNode()

Posted by se...@apache.org.
# ignite-sprint-7 fixed failNode()


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

Branch: refs/heads/ignite-591
Commit: 7ea64e038fd7df6418ec98a18b3665014701587d
Parents: d3783a1
Author: sboikov <sb...@gridgain.com>
Authored: Thu Jul 2 10:03:00 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Jul 2 10:03:00 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java    | 5 +++--
 .../java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java    | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7ea64e03/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 04276d2..3f05f59 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -339,11 +339,12 @@ class ClientImpl extends TcpDiscoveryImpl {
 
     /** {@inheritDoc} */
     @Override public void failNode(UUID nodeId, @Nullable String warning) {
-        ClusterNode node = rmtNodes.get(nodeId);
+        TcpDiscoveryNode node = rmtNodes.get(nodeId);
 
         if (node != null) {
             TcpDiscoveryNodeFailedMessage msg = new TcpDiscoveryNodeFailedMessage(getLocalNodeId(),
-                node.id(), node.order());
+                node.id(),
+                node.internalOrder());
 
             msg.warning(warning);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7ea64e03/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 720ce3a..94a2290 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -585,11 +585,12 @@ class ServerImpl extends TcpDiscoveryImpl {
 
     /** {@inheritDoc} */
     @Override public void failNode(UUID nodeId, @Nullable String warning) {
-        ClusterNode node = ring.node(nodeId);
+        TcpDiscoveryNode node = ring.node(nodeId);
 
         if (node != null) {
             TcpDiscoveryNodeFailedMessage msg = new TcpDiscoveryNodeFailedMessage(getLocalNodeId(),
-                node.id(), node.order());
+                node.id(),
+                node.internalOrder());
 
             msg.warning(warning);