You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2016/02/01 15:21:09 UTC

[01/49] ignite git commit: Added project for benchmarks.

Repository: ignite
Updated Branches:
  refs/heads/ignite-2435 acae0a5f6 -> 47bc381b9


Added project for benchmarks.


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

Branch: refs/heads/ignite-2435
Commit: 4edc7bdd192624a451c9ed19d4c37f26e4653a33
Parents: c55cc97
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Jan 26 17:50:53 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Jan 26 17:50:53 2016 +0300

----------------------------------------------------------------------
 modules/benchmarks/pom.xml                      | 171 +++++++++++++++++++
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 ++++++++++++++++++
 .../ignite/benchmarks/model/IntValue.java       |  91 ++++++++++
 pom.xml                                         |   1 +
 4 files changed, 433 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4edc7bdd/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
new file mode 100644
index 0000000..1c4ee58
--- /dev/null
+++ b/modules/benchmarks/pom.xml
@@ -0,0 +1,171 @@
+<?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-benchmarks</artifactId>
+    <version>1.5.1.final-SNAPSHOT</version>
+    <url>http://ignite.apache.org</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <jmh.version>1.11.1</jmh.version>
+        <javac.target>1.6</javac.target>
+        <uberjar.name>benchmarks</uberjar.name>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-indexing</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-core</artifactId>
+            <version>${jmh.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-generator-annprocess</artifactId>
+            <version>${jmh.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <compilerVersion>${javac.target}</compilerVersion>
+                    <source>${javac.target}</source>
+                    <target>${javac.target}</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>2.2</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <finalName>${uberjar.name}</finalName>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>org.openjdk.jmh.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <!--
+                                        Shading signed JARs will fail without this.
+                                        http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
+                                    -->
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/*.SF</exclude>
+                                        <exclude>META-INF/*.DSA</exclude>
+                                        <exclude>META-INF/*.RSA</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>2.5</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.4</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.9.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>2.6</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.3</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-source-plugin</artifactId>
+                    <version>2.2.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.17</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/4edc7bdd/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
new file mode 100644
index 0000000..8ccaf81
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
@@ -0,0 +1,170 @@
+/*
+ * 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.benchmarks.jmh.cache;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.benchmarks.model.IntValue;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheRebalanceMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.annotations.Threads;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Put benchmark.
+ */
+@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
+@State(Scope.Benchmark)
+@BenchmarkMode(Mode.Throughput)
+@OutputTimeUnit(TimeUnit.SECONDS)
+@Warmup(iterations = 10)
+@Measurement(iterations = 120)
+@Fork(1)
+public class PutBenchmark {
+    /** First Ignite instance. */
+    private static Ignite ignite1;
+
+    /** Second Ignite instance. */
+    private static Ignite ignite2;
+
+    /** Target cache. */
+    private static IgniteCache<Integer, IntValue> cache1;
+
+    /** Items count. */
+    private static final int CNT = 100000;
+
+    /** IP finder shared across nodes. */
+    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /**
+     * Set up routine.
+     *
+     * @throws Exception If failed.
+     */
+    @Setup
+    public static void setup() throws Exception {
+        ignite1 = Ignition.start(config("node1"));
+        ignite2 = Ignition.start(config("node2"));
+
+        cache1 = ignite1.cache(null);
+
+        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
+
+        for (int i = 0; i < CNT; i++)
+            dataLdr.addData(i, new IntValue(i));
+
+        dataLdr.close();
+
+        System.out.println("Cache populated.");
+    }
+
+    /**
+     * Tear down routine.
+     *
+     * @throws Exception If failed.
+     */
+    @TearDown
+    public static void tearDown() throws Exception {
+        Ignition.stopAll(true);
+    }
+
+    /**
+     * Create configuration.
+     *
+     * @param gridName Grid name.
+     * @return Configuration.
+     */
+    private static IgniteConfiguration config(String gridName) {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        cfg.setGridName(gridName);
+
+        cfg.setLocalHost("127.0.0.1");
+
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        discoSpi.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(discoSpi);
+
+        CacheConfiguration cacheCfg = new CacheConfiguration();
+
+        cacheCfg.setName(null);
+        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
+        cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
+        cacheCfg.setBackups(1);
+
+        cfg.setCacheConfiguration(cacheCfg);
+
+        return cfg;
+    }
+
+    /**
+     * Test PUT operation.
+     *
+     * @throws Exception If failed.
+     */
+    @Benchmark
+    @Threads(4)
+    public void testPut() throws Exception {
+        int key = ThreadLocalRandom.current().nextInt(CNT);
+
+        cache1.put(key, new IntValue(key));
+    }
+
+    /**
+     * Runner.
+     *
+     * @param args Arguments.
+     * @throws Exception If failed.
+     */
+    public static void main(String[] args) throws Exception {
+        // Use the following additional options to record JFR dump:
+        // "-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder", "-XX:StartFlightRecording=delay=20s,duration=60s,filename=ignite-put_bench.jfr"
+
+        String[] jvmArgs = new String[] { "-Xms4g", "-Xmx4g" };
+
+        Options opts = new OptionsBuilder().include(PutBenchmark.class.getSimpleName()).jvmArgs(jvmArgs).build();
+
+        new Runner(opts).run();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/4edc7bdd/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
new file mode 100644
index 0000000..5d29d33
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
@@ -0,0 +1,91 @@
+/*
+ * 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.benchmarks.model;
+
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryReader;
+import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.binary.Binarylizable;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * Simple wrapped int value.
+ */
+public class IntValue implements Externalizable, Binarylizable {
+    /** Value. */
+    private int val;
+
+    /**
+     * Default constructor.
+     */
+    public IntValue() {
+        // No-op.
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param val Value.
+     */
+    public IntValue(int val) {
+        this.val = val;
+    }
+
+    /**
+     * @param val Value.
+     */
+    public void value(int val) {
+        this.val = val;
+    }
+
+    /**
+     * @return Value.
+     */
+    public int value() {
+        return val;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        val = in.readInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
+        writer.writeInt("id", val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
+        val = reader.readInt("id");
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Value [id=" + val + ']';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/4edc7bdd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0a74c47..2dd9698 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,6 +84,7 @@
         <module>modules/osgi-paxlogging</module>
         <module>modules/osgi-karaf</module>
         <module>modules/osgi</module>
+		<module>modules/benchmarks</module>
     </modules>
 
     <profiles>


[39/49] ignite git commit: Revert PR with wrong author.

Posted by nt...@apache.org.
Revert PR with wrong author.


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

Branch: refs/heads/ignite-2435
Commit: 304370cf7500f259e7a3a4699dab9f08a7609200
Parents: e5fda53
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Feb 1 10:43:45 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Feb 1 10:43:45 2016 +0700

----------------------------------------------------------------------
 .../apache/ignite/visor/commands/top/VisorTopologyCommand.scala | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/304370cf/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
index d2ec662..5e278ed 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
@@ -263,13 +263,12 @@ class VisorTopologyCommand extends VisorConsoleCommand {
 
         val hostsT = VisorTextTable()
 
-        hostsT #= ("Int./Ext. IPs", "Node ID8(@)","Node Type", "OS", "CPUs", "MACs", "CPU Load")
+        hostsT #= ("Int./Ext. IPs", "Node ID8(@)", "OS", "CPUs", "MACs", "CPU Load")
 
         neighborhood.foreach {
             case (_, neighbors) =>
                 var ips = Set.empty[String]
                 var id8s = List.empty[String]
-                var nodeTypes = List.empty[String]
                 var macs = Set.empty[String]
                 var cpuLoadSum = 0.0
 
@@ -288,7 +287,6 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 neighbors.foreach(n => {
                     id8s = id8s :+ (i.toString + ": " + nodeId8(n.id))
 
-                    nodeTypes = nodeTypes :+ (if (n.isClient) "Client" else "Server")
                     i += 1
 
                     ips = ips ++ n.addresses()
@@ -302,7 +300,6 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 hostsT += (
                     ips.toSeq,
                     id8s,
-                    nodeTypes,
                     os,
                     cpus,
                     macs.toSeq,


[48/49] ignite git commit: IGNITE-1069 Added output of node type (server or client) in Visor commandline for node command. - Fixes #442.

Posted by nt...@apache.org.
IGNITE-1069 Added output of node type (server or client) in Visor commandline for node command. - Fixes #442.

Signed-off-by: AKuznetsov <ak...@gridgain.com>


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

Branch: refs/heads/ignite-2435
Commit: 58dce88b8dd0762c413850af2dfeadbdd22c519f
Parents: c3b83fe
Author: kcheng <kc...@gmail.com>
Authored: Mon Feb 1 20:31:34 2016 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Feb 1 20:31:34 2016 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/visor/commands/node/VisorNodeCommand.scala  | 1 +
 .../src/main/scala/org/apache/ignite/visor/visor.scala            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/58dce88b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
index f4a1f87..9ba0129 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
@@ -157,6 +157,7 @@ class VisorNodeCommand extends VisorConsoleCommand {
 
                         t += ("ID", node.id)
                         t += ("ID8", nid8(node))
+                        t += ("Node Type", if (node.isClient) "Client" else "Server")
                         t += ("Order", node.order)
 
                         (0 /: sortAddresses(node.addresses))((b, a) => { t += ("Address (" + b + ")", a); b + 1 })

http://git-wip-us.apache.org/repos/asf/ignite/blob/58dce88b/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 986089b..a4eed69 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
@@ -1800,7 +1800,7 @@ object visor extends VisorTag {
 
         val t = VisorTextTable()
 
-        t #= ("#", "Node ID8(@), IP", "Up Time", "CPUs", "CPU Load", "Free Heap")
+        t #= ("#", "Node ID8(@), IP","Node Type", "Up Time", "CPUs", "CPU Load", "Free Heap")
 
         val nodes = ignite.cluster.nodes().toList
 
@@ -1826,6 +1826,7 @@ object visor extends VisorTag {
                 t += (
                     i,
                     nodeId8Addr(n.id),
+                    if (n.isClient) "Client" else "Server",
                     X.timeSpan2HMS(m.getUpTime),
                     n.metrics.getTotalCpus,
                     safePercent(cpuLoadPct),


[43/49] ignite git commit: IGNITE-2408 : Removed hotspot from GridDhtAtomicCache$DeferredResponseBuffer.addResponse() caused by a call to size() method which is O(N). Now sizex() method is used instead, which is O(1). This closes #428.

Posted by nt...@apache.org.
IGNITE-2408 : Removed hotspot from GridDhtAtomicCache$DeferredResponseBuffer.addResponse() caused by a call to size() method which is O(N). Now sizex() method is used instead, which is O(1). This closes #428.


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

Branch: refs/heads/ignite-2435
Commit: 5500a18b4db1326b2089e51f5b5b9870c7113ecf
Parents: 4e61602
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Feb 1 10:42:10 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Feb 1 10:42:10 2016 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5500a18b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 6b23550..cba4e61 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -3084,7 +3084,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         private AtomicBoolean guard = new AtomicBoolean(false);
 
         /** Response versions. */
-        private Collection<GridCacheVersion> respVers = new ConcurrentLinkedDeque8<>();
+        private ConcurrentLinkedDeque8<GridCacheVersion> respVers = new ConcurrentLinkedDeque8<>();
 
         /** Node ID. */
         private final UUID nodeId;
@@ -3151,7 +3151,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 respVers.add(ver);
 
-                if  (respVers.size() > DEFERRED_UPDATE_RESPONSE_BUFFER_SIZE && guard.compareAndSet(false, true))
+                if  (respVers.sizex() > DEFERRED_UPDATE_RESPONSE_BUFFER_SIZE && guard.compareAndSet(false, true))
                     snd = true;
             }
             finally {


[19/49] ignite git commit: Removed benchmark packaging step as it causes build error on TC for no apparent reason.

Posted by nt...@apache.org.
Removed benchmark packaging step as it causes build error on TC for no apparent reason.


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

Branch: refs/heads/ignite-2435
Commit: d3fbb1cba6fbe28e31953ccde9451df612c67ffb
Parents: 077f237
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 28 15:28:40 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 15:28:40 2016 +0300

----------------------------------------------------------------------
 modules/benchmarks/pom.xml | 30 ------------------------------
 1 file changed, 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d3fbb1cb/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index 67e4727..e735491 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -94,36 +94,6 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <version>2.2</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <finalName>${uberjar.name}</finalName>
-                            <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>org.openjdk.jmh.Main</mainClass>
-                                </transformer>
-                            </transformers>
-                            <filters>
-                                <filter>
-                                    <!--
-                                        Shading signed JARs will fail without this.
-                                        http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-                                    -->
-                                    <artifact>*:*</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/*.SF</exclude>
-                                        <exclude>META-INF/*.DSA</exclude>
-                                        <exclude>META-INF/*.RSA</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                        </configuration>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
         <pluginManagement>


[17/49] ignite git commit: WIP on local benchmarks.

Posted by nt...@apache.org.
WIP on local benchmarks.


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

Branch: refs/heads/ignite-2435
Commit: f74e89190f241ba71d81f9c5e46b3ca9fb6a87ce
Parents: a34d705
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 28 13:24:22 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 13:24:22 2016 +0300

----------------------------------------------------------------------
 .../benchmarks/jmh/JmhAbstractBenchmark.java    | 150 +++++++++++++++
 .../jmh/cache/JmhCacheAbstractBenchmark.java    | 110 +++++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 150 +++++++++++++++
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 -----------------
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 184 +++++++++++++++++++
 5 files changed, 594 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f74e8919/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/JmhAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/JmhAbstractBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/JmhAbstractBenchmark.java
new file mode 100644
index 0000000..69e4a78
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/JmhAbstractBenchmark.java
@@ -0,0 +1,150 @@
+/*
+ * 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.benchmarks.jmh;
+
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * Base class for all JMH-related benchmarks.
+ */
+public abstract class JmhAbstractBenchmark {
+    /**
+     * Generate random integer value.
+     *
+     * @return Value.
+     */
+    protected static int randomInt() {
+        return ThreadLocalRandom.current().nextInt();
+    }
+
+    /**
+     * Generate random integer value.
+     *
+     * @param max Upper bound.
+     * @return Value.
+     */
+    protected static int randomInt(int max) {
+        return ThreadLocalRandom.current().nextInt(max);
+    }
+
+    /**
+     * Get boolean property.
+     *
+     * @param name Name.
+     * @return Value.
+     */
+    protected static boolean booleanProperty(String name) {
+        return booleanProperty(name, false);
+    }
+
+    /**
+     * Get boolean property.
+     *
+     * @param name Name.
+     * @param dflt Default.
+     * @return Value.
+     */
+    protected static boolean booleanProperty(String name, boolean dflt) {
+        String val = property(name);
+
+        return val != null ? Boolean.parseBoolean(val) : dflt;
+    }
+
+    /**
+     * Get int property.
+     *
+     * @param name Name.
+     * @return Value.
+     */
+    protected static int intProperty(String name) {
+        return intProperty(name, 0);
+    }
+
+    /**
+     * Get int property.
+     *
+     * @param name Name.
+     * @param dflt Default value.
+     * @return Value.
+     */
+    protected static int intProperty(String name, int dflt) {
+        String val = property(name);
+
+        return val != null ? Integer.parseInt(val) : dflt;
+    }
+
+    /**
+     * Get string property.
+     *
+     * @param name Name.
+     * @return Result.
+     */
+    protected static String stringProperty(String name) {
+        return stringProperty(name, null);
+    }
+
+    /**
+     * Get string property.
+     *
+     * @param name Name.
+     * @param dflt Default value.
+     * @return Result.
+     */
+    protected static String stringProperty(String name, String dflt) {
+        String val = property(name);
+
+        return val != null ? val : dflt;
+    }
+
+    /**
+     * Get enum property.
+     *
+     * @param name Name.
+     * @param cls Class.
+     * @return Value.
+     */
+    @SuppressWarnings("unchecked")
+    protected static <T> T enumProperty(String name, Class cls) {
+        return enumProperty(name, cls, null);
+    }
+
+    /**
+     * Get enum property.
+     *
+     * @param name Name.
+     * @param cls Class.
+     * @param dflt Default value.
+     * @return Value.
+     */
+    @SuppressWarnings("unchecked")
+    protected static <T> T enumProperty(String name, Class cls, T dflt) {
+        String val = property(name);
+
+        return val != null ? (T)Enum.valueOf(cls, val) : dflt;
+    }
+
+    /**
+     * Get property's value.
+     *
+     * @param name Name.
+     * @return Value.
+     */
+    private static String property(String name) {
+        return System.getProperty(name);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f74e8919/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
new file mode 100644
index 0000000..1205650
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
@@ -0,0 +1,110 @@
+/*
+ * 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.benchmarks.jmh.cache;
+
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheRebalanceMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.benchmarks.jmh.JmhAbstractBenchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+
+/**
+ * Base class for cache benchmarks.
+ */
+@State(Scope.Benchmark)
+public class JmhCacheAbstractBenchmark extends JmhAbstractBenchmark {
+    /** Property: backups. */
+    protected static final String PROP_BACKUPS = "ignite.jmh.cache.backups";
+
+    /** Property: atomicity mode. */
+    protected static final String PROP_ATOMICITY_MODE = "ignite.jmh.cache.atomicityMode";
+
+    /** Property: atomicity mode. */
+    protected static final String PROP_WRITE_SYNC_MODE = "ignite.jmh.cache.writeSynchronizationMode";
+
+    /**
+     * Setup routine. Child classes must invoke this method first.
+     *
+     * @throws Exception If failed.
+     */
+    @Setup
+    public void setup() throws Exception {
+        System.out.println();
+        System.out.println("--------------------");
+
+        System.out.println("IGNITE BENCHMARK INFO: ");
+
+        System.out.println("\tbackups:                    " + intProperty(PROP_BACKUPS));
+
+        System.out.println("\tatomicity mode:             " +
+            enumProperty(PROP_ATOMICITY_MODE, CacheAtomicityMode.class));
+
+        System.out.println("\twrite synchronization mode: " +
+            enumProperty(PROP_WRITE_SYNC_MODE, CacheWriteSynchronizationMode.class));
+
+        System.out.println("--------------------");
+        System.out.println();
+    }
+
+    /**
+     * Tear down routine.
+     *
+     * @throws Exception If failed.
+     */
+    @TearDown
+    public void tearDown() throws Exception {
+        Ignition.stopAll(true);
+    }
+
+    /**
+     * Create cache configuration.
+     *
+     * @return Cache configuration.
+     */
+    protected CacheConfiguration cacheConfiguration() {
+        CacheConfiguration cacheCfg = new CacheConfiguration();
+
+        cacheCfg.setName(null);
+        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
+        cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
+
+        // Set atomicity mode.
+        CacheAtomicityMode atomicityMode = enumProperty(PROP_ATOMICITY_MODE, CacheAtomicityMode.class);
+
+        if (atomicityMode != null)
+            cacheCfg.setAtomicityMode(atomicityMode);
+
+        // Set write synchronization mode.
+        CacheWriteSynchronizationMode writeSyncMode =
+            enumProperty(PROP_WRITE_SYNC_MODE, CacheWriteSynchronizationMode.class);
+
+        if (writeSyncMode != null)
+            cacheCfg.setWriteSynchronizationMode(writeSyncMode);
+
+        // Set backups.
+        cacheCfg.setBackups(intProperty(PROP_BACKUPS));
+
+        return cacheCfg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f74e8919/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
new file mode 100644
index 0000000..c05acf0
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
@@ -0,0 +1,150 @@
+/*
+ * 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.benchmarks.jmh.cache;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner;
+import org.apache.ignite.internal.benchmarks.model.IntValue;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Threads;
+import org.openjdk.jmh.annotations.Warmup;
+
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Put benchmark.
+ */
+@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
+@BenchmarkMode(Mode.Throughput)
+@OutputTimeUnit(TimeUnit.SECONDS)
+@Warmup(iterations = 10)
+@Measurement(iterations = 120)
+@Fork(1)
+public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
+    /** First Ignite instance. */
+    private static Ignite ignite1;
+
+    /** Second Ignite instance. */
+    private static Ignite ignite2;
+
+    /** Target cache. */
+    private static IgniteCache<Integer, IntValue> cache1;
+
+    /** Items count. */
+    private static final int CNT = 100000;
+
+    /** IP finder shared across nodes. */
+    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /**
+     * Set up routine.
+     *
+     * @throws Exception If failed.
+     */
+
+    public void setup() throws Exception {
+        super.setup();
+
+        ignite1 = Ignition.start(config("node1"));
+        ignite2 = Ignition.start(config("node2"));
+
+        cache1 = ignite1.cache(null);
+
+        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
+
+        for (int i = 0; i < CNT; i++)
+            dataLdr.addData(i, new IntValue(i));
+
+        dataLdr.close();
+
+        System.out.println("Cache populated.");
+    }
+
+    /**
+     * Create configuration.
+     *
+     * @param gridName Grid name.
+     * @return Configuration.
+     */
+    private IgniteConfiguration config(String gridName) {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        cfg.setGridName(gridName);
+
+        cfg.setLocalHost("127.0.0.1");
+
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        discoSpi.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(discoSpi);
+
+        cfg.setCacheConfiguration(cacheConfiguration());
+
+        return cfg;
+    }
+
+    /**
+     * Test PUT operation.
+     *
+     * @throws Exception If failed.
+     */
+    @Benchmark
+    @Threads(4)
+    public void testPut() throws Exception {
+        int key = ThreadLocalRandom.current().nextInt(CNT);
+
+        cache1.put(key, new IntValue(key));
+    }
+
+    /**
+     * Runner.
+     *
+     * @param args Arguments.
+     * @throws Exception If failed.
+     */
+    public static void main(String[] args) throws Exception {
+        JmhIdeBenchmarkRunner.create()
+            .forks(1)
+            .warmupIterations(10)
+            .measurementIterations(2000)
+            .classes(JmhCachePutBenchmark.class)
+            .jvmArguments(
+                "-Xms4g",
+                "-Xmx4g",
+                "-XX:+UnlockCommercialFeatures",
+                "-XX:+FlightRecorder",
+                "-XX:StartFlightRecording=delay=20s,duration=60s,dumponexit=true,settings=alloc,filename=ignite-put_bench.jfr",
+                JmhIdeBenchmarkRunner.createProperty(PROP_BACKUPS, 1),
+                JmhIdeBenchmarkRunner.createProperty(PROP_ATOMICITY_MODE, CacheAtomicityMode.ATOMIC),
+                JmhIdeBenchmarkRunner.createProperty(PROP_WRITE_SYNC_MODE, CacheWriteSynchronizationMode.PRIMARY_SYNC))
+            .run();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f74e8919/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
deleted file mode 100644
index aa04389..0000000
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.benchmarks.jmh.cache;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.internal.benchmarks.model.IntValue;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.TearDown;
-import org.openjdk.jmh.annotations.Threads;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.runner.Runner;
-import org.openjdk.jmh.runner.options.Options;
-import org.openjdk.jmh.runner.options.OptionsBuilder;
-
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Put benchmark.
- */
-@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
-@State(Scope.Benchmark)
-@BenchmarkMode(Mode.Throughput)
-@OutputTimeUnit(TimeUnit.SECONDS)
-@Warmup(iterations = 10)
-@Measurement(iterations = 120)
-@Fork(1)
-public class PutBenchmark {
-    /** First Ignite instance. */
-    private static Ignite ignite1;
-
-    /** Second Ignite instance. */
-    private static Ignite ignite2;
-
-    /** Target cache. */
-    private static IgniteCache<Integer, IntValue> cache1;
-
-    /** Items count. */
-    private static final int CNT = 100000;
-
-    /** IP finder shared across nodes. */
-    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /**
-     * Set up routine.
-     *
-     * @throws Exception If failed.
-     */
-    @Setup
-    public static void setup() throws Exception {
-        ignite1 = Ignition.start(config("node1"));
-        ignite2 = Ignition.start(config("node2"));
-
-        cache1 = ignite1.cache(null);
-
-        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
-
-        for (int i = 0; i < CNT; i++)
-            dataLdr.addData(i, new IntValue(i));
-
-        dataLdr.close();
-
-        System.out.println("Cache populated.");
-    }
-
-    /**
-     * Tear down routine.
-     *
-     * @throws Exception If failed.
-     */
-    @TearDown
-    public static void tearDown() throws Exception {
-        Ignition.stopAll(true);
-    }
-
-    /**
-     * Create configuration.
-     *
-     * @param gridName Grid name.
-     * @return Configuration.
-     */
-    private static IgniteConfiguration config(String gridName) {
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        cfg.setGridName(gridName);
-
-        cfg.setLocalHost("127.0.0.1");
-
-        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
-        discoSpi.setIpFinder(IP_FINDER);
-        cfg.setDiscoverySpi(discoSpi);
-
-        CacheConfiguration cacheCfg = new CacheConfiguration();
-
-        cacheCfg.setName(null);
-        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-        cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
-        cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
-        cacheCfg.setBackups(1);
-
-        cfg.setCacheConfiguration(cacheCfg);
-
-        return cfg;
-    }
-
-    /**
-     * Test PUT operation.
-     *
-     * @throws Exception If failed.
-     */
-    @Benchmark
-    @Threads(4)
-    public void testPut() throws Exception {
-        int key = ThreadLocalRandom.current().nextInt(CNT);
-
-        cache1.put(key, new IntValue(key));
-    }
-
-    /**
-     * Runner.
-     *
-     * @param args Arguments.
-     * @throws Exception If failed.
-     */
-    public static void main(String[] args) throws Exception {
-        // Use the following additional options to record JFR dump:
-        // "-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder", "-XX:StartFlightRecording=delay=20s,duration=60s,filename=ignite-put_bench.jfr"
-
-        String[] jvmArgs = new String[] { "-Xms4g", "-Xmx4g" };
-
-        Options opts = new OptionsBuilder().include(PutBenchmark.class.getSimpleName()).jvmArgs(jvmArgs).build();
-
-        new Runner(opts).run();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f74e8919/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
new file mode 100644
index 0000000..68e9000
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
@@ -0,0 +1,184 @@
+/*
+ * 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.benchmarks.jmh.runner;
+
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * JMH IDE benchmark runner configuration.
+ */
+public class JmhIdeBenchmarkRunner {
+    /** Benchmark modes. */
+    private Mode[] benchmarkModes = new Mode[] { Mode.Throughput };
+
+    /** Amount of forks */
+    private int forks = 1;
+
+    /** Warmup iterations. */
+    private int warmupIterations = 10;
+
+    /** Measurement operations. */
+    private int measurementIterations = 10;
+
+    /** Output time unit. */
+    private TimeUnit outputTimeUnit = TimeUnit.SECONDS;
+
+    /** Classes to run. */
+    private Class[] clss;
+
+    /** JVM arguments. */
+    private String[] jvmArgs;
+
+    /**
+     * Create new runner.
+     *
+     * @return New runner.
+     */
+    public static JmhIdeBenchmarkRunner create() {
+        return new JmhIdeBenchmarkRunner();
+    }
+
+    /**
+     * Constructor.
+     */
+    private JmhIdeBenchmarkRunner() {
+        // No-op.
+    }
+
+    /**
+     * @param benchmarkModes Benchmark modes.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner benchmarkModes(Mode... benchmarkModes) {
+        this.benchmarkModes = benchmarkModes;
+
+        return this;
+    }
+
+    /**
+     * @param forks Forks.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner forks(int forks) {
+        this.forks = forks;
+
+        return this;
+    }
+
+    /**
+     * @param warmupIterations Warmup iterations.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner warmupIterations(int warmupIterations) {
+        this.warmupIterations = warmupIterations;
+
+        return this;
+    }
+
+    /**
+     * @param measurementIterations Measurement iterations.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner measurementIterations(int measurementIterations) {
+        this.measurementIterations = measurementIterations;
+
+        return this;
+    }
+    /**
+     * @param outputTimeUnit Output time unit.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner outputTimeUnit(TimeUnit outputTimeUnit) {
+        this.outputTimeUnit = outputTimeUnit;
+
+        return this;
+    }
+
+    /**
+     * @param clss Classes.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner classes(Class... clss) {
+        this.clss = clss;
+
+        return this;
+    }
+
+    /**
+     * @param jvmArgs JVM arguments.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner jvmArguments(String... jvmArgs) {
+        this.jvmArgs = jvmArgs;
+
+        return this;
+    }
+
+    /**
+     * Get prepared options builder.
+     *
+     * @return Options builder.
+     */
+    public OptionsBuilder optionsBuilder() {
+        OptionsBuilder builder = new OptionsBuilder();
+
+        builder.forks(forks);
+        builder.warmupIterations(warmupIterations);
+        builder.measurementIterations(measurementIterations);
+        builder.timeUnit(outputTimeUnit);
+
+        if (benchmarkModes != null) {
+            for (Mode benchmarkMode : benchmarkModes)
+                builder.getBenchModes().add(benchmarkMode);
+        }
+
+        if (clss != null) {
+            for (Class cls : clss)
+                builder.include(cls.getSimpleName());
+        }
+
+        if (jvmArgs != null)
+            builder.jvmArgs(jvmArgs);
+
+        return builder;
+    }
+
+    /**
+     * Run benchmarks.
+     *
+     * @throws Exception If failed.
+     */
+    public void run() throws Exception {
+        new Runner(optionsBuilder().build()).run();
+    }
+
+    /**
+     * Create property.
+     *
+     * @param name Name.
+     * @param val Value.
+     * @return Result.
+     */
+    public static String createProperty(String name, Object val) {
+        return "-D" + name + "=" + val;
+    }
+}


[25/49] ignite git commit: IGNITE-2498: Fix.

Posted by nt...@apache.org.
IGNITE-2498: Fix.


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

Branch: refs/heads/ignite-2435
Commit: 1614c75076bce5a67e95efa7fae2d2a1ea015729
Parents: 79db260
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 12:20:12 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 12:20:12 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/processors/cache/GridCacheMapEntry.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1614c750/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index c896a82..775ba87 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -571,7 +571,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             IgniteUuid valClsLdrId = null;
             IgniteUuid keyClsLdrId = null;
 
-            if (cctx.kernalContext().config().isPeerClassLoadingEnabled()) {
+            if (cctx.kernalContext().config().isPeerClassLoadingEnabled() && !cctx.binaryMarshaller()) {
                 if (val != null) {
                     valClsLdrId = cctx.deploy().getClassLoaderId(
                         U.detectObjectClassLoader(val.value(cctx.cacheObjectContext(), false)));


[16/49] ignite git commit: IGNITE-2453 Fixed single primary and single backup failure cause NPE at future for backup - Fixes #427.

Posted by nt...@apache.org.
IGNITE-2453 Fixed single primary and single backup failure cause NPE at future for backup - Fixes #427.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-2435
Commit: 579d33a0913a0acecab02b754dca4e4ff4c87ea7
Parents: 550a4ea
Author: vershov <ve...@gridgain.com>
Authored: Thu Jan 28 12:29:31 2016 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Jan 28 12:29:31 2016 +0300

----------------------------------------------------------------------
 .../near/GridNearTxFinishFuture.java            | 96 ++++++++++----------
 1 file changed, 49 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/579d33a0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 3c33bc4..078e322 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -418,10 +418,6 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
 
                 ClusterNode backup = cctx.discovery().node(backupId);
 
-                final CheckBackupMiniFuture mini = new CheckBackupMiniFuture(backup, mapping);
-
-                add(mini);
-
                 // Nothing to do if backup has left the grid.
                 if (backup == null) {
                     readyNearMappingFromBackup(mapping);
@@ -431,64 +427,70 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
 
                     cause.retryReadyFuture(cctx.nextAffinityReadyFuture(tx.topologyVersion()));
 
-                    mini.onDone(new IgniteTxRollbackCheckedException("Failed to commit transaction " +
+                    onDone(new IgniteTxRollbackCheckedException("Failed to commit transaction " +
                         "(backup has left grid): " + tx.xidVersion(), cause));
                 }
-                else if (backup.isLocal()) {
-                    boolean committed = !cctx.tm().addRolledbackTx(tx);
+                else {
+                    final CheckBackupMiniFuture mini = new CheckBackupMiniFuture(backup, mapping);
 
-                    readyNearMappingFromBackup(mapping);
+                    add(mini);
 
-                    if (committed) {
-                        if (tx.syncCommit()) {
-                            GridCacheVersion nearXidVer = tx.nearXidVersion();
+                    if (backup.isLocal()) {
+                        boolean committed = !cctx.tm().addRolledbackTx(tx);
 
-                            assert nearXidVer != null : tx;
+                        readyNearMappingFromBackup(mapping);
 
-                            IgniteInternalFuture<?> fut = cctx.tm().remoteTxFinishFuture(nearXidVer);
+                        if (committed) {
+                            if (tx.syncCommit()) {
+                                GridCacheVersion nearXidVer = tx.nearXidVersion();
 
-                            fut.listen(new CI1<IgniteInternalFuture<?>>() {
-                                @Override public void apply(IgniteInternalFuture<?> fut) {
-                                    mini.onDone(tx);
-                                }
-                            });
+                                assert nearXidVer != null : tx;
 
-                            return;
-                        }
+                                IgniteInternalFuture<?> fut = cctx.tm().remoteTxFinishFuture(nearXidVer);
 
-                        mini.onDone(tx);
-                    }
-                    else {
-                        ClusterTopologyCheckedException cause =
-                            new ClusterTopologyCheckedException("Primary node left grid: " + nodeId);
+                                fut.listen(new CI1<IgniteInternalFuture<?>>() {
+                                    @Override public void apply(IgniteInternalFuture<?> fut) {
+                                        mini.onDone(tx);
+                                    }
+                                });
 
-                        cause.retryReadyFuture(cctx.nextAffinityReadyFuture(tx.topologyVersion()));
+                                return;
+                            }
 
-                        mini.onDone(new IgniteTxRollbackCheckedException("Failed to commit transaction " +
-                            "(transaction has been rolled back on backup node): " + tx.xidVersion(), cause));
-                    }
-                }
-                else {
-                    GridDhtTxFinishRequest finishReq = checkCommittedRequest(mini.futureId());
+                            mini.onDone(tx);
+                        }
+                        else {
+                            ClusterTopologyCheckedException cause =
+                                new ClusterTopologyCheckedException("Primary node left grid: " + nodeId);
 
-                    // Preserve old behavior, otherwise response is not sent.
-                    if (WAIT_REMOTE_TXS_SINCE.compareTo(backup.version()) > 0)
-                        finishReq.syncCommit(true);
+                            cause.retryReadyFuture(cctx.nextAffinityReadyFuture(tx.topologyVersion()));
 
-                    try {
-                        if (FINISH_NEAR_ONE_PHASE_SINCE.compareTo(backup.version()) <= 0)
-                            cctx.io().send(backup, finishReq, tx.ioPolicy());
-                        else {
-                            mini.onDone(new IgniteTxHeuristicCheckedException("Failed to check for tx commit on " +
-                                "the backup node (node has an old Ignite version) [rmtNodeId=" + backup.id() +
-                                ", ver=" + backup.version() + ']'));
+                            mini.onDone(new IgniteTxRollbackCheckedException("Failed to commit transaction " +
+                                "(transaction has been rolled back on backup node): " + tx.xidVersion(), cause));
                         }
                     }
-                    catch (ClusterTopologyCheckedException e) {
-                        mini.onNodeLeft(backupId);
-                    }
-                    catch (IgniteCheckedException e) {
-                        mini.onDone(e);
+                    else {
+                        GridDhtTxFinishRequest finishReq = checkCommittedRequest(mini.futureId());
+
+                        // Preserve old behavior, otherwise response is not sent.
+                        if (WAIT_REMOTE_TXS_SINCE.compareTo(backup.version()) > 0)
+                            finishReq.syncCommit(true);
+
+                        try {
+                            if (FINISH_NEAR_ONE_PHASE_SINCE.compareTo(backup.version()) <= 0)
+                                cctx.io().send(backup, finishReq, tx.ioPolicy());
+                            else {
+                                mini.onDone(new IgniteTxHeuristicCheckedException("Failed to check for tx commit on " +
+                                    "the backup node (node has an old Ignite version) [rmtNodeId=" + backup.id() +
+                                    ", ver=" + backup.version() + ']'));
+                            }
+                        }
+                        catch (ClusterTopologyCheckedException e) {
+                            mini.onNodeLeft(backupId);
+                        }
+                        catch (IgniteCheckedException e) {
+                            mini.onDone(e);
+                        }
                     }
                 }
             }


[04/49] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main

Posted by nt...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main


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

Branch: refs/heads/ignite-2435
Commit: da4da8b9905daeb4aa98b88fa3f6c2f714a0c2b1
Parents: 31eb38d b294ac9
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jan 27 13:02:20 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jan 27 13:02:20 2016 +0300

----------------------------------------------------------------------
 examples/pom.xml                                               | 2 +-
 examples/schema-import/pom.xml                                 | 2 +-
 modules/aop/pom.xml                                            | 2 +-
 modules/apache-license-gen/pom.xml                             | 2 +-
 modules/aws/pom.xml                                            | 2 +-
 modules/benchmarks/pom.xml                                     | 5 ++---
 modules/camel/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/modules/uri-dependency/pom.xml             | 2 +-
 modules/extdata/uri/pom.xml                                    | 2 +-
 modules/flume/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/jms11/pom.xml                                          | 2 +-
 modules/jta/pom.xml                                            | 2 +-
 modules/kafka/pom.xml                                          | 2 +-
 modules/log4j/pom.xml                                          | 2 +-
 modules/log4j2/pom.xml                                         | 2 +-
 modules/mesos/pom.xml                                          | 2 +-
 modules/mqtt/pom.xml                                           | 2 +-
 modules/osgi-karaf/pom.xml                                     | 2 +-
 modules/osgi-paxlogging/pom.xml                                | 2 +-
 modules/osgi/pom.xml                                           | 2 +-
 modules/platforms/cpp/common/configure.ac                      | 2 +-
 modules/platforms/cpp/core-test/configure.ac                   | 2 +-
 modules/platforms/cpp/core/configure.ac                        | 2 +-
 modules/platforms/cpp/examples/configure.ac                    | 2 +-
 modules/platforms/cpp/ignite/configure.ac                      | 2 +-
 .../dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs | 6 +++---
 .../Properties/AssemblyInfo.cs                                 | 6 +++---
 .../dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs | 6 +++---
 .../dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs       | 6 +++---
 .../platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs  | 6 +++---
 .../examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs | 6 +++---
 .../Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs       | 6 +++---
 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/storm/pom.xml                                          | 6 ++----
 modules/tools/pom.xml                                          | 2 +-
 modules/twitter/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 +-
 modules/yarn/pom.xml                                           | 2 +-
 modules/zookeeper/pom.xml                                      | 2 +-
 pom.xml                                                        | 2 +-
 66 files changed, 82 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/da4da8b9/modules/core/pom.xml
----------------------------------------------------------------------


[08/49] ignite git commit: Moved benchmarks to "internal" package.

Posted by nt...@apache.org.
Moved benchmarks to "internal" package.


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

Branch: refs/heads/ignite-2435
Commit: bfae8665230642fe558aad6a9c8b0b14f46a8cba
Parents: 80d244d
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Jan 27 15:53:54 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Jan 27 15:53:54 2016 +0300

----------------------------------------------------------------------
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 -------------------
 .../ignite/benchmarks/model/IntValue.java       |  91 ----------
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 +++++++++++++++++++
 .../internal/benchmarks/model/IntValue.java     |  91 ++++++++++
 4 files changed, 261 insertions(+), 261 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bfae8665/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
deleted file mode 100644
index 8ccaf81..0000000
--- a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/jmh/cache/PutBenchmark.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.benchmarks.jmh.cache;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.benchmarks.model.IntValue;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.TearDown;
-import org.openjdk.jmh.annotations.Threads;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.runner.Runner;
-import org.openjdk.jmh.runner.options.Options;
-import org.openjdk.jmh.runner.options.OptionsBuilder;
-
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Put benchmark.
- */
-@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
-@State(Scope.Benchmark)
-@BenchmarkMode(Mode.Throughput)
-@OutputTimeUnit(TimeUnit.SECONDS)
-@Warmup(iterations = 10)
-@Measurement(iterations = 120)
-@Fork(1)
-public class PutBenchmark {
-    /** First Ignite instance. */
-    private static Ignite ignite1;
-
-    /** Second Ignite instance. */
-    private static Ignite ignite2;
-
-    /** Target cache. */
-    private static IgniteCache<Integer, IntValue> cache1;
-
-    /** Items count. */
-    private static final int CNT = 100000;
-
-    /** IP finder shared across nodes. */
-    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /**
-     * Set up routine.
-     *
-     * @throws Exception If failed.
-     */
-    @Setup
-    public static void setup() throws Exception {
-        ignite1 = Ignition.start(config("node1"));
-        ignite2 = Ignition.start(config("node2"));
-
-        cache1 = ignite1.cache(null);
-
-        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
-
-        for (int i = 0; i < CNT; i++)
-            dataLdr.addData(i, new IntValue(i));
-
-        dataLdr.close();
-
-        System.out.println("Cache populated.");
-    }
-
-    /**
-     * Tear down routine.
-     *
-     * @throws Exception If failed.
-     */
-    @TearDown
-    public static void tearDown() throws Exception {
-        Ignition.stopAll(true);
-    }
-
-    /**
-     * Create configuration.
-     *
-     * @param gridName Grid name.
-     * @return Configuration.
-     */
-    private static IgniteConfiguration config(String gridName) {
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        cfg.setGridName(gridName);
-
-        cfg.setLocalHost("127.0.0.1");
-
-        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
-        discoSpi.setIpFinder(IP_FINDER);
-        cfg.setDiscoverySpi(discoSpi);
-
-        CacheConfiguration cacheCfg = new CacheConfiguration();
-
-        cacheCfg.setName(null);
-        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-        cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
-        cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
-        cacheCfg.setBackups(1);
-
-        cfg.setCacheConfiguration(cacheCfg);
-
-        return cfg;
-    }
-
-    /**
-     * Test PUT operation.
-     *
-     * @throws Exception If failed.
-     */
-    @Benchmark
-    @Threads(4)
-    public void testPut() throws Exception {
-        int key = ThreadLocalRandom.current().nextInt(CNT);
-
-        cache1.put(key, new IntValue(key));
-    }
-
-    /**
-     * Runner.
-     *
-     * @param args Arguments.
-     * @throws Exception If failed.
-     */
-    public static void main(String[] args) throws Exception {
-        // Use the following additional options to record JFR dump:
-        // "-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder", "-XX:StartFlightRecording=delay=20s,duration=60s,filename=ignite-put_bench.jfr"
-
-        String[] jvmArgs = new String[] { "-Xms4g", "-Xmx4g" };
-
-        Options opts = new OptionsBuilder().include(PutBenchmark.class.getSimpleName()).jvmArgs(jvmArgs).build();
-
-        new Runner(opts).run();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bfae8665/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java b/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
deleted file mode 100644
index 5d29d33..0000000
--- a/modules/benchmarks/src/main/java/org/apache/ignite/benchmarks/model/IntValue.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.benchmarks.model;
-
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryReader;
-import org.apache.ignite.binary.BinaryWriter;
-import org.apache.ignite.binary.Binarylizable;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-/**
- * Simple wrapped int value.
- */
-public class IntValue implements Externalizable, Binarylizable {
-    /** Value. */
-    private int val;
-
-    /**
-     * Default constructor.
-     */
-    public IntValue() {
-        // No-op.
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param val Value.
-     */
-    public IntValue(int val) {
-        this.val = val;
-    }
-
-    /**
-     * @param val Value.
-     */
-    public void value(int val) {
-        this.val = val;
-    }
-
-    /**
-     * @return Value.
-     */
-    public int value() {
-        return val;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        val = in.readInt();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeInt(val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
-        writer.writeInt("id", val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
-        val = reader.readInt("id");
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "Value [id=" + val + ']';
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/bfae8665/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
new file mode 100644
index 0000000..aa04389
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/PutBenchmark.java
@@ -0,0 +1,170 @@
+/*
+ * 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.benchmarks.jmh.cache;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.internal.benchmarks.model.IntValue;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheRebalanceMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.annotations.Threads;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Put benchmark.
+ */
+@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
+@State(Scope.Benchmark)
+@BenchmarkMode(Mode.Throughput)
+@OutputTimeUnit(TimeUnit.SECONDS)
+@Warmup(iterations = 10)
+@Measurement(iterations = 120)
+@Fork(1)
+public class PutBenchmark {
+    /** First Ignite instance. */
+    private static Ignite ignite1;
+
+    /** Second Ignite instance. */
+    private static Ignite ignite2;
+
+    /** Target cache. */
+    private static IgniteCache<Integer, IntValue> cache1;
+
+    /** Items count. */
+    private static final int CNT = 100000;
+
+    /** IP finder shared across nodes. */
+    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /**
+     * Set up routine.
+     *
+     * @throws Exception If failed.
+     */
+    @Setup
+    public static void setup() throws Exception {
+        ignite1 = Ignition.start(config("node1"));
+        ignite2 = Ignition.start(config("node2"));
+
+        cache1 = ignite1.cache(null);
+
+        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
+
+        for (int i = 0; i < CNT; i++)
+            dataLdr.addData(i, new IntValue(i));
+
+        dataLdr.close();
+
+        System.out.println("Cache populated.");
+    }
+
+    /**
+     * Tear down routine.
+     *
+     * @throws Exception If failed.
+     */
+    @TearDown
+    public static void tearDown() throws Exception {
+        Ignition.stopAll(true);
+    }
+
+    /**
+     * Create configuration.
+     *
+     * @param gridName Grid name.
+     * @return Configuration.
+     */
+    private static IgniteConfiguration config(String gridName) {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        cfg.setGridName(gridName);
+
+        cfg.setLocalHost("127.0.0.1");
+
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        discoSpi.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(discoSpi);
+
+        CacheConfiguration cacheCfg = new CacheConfiguration();
+
+        cacheCfg.setName(null);
+        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
+        cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
+        cacheCfg.setBackups(1);
+
+        cfg.setCacheConfiguration(cacheCfg);
+
+        return cfg;
+    }
+
+    /**
+     * Test PUT operation.
+     *
+     * @throws Exception If failed.
+     */
+    @Benchmark
+    @Threads(4)
+    public void testPut() throws Exception {
+        int key = ThreadLocalRandom.current().nextInt(CNT);
+
+        cache1.put(key, new IntValue(key));
+    }
+
+    /**
+     * Runner.
+     *
+     * @param args Arguments.
+     * @throws Exception If failed.
+     */
+    public static void main(String[] args) throws Exception {
+        // Use the following additional options to record JFR dump:
+        // "-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder", "-XX:StartFlightRecording=delay=20s,duration=60s,filename=ignite-put_bench.jfr"
+
+        String[] jvmArgs = new String[] { "-Xms4g", "-Xmx4g" };
+
+        Options opts = new OptionsBuilder().include(PutBenchmark.class.getSimpleName()).jvmArgs(jvmArgs).build();
+
+        new Runner(opts).run();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bfae8665/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/model/IntValue.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/model/IntValue.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/model/IntValue.java
new file mode 100644
index 0000000..0a97e36
--- /dev/null
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/model/IntValue.java
@@ -0,0 +1,91 @@
+/*
+ * 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.benchmarks.model;
+
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryReader;
+import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.binary.Binarylizable;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * Simple wrapped int value.
+ */
+public class IntValue implements Externalizable, Binarylizable {
+    /** Value. */
+    private int val;
+
+    /**
+     * Default constructor.
+     */
+    public IntValue() {
+        // No-op.
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param val Value.
+     */
+    public IntValue(int val) {
+        this.val = val;
+    }
+
+    /**
+     * @param val Value.
+     */
+    public void value(int val) {
+        this.val = val;
+    }
+
+    /**
+     * @return Value.
+     */
+    public int value() {
+        return val;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        val = in.readInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
+        writer.writeInt("id", val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
+        val = reader.readInt("id");
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Value [id=" + val + ']';
+    }
+}
\ No newline at end of file


[02/49] ignite git commit: 1.6.0-SNAPSHOT

Posted by nt...@apache.org.
1.6.0-SNAPSHOT


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

Branch: refs/heads/ignite-2435
Commit: b294ac9246aa4a62cb5279114198344a772460ee
Parents: 4edc7bd
Author: Ignite Teamcity <ig...@apache.org>
Authored: Wed Jan 27 12:55:45 2016 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Wed Jan 27 12:55:45 2016 +0300

----------------------------------------------------------------------
 examples/pom.xml                                               | 2 +-
 examples/schema-import/pom.xml                                 | 2 +-
 modules/aop/pom.xml                                            | 2 +-
 modules/apache-license-gen/pom.xml                             | 2 +-
 modules/aws/pom.xml                                            | 2 +-
 modules/benchmarks/pom.xml                                     | 5 ++---
 modules/camel/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/modules/uri-dependency/pom.xml             | 2 +-
 modules/extdata/uri/pom.xml                                    | 2 +-
 modules/flume/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/jms11/pom.xml                                          | 2 +-
 modules/jta/pom.xml                                            | 2 +-
 modules/kafka/pom.xml                                          | 2 +-
 modules/log4j/pom.xml                                          | 2 +-
 modules/log4j2/pom.xml                                         | 2 +-
 modules/mesos/pom.xml                                          | 2 +-
 modules/mqtt/pom.xml                                           | 2 +-
 modules/osgi-karaf/pom.xml                                     | 2 +-
 modules/osgi-paxlogging/pom.xml                                | 2 +-
 modules/osgi/pom.xml                                           | 2 +-
 modules/platforms/cpp/common/configure.ac                      | 2 +-
 modules/platforms/cpp/core-test/configure.ac                   | 2 +-
 modules/platforms/cpp/core/configure.ac                        | 2 +-
 modules/platforms/cpp/examples/configure.ac                    | 2 +-
 modules/platforms/cpp/ignite/configure.ac                      | 2 +-
 .../dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs | 6 +++---
 .../Properties/AssemblyInfo.cs                                 | 6 +++---
 .../dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs | 6 +++---
 .../dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs       | 6 +++---
 .../platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs  | 6 +++---
 .../examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs | 6 +++---
 .../Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs       | 6 +++---
 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/storm/pom.xml                                          | 6 ++----
 modules/tools/pom.xml                                          | 2 +-
 modules/twitter/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 +-
 modules/yarn/pom.xml                                           | 2 +-
 modules/zookeeper/pom.xml                                      | 2 +-
 pom.xml                                                        | 2 +-
 66 files changed, 82 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 41ad2b8..d8a38d8 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/examples/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/examples/schema-import/pom.xml b/examples/schema-import/pom.xml
index 175ae1d..62bb773 100644
--- a/examples/schema-import/pom.xml
+++ b/examples/schema-import/pom.xml
@@ -35,7 +35,7 @@
     </properties>
 
     <artifactId>ignite-schema-import-demo</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 5b16aa2..e34c6a5 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/apache-license-gen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/pom.xml b/modules/apache-license-gen/pom.xml
index e31d434..99490cf 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,7 +31,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>ignite-apache-license-gen</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index efd3b36..9fcdd6f 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index 1c4ee58..67e4727 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-benchmarks</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>
@@ -103,8 +103,7 @@
                         <configuration>
                             <finalName>${uberjar.name}</finalName>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>org.openjdk.jmh.Main</mainClass>
                                 </transformer>
                             </transformers>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/camel/pom.xml
----------------------------------------------------------------------
diff --git a/modules/camel/pom.xml b/modules/camel/pom.xml
index ca8cb29..df9a3d5 100644
--- a/modules/camel/pom.xml
+++ b/modules/camel/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-camel</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 1b06685..73a2161 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index b4a84c3..11b9a14 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
     </parent>
 
     <artifactId>ignite-cloud</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index e5b1d05..e88a797 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index bdf822b..9856d58 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <repositories>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/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 05d5253..fb57498 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.5.1.final-SNAPSHOT
+ignite.version=1.6.0-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index c682da5..4f79bee 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/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 91718cf..7df32f2 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -27,7 +27,7 @@
     <artifactId>ignite-extdata-uri-dep</artifactId>
     <packaging>jar</packaging>
 
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <modelVersion>4.0.0</modelVersion>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 7442aad..3d460ce 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -32,7 +32,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/flume/pom.xml
----------------------------------------------------------------------
diff --git a/modules/flume/pom.xml b/modules/flume/pom.xml
index 63ba1eb..91a4841 100644
--- a/modules/flume/pom.xml
+++ b/modules/flume/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-flume</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index ad25b33..b543083 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-gce</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index 6ccef90..d68f68a 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index a31df33..27466f4 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index b20bcb5..50b7082 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index e681cdf..22a52b2 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index e7285d2..f518a4c 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/jms11/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jms11/pom.xml b/modules/jms11/pom.xml
index fd0bbca..65cc94c 100644
--- a/modules/jms11/pom.xml
+++ b/modules/jms11/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jms11</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 586f16c..9418c9c 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index f18e038..e00b190 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-kafka</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 75fbbae..de422d6 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/log4j2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index e677e86..0de9801 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j2</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 8d96496..fa38265 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mesos</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/mqtt/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mqtt/pom.xml b/modules/mqtt/pom.xml
index 09319b8..23f204c 100644
--- a/modules/mqtt/pom.xml
+++ b/modules/mqtt/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mqtt</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/osgi-karaf/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-karaf/pom.xml b/modules/osgi-karaf/pom.xml
index da24d87..f12ca45 100644
--- a/modules/osgi-karaf/pom.xml
+++ b/modules/osgi-karaf/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi-karaf</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/osgi-paxlogging/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-paxlogging/pom.xml b/modules/osgi-paxlogging/pom.xml
index cbd7f5a..32fb9c6 100644
--- a/modules/osgi-paxlogging/pom.xml
+++ b/modules/osgi-paxlogging/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi-paxlogging</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi/pom.xml b/modules/osgi/pom.xml
index 1353707..f238a14 100644
--- a/modules/osgi/pom.xml
+++ b/modules/osgi/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/cpp/common/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/configure.ac b/modules/platforms/cpp/common/configure.ac
index 87d5fbc..b85fa3a 100644
--- a/modules/platforms/cpp/common/configure.ac
+++ b/modules/platforms/cpp/common/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite JNI bridge for C++], [1.5.1.7927], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
+AC_INIT([Apache Ignite JNI bridge for C++], [1.6.0.8653], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/cpp/core-test/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/configure.ac b/modules/platforms/cpp/core-test/configure.ac
index e07e478..c83bc62 100644
--- a/modules/platforms/cpp/core-test/configure.ac
+++ b/modules/platforms/cpp/core-test/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Test], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Test], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/cpp/core/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/configure.ac b/modules/platforms/cpp/core/configure.ac
index ae157eb..344aeb5 100644
--- a/modules/platforms/cpp/core/configure.ac
+++ b/modules/platforms/cpp/core/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
index b19a650..f5cf075 100644
--- a/modules/platforms/cpp/examples/configure.ac
+++ b/modules/platforms/cpp/examples/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Ingnite C++ examples],[1.5.1.7927],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_INIT([Ingnite C++ examples],[1.6.0.8653],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/cpp/ignite/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/configure.ac b/modules/platforms/cpp/ignite/configure.ac
index d0bb018..9ffbe51 100644
--- a/modules/platforms/cpp/ignite/configure.ac
+++ b/modules/platforms/cpp/ignite/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Runner], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Runner], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
index 382329a..e60e4a3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("8fae8395-7e91-411a-a78f-44d6d3fed0fc")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
index e0a1ef1..d6e2175 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
@@ -45,6 +45,6 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
index 6ead979..d27ffc8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("de8dd5cc-7c7f-4a09-80d5-7086d9416a7b")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
index 0b6f277..71ee88d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
@@ -33,9 +33,9 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("97db45a8-f922-456a-a819-7b3c6e5e03ba")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]
 
 [assembly: CLSCompliant(true)]
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
index 57c1fcc..2fce9ea 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("0f9702ec-da7d-4ce5-b4b7-73310c885355")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
index 79908a1..e84c8e1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
 
 [assembly: Guid("41a0cb95-3435-4c78-b867-900b28e2c9ee")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
index 41808b0..008fa09 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Reflection;
 
 [assembly: Guid("ce65ec7c-d3cf-41ad-8f45-f90d5af68d77")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 2810a78..a0a5471 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/scalar-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml
index 6b47f62..e7a241e 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 9d04bb2..91a1152 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 506a800..43d48ac 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 48369e3..7156e32 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index a7c1ffe..4182f24 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index 5fdeb0a..9ba5fdd 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/spark/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml
index 8dd6257..effcf1e 100644
--- a/modules/spark/pom.xml
+++ b/modules/spark/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spark</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 18db32c..65ea6d0 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index fdf0ee7..bb08220 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/storm/pom.xml
----------------------------------------------------------------------
diff --git a/modules/storm/pom.xml b/modules/storm/pom.xml
index 0cd1fcb..1c180b8 100644
--- a/modules/storm/pom.xml
+++ b/modules/storm/pom.xml
@@ -20,9 +20,7 @@
 <!--
     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>
 
     <parent>
@@ -33,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-storm</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 3363623..a3ed0f3 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/twitter/pom.xml
----------------------------------------------------------------------
diff --git a/modules/twitter/pom.xml b/modules/twitter/pom.xml
index 654b897..f041bdb 100644
--- a/modules/twitter/pom.xml
+++ b/modules/twitter/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-twitter</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 75a8fd7..143e7a5 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/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 d9934b9..e8ae547 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 2644da7..0b628c8 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index fdc1b2b..61bd4ac 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 214f1ce..360bdfc 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 22d6ff7..52418d9 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index 564fd11..efd365f 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yarn</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/modules/zookeeper/pom.xml
----------------------------------------------------------------------
diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml
index 75cf61e..e296b55 100644
--- a/modules/zookeeper/pom.xml
+++ b/modules/zookeeper/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-zookeeper</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b294ac92/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2dd9698..4f797e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>apache-ignite</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>


[20/49] ignite git commit: WIP on local benchmarks.

Posted by nt...@apache.org.
WIP on local benchmarks.


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

Branch: refs/heads/ignite-2435
Commit: 62d6ce73c2e48c3a3306b0be769065a9dc6fdfac
Parents: d3fbb1c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 28 16:37:20 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 16:37:20 2016 +0300

----------------------------------------------------------------------
 .../jmh/cache/JmhCacheAbstractBenchmark.java    |  71 +++++++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 102 +++++++------------
 .../jmh/runner/JmhIdeBenchmarkRunner.java       |  16 +++
 3 files changed, 124 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/62d6ce73/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
index 1205650..e8829bb 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCacheAbstractBenchmark.java
@@ -17,13 +17,19 @@
 
 package org.apache.ignite.internal.benchmarks.jmh.cache;
 
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.benchmarks.jmh.JmhAbstractBenchmark;
+import org.apache.ignite.internal.util.typedef.internal.A;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.openjdk.jmh.annotations.Scope;
 import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
@@ -43,6 +49,24 @@ public class JmhCacheAbstractBenchmark extends JmhAbstractBenchmark {
     /** Property: atomicity mode. */
     protected static final String PROP_WRITE_SYNC_MODE = "ignite.jmh.cache.writeSynchronizationMode";
 
+    /** Property: nodes count. */
+    protected static final String PROP_DATA_NODES = "ignite.jmh.cache.dataNodes";
+
+    /** Property: client mode flag. */
+    protected static final String PROP_CLIENT_MODE = "ignite.jmh.cache.clientMode";
+
+    /** Default amount of nodes. */
+    protected static final int DFLT_DATA_NODES = 1;
+
+    /** IP finder shared across nodes. */
+    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** Target node. */
+    protected Ignite node;
+
+    /** Target cache. */
+    protected IgniteCache cache;
+
     /**
      * Setup routine. Child classes must invoke this method first.
      *
@@ -55,6 +79,10 @@ public class JmhCacheAbstractBenchmark extends JmhAbstractBenchmark {
 
         System.out.println("IGNITE BENCHMARK INFO: ");
 
+        System.out.println("\tclient mode:                " + booleanProperty(PROP_CLIENT_MODE));
+
+        System.out.println("\tdata nodes:                 " + intProperty(PROP_DATA_NODES, DFLT_DATA_NODES));
+
         System.out.println("\tbackups:                    " + intProperty(PROP_BACKUPS));
 
         System.out.println("\tatomicity mode:             " +
@@ -65,6 +93,27 @@ public class JmhCacheAbstractBenchmark extends JmhAbstractBenchmark {
 
         System.out.println("--------------------");
         System.out.println();
+
+        int nodesCnt = intProperty(PROP_DATA_NODES, DFLT_DATA_NODES);
+
+        A.ensure(nodesCnt >= 1, "nodesCnt >= 1");
+
+        node = Ignition.start(configuration("node0"));
+
+        for (int i = 1; i < nodesCnt; i++)
+            Ignition.start(configuration("node" + i));
+
+        boolean isClient = booleanProperty(PROP_CLIENT_MODE);
+
+        if (isClient) {
+            IgniteConfiguration clientCfg = configuration("client");
+
+            clientCfg.setClientMode(true);
+
+            node = Ignition.start(clientCfg);
+        }
+
+        cache = node.cache(null);
     }
 
     /**
@@ -78,6 +127,28 @@ public class JmhCacheAbstractBenchmark extends JmhAbstractBenchmark {
     }
 
     /**
+     * Create Ignite configuration.
+     *
+     * @param gridName Grid name.
+     * @return Configuration.
+     */
+    protected IgniteConfiguration configuration(String gridName) {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        cfg.setGridName(gridName);
+
+        cfg.setLocalHost("127.0.0.1");
+
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        discoSpi.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(discoSpi);
+
+        cfg.setCacheConfiguration(cacheConfiguration());
+
+        return cfg;
+    }
+
+    /**
      * Create cache configuration.
      *
      * @return Cache configuration.

http://git-wip-us.apache.org/repos/asf/ignite/blob/62d6ce73/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
index c05acf0..6421243 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
@@ -17,54 +17,24 @@
 
 package org.apache.ignite.internal.benchmarks.jmh.cache;
 
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner;
 import org.apache.ignite.internal.benchmarks.model.IntValue;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
 import org.openjdk.jmh.annotations.Threads;
-import org.openjdk.jmh.annotations.Warmup;
 
 import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
 
 /**
  * Put benchmark.
  */
-@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"})
-@BenchmarkMode(Mode.Throughput)
-@OutputTimeUnit(TimeUnit.SECONDS)
-@Warmup(iterations = 10)
-@Measurement(iterations = 120)
-@Fork(1)
+@SuppressWarnings("unchecked")
 public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
-    /** First Ignite instance. */
-    private static Ignite ignite1;
-
-    /** Second Ignite instance. */
-    private static Ignite ignite2;
-
-    /** Target cache. */
-    private static IgniteCache<Integer, IntValue> cache1;
-
     /** Items count. */
     private static final int CNT = 100000;
 
-    /** IP finder shared across nodes. */
-    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
     /**
      * Set up routine.
      *
@@ -74,12 +44,7 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
     public void setup() throws Exception {
         super.setup();
 
-        ignite1 = Ignition.start(config("node1"));
-        ignite2 = Ignition.start(config("node2"));
-
-        cache1 = ignite1.cache(null);
-
-        IgniteDataStreamer<Integer, IntValue> dataLdr = ignite1.dataStreamer(cache1.getName());
+        IgniteDataStreamer<Integer, IntValue> dataLdr = node.dataStreamer(cache.getName());
 
         for (int i = 0; i < CNT; i++)
             dataLdr.addData(i, new IntValue(i));
@@ -90,28 +55,6 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
     }
 
     /**
-     * Create configuration.
-     *
-     * @param gridName Grid name.
-     * @return Configuration.
-     */
-    private IgniteConfiguration config(String gridName) {
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        cfg.setGridName(gridName);
-
-        cfg.setLocalHost("127.0.0.1");
-
-        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
-        discoSpi.setIpFinder(IP_FINDER);
-        cfg.setDiscoverySpi(discoSpi);
-
-        cfg.setCacheConfiguration(cacheConfiguration());
-
-        return cfg;
-    }
-
-    /**
      * Test PUT operation.
      *
      * @throws Exception If failed.
@@ -121,7 +64,7 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
     public void testPut() throws Exception {
         int key = ThreadLocalRandom.current().nextInt(CNT);
 
-        cache1.put(key, new IntValue(key));
+        cache.put(key, new IntValue(key));
     }
 
     /**
@@ -131,20 +74,49 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
      * @throws Exception If failed.
      */
     public static void main(String[] args) throws Exception {
+        runAtomic(CacheAtomicityMode.ATOMIC);
+    }
+
+    /**
+     * Run benchmarks for atomic cache.
+     *
+     * @param atomicityMode Atomicity mode.
+     * @throws Exception If failed.
+     */
+    private static void runAtomic(CacheAtomicityMode atomicityMode) throws Exception {
+        run(true, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        run(true, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
+        run(false, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        run(false, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
+    }
+
+    /**
+     * Run benchmark.
+     *
+     * @param client Client mode flag.
+     * @param writeSyncMode Write synchronization mode.
+     * @throws Exception If failed.
+     */
+    private static void run(boolean client, CacheAtomicityMode atomicityMode,
+        CacheWriteSynchronizationMode writeSyncMode) throws Exception {
+        String output = "ignite-cache-put-" + (client ? "client" : "data") + "-" + atomicityMode + "-" + writeSyncMode;
+
         JmhIdeBenchmarkRunner.create()
             .forks(1)
             .warmupIterations(10)
-            .measurementIterations(2000)
+            .measurementIterations(60)
             .classes(JmhCachePutBenchmark.class)
+            .output(output + ".jmh.log")
             .jvmArguments(
                 "-Xms4g",
                 "-Xmx4g",
                 "-XX:+UnlockCommercialFeatures",
                 "-XX:+FlightRecorder",
-                "-XX:StartFlightRecording=delay=20s,duration=60s,dumponexit=true,settings=alloc,filename=ignite-put_bench.jfr",
-                JmhIdeBenchmarkRunner.createProperty(PROP_BACKUPS, 1),
-                JmhIdeBenchmarkRunner.createProperty(PROP_ATOMICITY_MODE, CacheAtomicityMode.ATOMIC),
-                JmhIdeBenchmarkRunner.createProperty(PROP_WRITE_SYNC_MODE, CacheWriteSynchronizationMode.PRIMARY_SYNC))
+                "-XX:StartFlightRecording=delay=30s,dumponexit=true,settings=alloc,filename=" + output + ".jfr",
+                JmhIdeBenchmarkRunner.createProperty(PROP_ATOMICITY_MODE, atomicityMode),
+                JmhIdeBenchmarkRunner.createProperty(PROP_WRITE_SYNC_MODE, writeSyncMode),
+                JmhIdeBenchmarkRunner.createProperty(PROP_DATA_NODES, 2),
+                JmhIdeBenchmarkRunner.createProperty(PROP_CLIENT_MODE, client))
             .run();
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/62d6ce73/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
index 68e9000..a34cfb9 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
@@ -48,6 +48,9 @@ public class JmhIdeBenchmarkRunner {
     /** JVM arguments. */
     private String[] jvmArgs;
 
+    /** Output. */
+    private String output;
+
     /**
      * Create new runner.
      *
@@ -124,6 +127,16 @@ public class JmhIdeBenchmarkRunner {
     }
 
     /**
+     * @param output Output file.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner output(String output) {
+        this.output = output;
+
+        return this;
+    }
+
+    /**
      * @param jvmArgs JVM arguments.
      * @return This instance.
      */
@@ -159,6 +172,9 @@ public class JmhIdeBenchmarkRunner {
         if (jvmArgs != null)
             builder.jvmArgs(jvmArgs);
 
+        if (output != null)
+            builder.output(output);
+
         return builder;
     }
 


[07/49] ignite git commit: #Removing random eviction policy tests as it is deprecated.

Posted by nt...@apache.org.
#Removing random eviction policy tests as it is deprecated.


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

Branch: refs/heads/ignite-2435
Commit: 80d244d8013187a03fbcb2a1a627629de79d6d65
Parents: 54891f8
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Jan 27 14:06:50 2016 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Jan 27 14:06:50 2016 +0300

----------------------------------------------------------------------
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |  79 ----
 .../random/RandomEvictionPolicySelfTest.java    | 363 -------------------
 .../IgniteCacheEvictionSelfTestSuite.java       |   4 -
 3 files changed, 446 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/80d244d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
deleted file mode 100644
index a560f59..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.eviction.random;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.eviction.random.RandomEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Random eviction policy cache size test.
- */
-public class RandomEvictionPolicyCacheSizeSelfTest extends GridCommonAbstractTest {
-    /** Grid count. */
-    private static final int GRID_CNT = 3;
-
-    /** Keys count. */
-    private static final int KEYS_CNT = 50;
-
-    /** Policy max size. */
-    private static final int PLC_MAX_SIZE = 10;
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        startGrids(GRID_CNT);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        CacheConfiguration ccfg = defaultCacheConfiguration();
-        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        ccfg.setNearConfiguration(null);
-        ccfg.setEvictionPolicy(new RandomEvictionPolicy(PLC_MAX_SIZE));
-
-        cfg.setCacheConfiguration(ccfg);
-
-        return cfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSize() throws Exception {
-        IgniteCache<Integer, Integer> cache = grid(0).cache(null);
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.put(i, i);
-
-        // Ensure that all entries accessed without data races and cache size will correct
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.get(i);
-
-        assertEquals(PLC_MAX_SIZE * GRID_CNT, cache.size());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/80d244d8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicySelfTest.java
deleted file mode 100644
index a253a25..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicySelfTest.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.eviction.random;
-
-import java.util.Random;
-import java.util.concurrent.Callable;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.eviction.random.RandomEvictionPolicy;
-import org.apache.ignite.internal.processors.cache.eviction.EvictionAbstractTest;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Random eviction policy test.
- */
-public class RandomEvictionPolicySelfTest extends
-    EvictionAbstractTest<RandomEvictionPolicy<String, String>> {
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMemory() throws Exception {
-        try {
-            Ignite g = startGrid(0);
-
-            int max = 10;
-
-            policy(0).setMaxSize(max);
-
-            int keys = 31;
-
-            for (int i = 0; i < keys; i++) {
-                String s = Integer.toString(i);
-
-                g.cache(null).put(s, s);
-            }
-
-            assert g.cache(null).size() <= max;
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRandom() throws Exception {
-        try {
-            Ignite g = startGrid(0);
-
-            int max = 10;
-
-            policy(0).setMaxSize(max);
-
-            Random rand = new Random();
-
-            int keys = 31;
-
-            String[] t = new String[keys];
-
-            for (int i = 0; i < t.length; i++)
-                t[i] = Integer.toString(i);
-
-            int runs = 10000;
-
-            for (int i = 0; i < runs; i++) {
-                boolean rmv = rand.nextBoolean();
-
-                int j = rand.nextInt(t.length);
-
-                if (rmv)
-                    g.cache(null).remove(t[j]);
-                else
-                    g.cache(null).put(t[j], t[j]);
-
-                if (i % 1000 == 0)
-                    info("Stats [cntr=" + i + ", total=" + runs + ']');
-            }
-
-            int size = g.cache(null).size();
-
-            info("Cache size: " + size);
-
-            assert size <= (max * 1.2) : size; // Add 20% room for random evictions.
-
-            info(policy(0));
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAllowEmptyEntries() throws Exception {
-        try {
-            startGrid();
-
-            IgniteCache<String, String> c = jcache();
-
-            MockEntry e1 = new MockEntry("1", c);
-            MockEntry e2 = new MockEntry("2", c);
-            MockEntry e3 = new MockEntry("3", c);
-            MockEntry e4 = new MockEntry("4", c);
-            MockEntry e5 = new MockEntry("5", c);
-
-            RandomEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(10);
-
-            p.onEntryAccessed(false, e1);
-
-            assertFalse(e1.isEvicted());
-
-            p.onEntryAccessed(false, e2);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e2.isEvicted());
-
-            p.onEntryAccessed(false, e3);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-
-            p.onEntryAccessed(false, e4);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e4.isEvicted());
-
-            p.onEntryAccessed(false, e5);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e5.isEvicted());
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRandomMultiThreaded() throws Exception {
-        try {
-            final Ignite g = startGrid(0);
-
-            int max = 10;
-
-            policy(0).setMaxSize(max);
-
-            final Random rand = new Random();
-
-            int keys = 31;
-
-            final String[] t = new String[keys];
-
-            for (int i = 0; i < t.length; i++)
-                t[i] = Integer.toString(i);
-
-            multithreaded(new Callable() {
-                @Nullable @Override public Object call() {
-                    int runs = 3000;
-
-                    for (int i = 0; i < runs; i++) {
-                        boolean rmv = rand.nextBoolean();
-
-                        int j = rand.nextInt(t.length);
-
-                        if (rmv)
-                            g.cache(null).remove(t[j]);
-                        else
-                            g.cache(null).put(t[j], t[j]);
-
-                        if (i != 0 && i % 1000 == 0)
-                            info("Stats [cntr=" + i + ", total=" + runs + ']');
-                    }
-
-                    return null;
-                }
-            }, 10);
-
-            int size = g.cache(null).size();
-
-            assertTrue("Unexpected cache size [size=" + size + ", max=" + max + ']', size <= max);
-
-            info(policy(0));
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizeAllowEmptyEntries() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizeMemory() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizePartitionedNearDisabled() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizePolicy() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizePolicyWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizePut() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxMemSizeRandom() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeAllowEmptyEntries() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeAllowEmptyEntriesWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeMemory() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeMemoryWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void doTestPolicy() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizePut() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizePutWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeRandom() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizeRandomWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizePolicyWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void doTestPolicyWithBatch() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testMaxSizePartitionedNearDisabled() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPartitionedNearEnabled() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPartitionedNearDisabledMultiThreaded() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPartitionedNearDisabledBackupSyncMultiThreaded() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPartitionedNearEnabledMultiThreaded() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPartitionedNearEnabledBackupSyncMultiThreaded() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override protected RandomEvictionPolicy<String, String> createPolicy(int plcMax) {
-        RandomEvictionPolicy<String, String> plc = new RandomEvictionPolicy<>();
-
-        plc.setMaxSize(plcMax);
-
-        return plc;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected RandomEvictionPolicy<String, String> createNearPolicy(int nearMax) {
-        RandomEvictionPolicy<String, String> plc = new RandomEvictionPolicy<>();
-
-        plc.setMaxSize(plcMax);
-
-        return plc;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void checkNearPolicies(int nearMax) {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void checkPolicies() {
-        // No-op.
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/80d244d8/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 165410f..3d8bbba 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -36,8 +36,6 @@ import org.apache.ignite.internal.processors.cache.eviction.fifo.FifoEvictionPol
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearOnlyNearEvictionPolicySelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.random.RandomEvictionPolicyCacheSizeSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.random.RandomEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicySelfTest;
 
 /**
@@ -56,8 +54,6 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(LruEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(LruNearEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(LruNearOnlyNearEvictionPolicySelfTest.class));
-        suite.addTest(new TestSuite(RandomEvictionPolicySelfTest.class));
-        suite.addTest(new TestSuite(RandomEvictionPolicyCacheSizeSelfTest.class));
         suite.addTest(new TestSuite(GridCacheNearEvictionSelfTest.class));
         suite.addTest(new TestSuite(GridCacheAtomicNearEvictionSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEvictionFilterSelfTest.class));


[32/49] ignite git commit: Rebalancing future hotfix. Correct finishing (with false) in case of unmarshalling problems.

Posted by nt...@apache.org.
Rebalancing future hotfix. Correct finishing (with false) in case of unmarshalling problems.


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

Branch: refs/heads/ignite-2435
Commit: e886b90310abbae5ade97cfeafc1d768e3a37d94
Parents: 54891f8
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Jan 29 14:35:09 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Jan 29 14:35:09 2016 +0300

----------------------------------------------------------------------
 .../distributed/dht/preloader/GridDhtPartitionDemander.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e886b903/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 9553656..9634b0b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -903,7 +903,9 @@ public class GridDhtPartitionDemander {
 
                 remaining.remove(nodeId);
 
-                checkIsDone();
+                onDone(false); // Finishing rebalance future a non completed.
+
+                checkIsDone(); // But will finish syncFuture only when other nodes are preloaded or rebalancing cancelled.
             }
 
         }


[31/49] ignite git commit: IGNITE-2498: Finalization (2).

Posted by nt...@apache.org.
IGNITE-2498: Finalization (2).


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

Branch: refs/heads/ignite-2435
Commit: 0dfb7a546db98a7111c87affe3b960ea846fd750
Parents: 9103b20
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 13:43:44 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 13:43:44 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheMapEntry.java   | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0dfb7a54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index b258c73..2d25d16 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -220,7 +220,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         }
         else {
             try {
-                if (isPeerClassLoadingEnabled()) {
+                if (cctx.deploymentEnabled()) {
                     Object val0 = null;
 
                     if (val != null && val.cacheObjectType() != CacheObject.TYPE_BYTE_ARR) {
@@ -571,7 +571,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             IgniteUuid valClsLdrId = null;
             IgniteUuid keyClsLdrId = null;
 
-            if (isPeerClassLoadingEnabled()) {
+            if (cctx.deploymentEnabled()) {
                 if (val != null) {
                     valClsLdrId = cctx.deploy().getClassLoaderId(
                         U.detectObjectClassLoader(val.value(cctx.cacheObjectContext(), false)));
@@ -598,13 +598,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /**
-     * @return {@code True} if peer class loading is enabled.
-     */
-    private boolean isPeerClassLoadingEnabled() {
-        return !cctx.binaryMarshaller() && cctx.kernalContext().config().isPeerClassLoadingEnabled();
-    }
-
-    /**
      * @return Value bytes and flag indicating whether value is byte array.
      */
     protected IgniteBiTuple<byte[], Byte> valueBytes0() {
@@ -4052,7 +4045,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                     IgniteUuid valClsLdrId = null;
                     IgniteUuid keyClsLdrId = null;
 
-                    if (isPeerClassLoadingEnabled()) {
+                    if (cctx.deploymentEnabled()) {
                         if (val != null) {
                             valClsLdrId = cctx.deploy().getClassLoaderId(
                                 U.detectObjectClassLoader(val.value(cctx.cacheObjectContext(), false)));


[21/49] ignite git commit: WIP on local benchmarks.

Posted by nt...@apache.org.
WIP on local benchmarks.


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

Branch: refs/heads/ignite-2435
Commit: 79db260fff45aae9fb30a322ce12e4091dbcd48b
Parents: 62d6ce7
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 28 16:46:09 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 16:46:09 2016 +0300

----------------------------------------------------------------------
 .../jmh/cache/JmhCachePutBenchmark.java         | 22 ++++++++++----------
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 14 +++++++++++++
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/79db260f/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
index 6421243..1bc24af 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
@@ -23,7 +23,6 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner;
 import org.apache.ignite.internal.benchmarks.model.IntValue;
 import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Threads;
 
 import java.util.concurrent.ThreadLocalRandom;
 
@@ -60,7 +59,6 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
      * @throws Exception If failed.
      */
     @Benchmark
-    @Threads(4)
     public void testPut() throws Exception {
         int key = ThreadLocalRandom.current().nextInt(CNT);
 
@@ -68,13 +66,13 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
     }
 
     /**
-     * Runner.
+     * Run benchmarks.
      *
      * @param args Arguments.
      * @throws Exception If failed.
      */
     public static void main(String[] args) throws Exception {
-        runAtomic(CacheAtomicityMode.ATOMIC);
+        run(CacheAtomicityMode.ATOMIC);
     }
 
     /**
@@ -83,11 +81,11 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
      * @param atomicityMode Atomicity mode.
      * @throws Exception If failed.
      */
-    private static void runAtomic(CacheAtomicityMode atomicityMode) throws Exception {
-        run(true, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
-        run(true, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
-        run(false, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
-        run(false, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
+    private static void run(CacheAtomicityMode atomicityMode) throws Exception {
+        run(4, true, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        run(4, true, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
+        run(4, false, atomicityMode, CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        run(4, false, atomicityMode, CacheWriteSynchronizationMode.FULL_SYNC);
     }
 
     /**
@@ -97,12 +95,14 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
      * @param writeSyncMode Write synchronization mode.
      * @throws Exception If failed.
      */
-    private static void run(boolean client, CacheAtomicityMode atomicityMode,
+    private static void run(int threads, boolean client, CacheAtomicityMode atomicityMode,
         CacheWriteSynchronizationMode writeSyncMode) throws Exception {
-        String output = "ignite-cache-put-" + (client ? "client" : "data") + "-" + atomicityMode + "-" + writeSyncMode;
+        String output = "ignite-cache-put-" + threads + "-threads-" + (client ? "client" : "data") +
+            "-" + atomicityMode + "-" + writeSyncMode;
 
         JmhIdeBenchmarkRunner.create()
             .forks(1)
+            .threads(threads)
             .warmupIterations(10)
             .measurementIterations(60)
             .classes(JmhCachePutBenchmark.class)

http://git-wip-us.apache.org/repos/asf/ignite/blob/79db260f/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
index a34cfb9..d92a879 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
@@ -51,6 +51,9 @@ public class JmhIdeBenchmarkRunner {
     /** Output. */
     private String output;
 
+    /** Amount of threads. */
+    private int threads;
+
     /**
      * Create new runner.
      *
@@ -147,6 +150,16 @@ public class JmhIdeBenchmarkRunner {
     }
 
     /**
+     * @param threads Threads.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner threads(int threads) {
+        this.threads = threads;
+
+        return this;
+    }
+
+    /**
      * Get prepared options builder.
      *
      * @return Options builder.
@@ -158,6 +171,7 @@ public class JmhIdeBenchmarkRunner {
         builder.warmupIterations(warmupIterations);
         builder.measurementIterations(measurementIterations);
         builder.timeUnit(outputTimeUnit);
+        builder.threads(threads);
 
         if (benchmarkModes != null) {
             for (Mode benchmarkMode : benchmarkModes)


[35/49] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main

Posted by nt...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main


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

Branch: refs/heads/ignite-2435
Commit: 8a8a8c17602505adb4234bdd440b2ae20ee9a25e
Parents: c2e5638 d2a107b
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jan 29 15:52:38 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jan 29 15:52:38 2016 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 modules/benchmarks/pom.xml                      |  32 +-
 .../benchmarks/jmh/JmhAbstractBenchmark.java    | 150 ++++++++++
 .../jmh/cache/JmhCacheAbstractBenchmark.java    | 181 ++++++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 124 ++++++++
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 -----------
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 232 +++++++++++++++
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++--
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../dht/preloader/GridDhtPartitionDemander.java |   4 +-
 .../near/GridNearTxFinishFuture.java            |  96 +++---
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 +++++++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../GridServicePackagePrivateSelfTest.java      |  17 +-
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 modules/docker/1.5.0.final/Dockerfile           |  40 +++
 modules/docker/1.5.0.final/run.sh               |  50 ++++
 modules/docker/Dockerfile                       |   6 +-
 41 files changed, 1343 insertions(+), 382 deletions(-)
----------------------------------------------------------------------



[09/49] ignite git commit: IGNITE-2332 - Support package-private implementations for services

Posted by nt...@apache.org.
IGNITE-2332 - Support package-private implementations for services


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

Branch: refs/heads/ignite-2435
Commit: 644b198c62b43ae084c5b6aedf02c98ee33c26de
Parents: bfae866
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Wed Jan 27 18:51:12 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Wed Jan 27 18:51:12 2016 -0800

----------------------------------------------------------------------
 .../processors/service/ServiceContextImpl.java  |  4 +-
 .../GridServicePackagePrivateSelfTest.java      | 46 ++++++++++++++++++++
 .../processors/service/inner/MyService.java     | 30 +++++++++++++
 .../service/inner/MyServiceFactory.java         | 30 +++++++++++++
 .../processors/service/inner/MyServiceImpl.java | 45 +++++++++++++++++++
 .../testsuites/IgniteKernalSelfTestSuite.java   |  4 +-
 6 files changed, 157 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceContextImpl.java
index b17beeb..6746e29 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceContextImpl.java
@@ -133,6 +133,8 @@ public class ServiceContextImpl implements ServiceContext {
         if (mtd == null) {
             try {
                 mtd = svc.getClass().getMethod(key.methodName(), key.argTypes());
+
+                mtd.setAccessible(true);
             }
             catch (NoSuchMethodException e) {
                 mtd = NULL_METHOD;
@@ -155,4 +157,4 @@ public class ServiceContextImpl implements ServiceContext {
     @Override public String toString() {
         return S.toString(ServiceContextImpl.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
new file mode 100644
index 0000000..430d366
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.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.internal.processors.service;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.internal.processors.service.inner.MyService;
+import org.apache.ignite.internal.processors.service.inner.MyServiceFactory;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ * Test for package-private service implementation.
+ */
+public class GridServicePackagePrivateSelfTest extends GridCommonAbstractTest {
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPackagePrivateService() throws Exception {
+        Ignite server = startGrid("server");
+
+        server.services().deployClusterSingleton("my-service", MyServiceFactory.create());
+
+        Ignition.setClientMode(true);
+
+        Ignite client = startGrid("client");
+
+        MyService svc = client.services().serviceProxy("my-service", MyService.class, true);
+
+        assertEquals(42, svc.hello());
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyService.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyService.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyService.java
new file mode 100644
index 0000000..b558207
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyService.java
@@ -0,0 +1,30 @@
+/*
+ * 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.service.inner;
+
+import org.apache.ignite.services.Service;
+
+/**
+ * Service.
+ */
+public interface MyService extends Service {
+    /**
+     * @return Some value.
+     */
+    int hello();
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceFactory.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceFactory.java
new file mode 100644
index 0000000..ace1c0b
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceFactory.java
@@ -0,0 +1,30 @@
+/*
+ * 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.service.inner;
+
+/**
+ * Service factory.
+ */
+public class MyServiceFactory {
+    /**
+     * @return Service.
+     */
+    public static MyService create() {
+        return new MyServiceImpl();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceImpl.java
new file mode 100644
index 0000000..cb2e0cf
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceImpl.java
@@ -0,0 +1,45 @@
+/*
+ * 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.service.inner;
+
+import org.apache.ignite.services.ServiceContext;
+
+/**
+ * Package-private service implementation.
+ */
+class MyServiceImpl implements MyService {
+    /** {@inheritDoc} */
+    @Override public int hello() {
+        return 42;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void cancel(ServiceContext ctx) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void init(ServiceContext ctx) throws Exception {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void execute(ServiceContext ctx) throws Exception {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644b198c/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 7197eb8..d9e9b0f 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
@@ -47,6 +47,7 @@ import org.apache.ignite.internal.managers.events.GridEventStorageManagerSelfTes
 import org.apache.ignite.internal.managers.swapspace.GridSwapSpaceManagerSelfTest;
 import org.apache.ignite.internal.processors.port.GridPortProcessorSelfTest;
 import org.apache.ignite.internal.processors.service.GridServiceClientNodeTest;
+import org.apache.ignite.internal.processors.service.GridServicePackagePrivateSelfTest;
 import org.apache.ignite.internal.processors.service.GridServiceProcessorMultiNodeConfigSelfTest;
 import org.apache.ignite.internal.processors.service.GridServiceProcessorMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.service.GridServiceProcessorProxySelfTest;
@@ -121,7 +122,8 @@ public class IgniteKernalSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridServiceClientNodeTest.class);
         suite.addTestSuite(GridServiceProcessorStopSelfTest.class);
         suite.addTestSuite(ServicePredicateAccessCacheTest.class);
+        suite.addTestSuite(GridServicePackagePrivateSelfTest.class);
 
         return suite;
     }
-}
\ No newline at end of file
+}


[42/49] ignite git commit: Fixed conflict resolver API.

Posted by nt...@apache.org.
Fixed conflict resolver API.


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

Branch: refs/heads/ignite-2435
Commit: 4e61602eca679bf3689bb23f2bc1c9e58b4eb8dc
Parents: 1945b98
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jan 25 19:16:47 2016 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Mon Feb 1 07:43:59 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheOperationContext.java |  43 +++++--
 .../processors/cache/GridCacheAdapter.java      |   8 +-
 .../processors/cache/GridCacheProxyImpl.java    |  11 +-
 .../processors/cache/IgniteCacheProxy.java      |  43 ++++++-
 .../dht/atomic/GridDhtAtomicCache.java          | 104 +++++++++++++----
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   4 +-
 .../processors/cache/dr/GridCacheDrInfo.java    |  49 +++++++-
 .../transactions/IgniteTxLocalAdapter.java      |  81 +++++++++-----
 .../cache/version/GridCacheVersionManager.java  |  23 ++--
 .../testframework/junits/GridAbstractTest.java  |   3 +
 parent/pom.xml                                  | 111 +++++++++++--------
 pom.xml                                         |  16 ---
 12 files changed, 351 insertions(+), 145 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
index 21934d0..f39a09d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
@@ -48,6 +48,9 @@ public class CacheOperationContext implements Serializable {
     /** Expiry policy. */
     private final ExpiryPolicy expiryPlc;
 
+    /** Data center Id. */
+    private final Byte dataCenterId;
+
     /**
      * Constructor with default values.
      */
@@ -61,6 +64,8 @@ public class CacheOperationContext implements Serializable {
         expiryPlc = null;
 
         noRetries = false;
+
+        dataCenterId = null;
     }
 
     /**
@@ -68,13 +73,15 @@ public class CacheOperationContext implements Serializable {
      * @param subjId Subject ID.
      * @param keepBinary Keep binary flag.
      * @param expiryPlc Expiry policy.
+     * @param dataCenterId Data center id.
      */
     public CacheOperationContext(
         boolean skipStore,
         @Nullable UUID subjId,
         boolean keepBinary,
         @Nullable ExpiryPolicy expiryPlc,
-        boolean noRetries) {
+        boolean noRetries,
+        @Nullable Byte dataCenterId) {
         this.skipStore = skipStore;
 
         this.subjId = subjId;
@@ -84,6 +91,8 @@ public class CacheOperationContext implements Serializable {
         this.expiryPlc = expiryPlc;
 
         this.noRetries = noRetries;
+
+        this.dataCenterId = dataCenterId;
     }
 
     /**
@@ -94,6 +103,13 @@ public class CacheOperationContext implements Serializable {
     }
 
     /**
+     * @return {@code True} if data center id is set otherwise {@code false}.
+     */
+    public boolean hasDataCenterId() {
+        return dataCenterId != null;
+    }
+
+    /**
      * See {@link IgniteInternalCache#keepBinary()}.
      *
      * @return New instance of CacheOperationContext with keep binary flag.
@@ -104,7 +120,8 @@ public class CacheOperationContext implements Serializable {
             subjId,
             true,
             expiryPlc,
-            noRetries);
+            noRetries,
+            dataCenterId);
     }
 
     /**
@@ -117,6 +134,15 @@ public class CacheOperationContext implements Serializable {
     }
 
     /**
+     * Gets data center ID.
+     *
+     * @return Client ID.
+     */
+    @Nullable public Byte dataCenterId() {
+        return dataCenterId;
+    }
+
+    /**
      * See {@link IgniteInternalCache#forSubjectId(UUID)}.
      *
      * @param subjId Subject id.
@@ -128,7 +154,8 @@ public class CacheOperationContext implements Serializable {
             subjId,
             keepBinary,
             expiryPlc,
-            noRetries);
+            noRetries,
+            dataCenterId);
     }
 
     /**
@@ -150,7 +177,8 @@ public class CacheOperationContext implements Serializable {
             subjId,
             keepBinary,
             expiryPlc,
-            noRetries);
+            noRetries,
+            dataCenterId);
     }
 
     /**
@@ -172,7 +200,8 @@ public class CacheOperationContext implements Serializable {
             subjId,
             true,
             plc,
-            noRetries);
+            noRetries,
+            dataCenterId);
     }
 
     /**
@@ -185,8 +214,8 @@ public class CacheOperationContext implements Serializable {
             subjId,
             keepBinary,
             expiryPlc,
-            noRetries
-        );
+            noRetries,
+            dataCenterId);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 3081cfb..9fd65e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -447,7 +447,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
     /** {@inheritDoc} */
     @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) {
-        CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null, false);
+        CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null, false, null);
 
         return new GridCacheProxyImpl<>(ctx, this, opCtx);
     }
@@ -459,14 +459,14 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
     /** {@inheritDoc} */
     @Override public GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) {
-        CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null, false);
+        CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null, false, null);
 
         return new GridCacheProxyImpl<>(ctx, this, opCtx);
     }
 
     /** {@inheritDoc} */
     @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() {
-        CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null, false);
+        CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null, false, null);
 
         return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)this, opCtx);
     }
@@ -483,7 +483,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         assert !CU.isAtomicsCache(ctx.name());
         assert !CU.isMarshallerCache(ctx.name());
 
-        CacheOperationContext opCtx = new CacheOperationContext(false, null, false, plc, false);
+        CacheOperationContext opCtx = new CacheOperationContext(false, null, false, plc, false, null);
 
         return new GridCacheProxyImpl<>(ctx, this, opCtx);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 8ffd273..3a53942 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -209,7 +209,8 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
     /** {@inheritDoc} */
     @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) {
         return new GridCacheProxyImpl<>(ctx, delegate,
-            opCtx != null ? opCtx.forSubjectId(subjId) : new CacheOperationContext(false, subjId, false, null, false));
+            opCtx != null ? opCtx.forSubjectId(subjId) :
+                new CacheOperationContext(false, subjId, false, null, false, null));
     }
 
     /** {@inheritDoc} */
@@ -221,7 +222,8 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
                 return this;
 
             return new GridCacheProxyImpl<>(ctx, delegate,
-                opCtx != null ? opCtx.setSkipStore(skipStore) : new CacheOperationContext(true, null, false, null, false));
+                opCtx != null ? opCtx.setSkipStore(skipStore) :
+                    new CacheOperationContext(true, null, false, null, false, null));
         }
         finally {
             gate.leave(prev);
@@ -236,7 +238,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
 
         return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx,
             (GridCacheAdapter<K1, V1>)delegate,
-            opCtx != null ? opCtx.keepBinary() : new CacheOperationContext(false, null, true, null, false));
+            opCtx != null ? opCtx.keepBinary() : new CacheOperationContext(false, null, true, null, false, null));
     }
 
     /** {@inheritDoc} */
@@ -1608,7 +1610,8 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
 
         try {
             return new GridCacheProxyImpl<>(ctx, delegate,
-                opCtx != null ? opCtx.withExpiryPolicy(plc) : new CacheOperationContext(false, null, false, plc, false));
+                opCtx != null ? opCtx.withExpiryPolicy(plc) :
+                    new CacheOperationContext(false, null, false, plc, false, null));
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/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 b64c69c..9e66d4d 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
@@ -307,7 +307,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
         try {
             CacheOperationContext prj0 = opCtx != null ? opCtx.withExpiryPolicy(plc) :
-                new CacheOperationContext(false, null, false, plc, false);
+                new CacheOperationContext(false, null, false, plc, false, null);
 
             return new IgniteCacheProxy<>(ctx, delegate, prj0, isAsync(), lock);
         }
@@ -339,7 +339,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 return this;
 
             CacheOperationContext opCtx0 = opCtx != null ? opCtx.setNoRetries(true) :
-                new CacheOperationContext(false, null, false, null, true);
+                new CacheOperationContext(false, null, false, null, true, null);
 
             return new IgniteCacheProxy<>(ctx,
                 delegate,
@@ -1788,7 +1788,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     opCtx != null ? opCtx.subjectId() : null,
                     true,
                     opCtx != null ? opCtx.expiry() : null,
-                    opCtx != null && opCtx.noRetries());
+                    opCtx != null && opCtx.noRetries(),
+                    opCtx != null ? opCtx.dataCenterId() : null);
 
             return new IgniteCacheProxy<>((GridCacheContext<K1, V1>)ctx,
                 (GridCacheAdapter<K1, V1>)delegate,
@@ -1802,6 +1803,39 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
+     * @return Projection for data center id.
+     */
+    @SuppressWarnings("unchecked")
+    public IgniteCache<K, V> withDataCenterId(byte dataCenterId) {
+        CacheOperationContext prev = onEnter(gate, opCtx);
+
+        try {
+            Byte prevDataCenterId = opCtx != null ? opCtx.dataCenterId() : null;
+
+            if (prevDataCenterId != null && dataCenterId == prevDataCenterId)
+                return this;
+
+            CacheOperationContext opCtx0 =
+                new CacheOperationContext(
+                    opCtx != null && opCtx.skipStore(),
+                    opCtx != null ? opCtx.subjectId() : null,
+                    opCtx != null && opCtx.isKeepBinary(),
+                    opCtx != null ? opCtx.expiry() : null,
+                    opCtx != null && opCtx.noRetries(),
+                    dataCenterId);
+
+            return new IgniteCacheProxy<>(ctx,
+                delegate,
+                opCtx0,
+                isAsync(),
+                lock);
+        }
+        finally {
+            onLeave(gate, prev);
+        }
+    }
+
+    /**
      * @return Cache with skip store enabled.
      */
     public IgniteCache<K, V> skipStore() {
@@ -1820,7 +1854,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     opCtx != null ? opCtx.subjectId() : null,
                     opCtx != null && opCtx.isKeepBinary(),
                     opCtx != null ? opCtx.expiry() : null,
-                    opCtx != null && opCtx.noRetries());
+                    opCtx != null && opCtx.noRetries(),
+                    opCtx != null ? opCtx.dataCenterId() : null);
 
             return new IgniteCacheProxy<>(ctx,
                 delegate,

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index aa79cfa..6b23550 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -77,7 +77,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSing
 import org.apache.ignite.internal.processors.cache.dr.GridCacheDrExpirationInfo;
 import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersionEx;
@@ -99,6 +98,7 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.plugin.security.SecurityPermission;
@@ -448,7 +448,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             true,
             false,
             filter,
-            true);
+            true,
+            UPDATE);
     }
 
     /** {@inheritDoc} */
@@ -464,7 +465,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             filter,
-            true);
+            true,
+            UPDATE);
     }
 
     /** {@inheritDoc} */
@@ -479,7 +481,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             true,
             false,
             ctx.noValArray(),
-            false).get();
+            false,
+            UPDATE).get();
     }
 
     /** {@inheritDoc} */
@@ -571,7 +574,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             true,
             true,
             ctx.equalsValArray(oldVal),
-            true);
+            true,
+            UPDATE);
     }
 
     /** {@inheritDoc} */
@@ -589,7 +593,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             CU.empty0(),
-            true).chain(RET2NULL);
+            true,
+            UPDATE).chain(RET2NULL);
     }
 
     /** {@inheritDoc} */
@@ -610,7 +615,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             null,
-            true);
+            true,
+            UPDATE);
     }
 
     /** {@inheritDoc} */
@@ -790,7 +796,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             null,
-            true);
+            true,
+            TRANSFORM);
 
         return fut.chain(new CX1<IgniteInternalFuture<Map<K, EntryProcessorResult<T>>>, EntryProcessorResult<T>>() {
             @Override public EntryProcessorResult<T> applyx(IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut)
@@ -846,7 +853,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             null,
-            true);
+            true,
+            TRANSFORM);
 
         return resFut.chain(new CX1<IgniteInternalFuture<Map<K, EntryProcessorResult<T>>>, Map<K, EntryProcessorResult<T>>>() {
             @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut) throws IgniteCheckedException {
@@ -882,7 +890,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             false,
             false,
             null,
-            true);
+            true,
+            TRANSFORM);
     }
 
     /**
@@ -901,15 +910,16 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
      */
     @SuppressWarnings("ConstantConditions")
     private IgniteInternalFuture updateAllAsync0(
-        @Nullable final Map<? extends K, ? extends V> map,
-        @Nullable final Map<? extends K, ? extends EntryProcessor> invokeMap,
+        @Nullable Map<? extends K, ? extends V> map,
+        @Nullable Map<? extends K, ? extends EntryProcessor> invokeMap,
         @Nullable Object[] invokeArgs,
-        @Nullable final Map<KeyCacheObject, GridCacheDrInfo> conflictPutMap,
-        @Nullable final Map<KeyCacheObject, GridCacheVersion> conflictRmvMap,
+        @Nullable Map<KeyCacheObject, GridCacheDrInfo> conflictPutMap,
+        @Nullable Map<KeyCacheObject, GridCacheVersion> conflictRmvMap,
         final boolean retval,
         final boolean rawRetval,
         @Nullable final CacheEntryPredicate[] filter,
-        final boolean waitTopFut
+        final boolean waitTopFut,
+        final GridCacheOperation op
     ) {
         assert ctx.updatesAllowed();
 
@@ -918,7 +928,47 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
         ctx.checkSecurity(SecurityPermission.CACHE_PUT);
 
-        CacheOperationContext opCtx = ctx.operationContextPerCall();
+        final CacheOperationContext opCtx = ctx.operationContextPerCall();
+
+        if (opCtx != null && opCtx.hasDataCenterId()) {
+            assert conflictPutMap == null : conflictPutMap;
+            assert conflictRmvMap == null : conflictRmvMap;
+
+            if (op == GridCacheOperation.TRANSFORM) {
+                assert invokeMap != null : invokeMap;
+
+                conflictPutMap = F.viewReadOnly((Map)invokeMap,
+                    new IgniteClosure<EntryProcessor, GridCacheDrInfo>() {
+                        @Override public GridCacheDrInfo apply(EntryProcessor o) {
+                            return new GridCacheDrInfo(o, ctx.versions().next(opCtx.dataCenterId()));
+                        }
+                    });
+
+                invokeMap = null;
+            }
+            else if (op == GridCacheOperation.DELETE) {
+                assert map != null : map;
+
+                conflictRmvMap = F.viewReadOnly((Map)map, new IgniteClosure<V, GridCacheVersion>() {
+                    @Override public GridCacheVersion apply(V o) {
+                        return ctx.versions().next(opCtx.dataCenterId());
+                    }
+                });
+
+                map = null;
+            }
+            else {
+                assert map != null : map;
+
+                conflictPutMap = F.viewReadOnly((Map)map, new IgniteClosure<V, GridCacheDrInfo>() {
+                    @Override public GridCacheDrInfo apply(V o) {
+                        return new GridCacheDrInfo(ctx.toCacheObject(o), ctx.versions().next(opCtx.dataCenterId()));
+                    }
+                });
+
+                map = null;
+            }
+        }
 
         UUID subjId = ctx.subjectIdPerCall(null, opCtx);
 
@@ -928,7 +978,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             ctx,
             this,
             ctx.config().getWriteSynchronizationMode(),
-            invokeMap != null ? TRANSFORM : UPDATE,
+            op,
             map != null ? map.keySet() : invokeMap != null ? invokeMap.keySet() : conflictPutMap != null ?
                 conflictPutMap.keySet() : conflictRmvMap.keySet(),
             map != null ? map.values() : invokeMap != null ? invokeMap.values() : null,
@@ -966,8 +1016,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
      * @return Completion future.
      */
     private IgniteInternalFuture removeAllAsync0(
-        @Nullable final Collection<? extends K> keys,
-        @Nullable final Map<KeyCacheObject, GridCacheVersion> conflictMap,
+        @Nullable Collection<? extends K> keys,
+        @Nullable Map<KeyCacheObject, GridCacheVersion> conflictMap,
         final boolean retval,
         boolean rawRetval,
         @Nullable final CacheEntryPredicate[] filter
@@ -985,12 +1035,24 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
         ctx.checkSecurity(SecurityPermission.CACHE_REMOVE);
 
-        CacheOperationContext opCtx = ctx.operationContextPerCall();
+        final CacheOperationContext opCtx = ctx.operationContextPerCall();
 
         UUID subjId = ctx.subjectIdPerCall(null, opCtx);
 
         int taskNameHash = ctx.kernalContext().job().currentTaskNameHash();
 
+        Collection<GridCacheVersion> drVers = null;
+
+        if (opCtx != null && keys != null && opCtx.hasDataCenterId()) {
+            assert conflictMap == null : conflictMap;
+
+            drVers = F.transform(keys, new C1<K, GridCacheVersion>() {
+                @Override public GridCacheVersion apply(K k) {
+                    return ctx.versions().next(opCtx.dataCenterId());
+                }
+            });
+        }
+
         final GridNearAtomicUpdateFuture updateFut = new GridNearAtomicUpdateFuture(
             ctx,
             this,
@@ -1000,7 +1062,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             null,
             null,
             null,
-            keys != null ? null : conflictMap.values(),
+            drVers != null ? drVers : (keys != null ? null : conflictMap.values()),
             retval,
             rawRetval,
             (filter != null && opCtx != null) ? opCtx.expiry() : null,

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 3c86083..c9e1a11 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -1034,7 +1034,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 else if (conflictPutVals != null) {
                     GridCacheDrInfo conflictPutVal = conflictPutValsIt.next();
 
-                    val = conflictPutVal.value();
+                    val = conflictPutVal.valueEx();
                     conflictVer = conflictPutVal.version();
                     conflictTtl =  conflictPutVal.ttl();
                     conflictExpireTime = conflictPutVal.expireTime();
@@ -1142,7 +1142,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 // Conflict PUT.
                 GridCacheDrInfo conflictPutVal = F.first(conflictPutVals);
 
-                val = conflictPutVal.value();
+                val = conflictPutVal.valueEx();
                 conflictVer = conflictPutVal.version();
                 conflictTtl = conflictPutVal.ttl();
                 conflictExpireTime = conflictPutVal.expireTime();

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrInfo.java
index 8635fe2..02bc6b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrInfo.java
@@ -21,6 +21,7 @@ import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -36,6 +37,9 @@ public class GridCacheDrInfo implements Externalizable {
     /** Value. */
     private CacheObject val;
 
+    /** Entry processor. */
+    private EntryProcessor proc;
+
     /** DR version. */
     private GridCacheVersion ver;
 
@@ -61,6 +65,29 @@ public class GridCacheDrInfo implements Externalizable {
     }
 
     /**
+     * Constructor.
+     *
+     * @param ver Version.
+     */
+    public GridCacheDrInfo(GridCacheVersion ver) {
+        this.ver = ver;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param proc Entry processor.
+     * @param ver Version.
+     */
+    public GridCacheDrInfo(EntryProcessor proc, GridCacheVersion ver) {
+        assert proc != null;
+        assert ver != null;
+
+        this.proc = proc;
+        this.ver = ver;
+    }
+
+    /**
      * @return Value.
      */
     public CacheObject value() {
@@ -68,6 +95,20 @@ public class GridCacheDrInfo implements Externalizable {
     }
 
     /**
+     * @return Entry processor.
+     */
+    public EntryProcessor entryProcessor() {
+        return proc;
+    }
+
+    /**
+     * @return Value (entry processor or cache object.
+     */
+    public Object valueEx() {
+        return val == null ? proc : val;
+    }
+
+    /**
      * @return Version.
      */
     public GridCacheVersion version() {
@@ -88,13 +129,13 @@ public class GridCacheDrInfo implements Externalizable {
         return CU.EXPIRE_TIME_ETERNAL;
     }
 
-    @Override
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         assert false;
     }
 
-    @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
         assert false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/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 926eaf2..aad9841 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
@@ -1977,8 +1977,14 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
         GridCacheContext cacheCtx,
         Map<KeyCacheObject, GridCacheDrInfo> drMap
     ) {
+        Map<KeyCacheObject, Object> map = F.viewReadOnly(drMap, new IgniteClosure<GridCacheDrInfo, Object>() {
+            @Override public Object apply(GridCacheDrInfo val) {
+                return val.value();
+            }
+        });
+
         return this.<Object, Object>putAllAsync0(cacheCtx,
-            null,
+            map,
             null,
             null,
             drMap,
@@ -2055,7 +2061,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
         final GridCacheReturn ret,
         boolean skipStore,
         final boolean singleRmv,
-        boolean keepBinary) {
+        boolean keepBinary,
+        Byte dataCenterId) {
         try {
             addActiveCache(cacheCtx);
 
@@ -2066,6 +2073,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
             if (entryProcessor != null)
                 transform = true;
 
+            GridCacheVersion drVer = dataCenterId != null ? cctx.versions().next(dataCenterId) : null;
+
             boolean loadMissed = enlistWriteEntry(cacheCtx,
                 cacheKey,
                 val,
@@ -2075,7 +2084,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
                 retval,
                 lockOnly,
                 filter,
-                /*drVer*/null,
+                /*drVer*/drVer,
                 /*drTtl*/-1L,
                 /*drExpireTime*/-1L,
                 ret,
@@ -2125,6 +2134,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
      * @param drRmvMap DR remove map (optional).
      * @param skipStore Skip store flag.
      * @param singleRmv {@code True} for single key remove operation ({@link Cache#remove(Object)}.
+     * @param keepBinary Keep binary flag.
+     * @param dataCenterId Optional data center ID.
      * @return Future for missing values loading.
      */
     private <K, V> IgniteInternalFuture<Void> enlistWrite(
@@ -2143,7 +2154,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
         @Nullable Map<KeyCacheObject, GridCacheVersion> drRmvMap,
         boolean skipStore,
         final boolean singleRmv,
-        final boolean keepBinary
+        final boolean keepBinary,
+        Byte dataCenterId
     ) {
         assert retval || invokeMap == null;
 
@@ -2197,6 +2209,11 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
                     drTtl = -1L;
                     drExpireTime = -1L;
                 }
+                else if (dataCenterId != null) {
+                    drVer = cctx.versions().next(dataCenterId);
+                    drTtl = -1L;
+                    drExpireTime = -1L;
+                }
                 else {
                     drVer = null;
                     drTtl = -1L;
@@ -2938,6 +2955,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
 
             CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
 
+            final Byte dataCenterId = opCtx != null ? opCtx.dataCenterId() : null;
+
             KeyCacheObject cacheKey = cacheCtx.toCacheKeyObject(key);
 
             boolean keepBinary = opCtx != null && opCtx.isKeepBinary();
@@ -2955,7 +2974,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
                 ret,
                 opCtx != null && opCtx.skipStore(),
                 /*singleRmv*/false,
-                keepBinary);
+                keepBinary,
+                dataCenterId);
 
             if (pessimistic()) {
                 assert loadFut == null || loadFut.isDone() : loadFut;
@@ -3053,7 +3073,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
         @Nullable Map<? extends K, ? extends V> map,
         @Nullable Map<? extends K, ? extends EntryProcessor<K, V, Object>> invokeMap,
         @Nullable final Object[] invokeArgs,
-        @Nullable final Map<KeyCacheObject, GridCacheDrInfo> drMap,
+        @Nullable Map<KeyCacheObject, GridCacheDrInfo> drMap,
         final boolean retval,
         @Nullable final CacheEntryPredicate[] filter
     ) {
@@ -3066,25 +3086,22 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
             return new GridFinishedFuture(e);
         }
 
-        // Cached entry may be passed only from entry wrapper.
-        final Map<?, ?> map0;
-        final Map<?, EntryProcessor<K, V, Object>> invokeMap0;
+        final CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
 
-        if (drMap != null) {
-            assert map == null;
+        final Byte dataCenterId;
 
-            map0 = F.viewReadOnly(drMap, new IgniteClosure<GridCacheDrInfo, Object>() {
-                @Override public Object apply(GridCacheDrInfo val) {
-                    return val.value();
-                }
-            });
+        if (opCtx != null && opCtx.hasDataCenterId()) {
+            assert drMap == null : drMap;
+            assert map != null || invokeMap != null;
 
-            invokeMap0 = null;
-        }
-        else {
-            map0 = map;
-            invokeMap0 = (Map<K, EntryProcessor<K, V, Object>>)invokeMap;
+            dataCenterId = opCtx.dataCenterId();
         }
+        else
+            dataCenterId = null;
+
+        // Cached entry may be passed only from entry wrapper.
+        final Map<?, ?> map0 = map;
+        final Map<?, EntryProcessor<K, V, Object>> invokeMap0 = (Map<K, EntryProcessor<K, V, Object>>)invokeMap;
 
         if (log.isDebugEnabled())
             log.debug("Called putAllAsync(...) [tx=" + this + ", map=" + map0 + ", retval=" + retval + "]");
@@ -3110,8 +3127,6 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
 
             final Collection<KeyCacheObject> enlisted = new ArrayList<>(keySet.size());
 
-            CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
-
             final boolean keepBinary = opCtx != null && opCtx.isKeepBinary();
 
             final IgniteInternalFuture<Void> loadFut = enlistWrite(
@@ -3130,7 +3145,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
                 null,
                 opCtx != null && opCtx.skipStore(),
                 false,
-                keepBinary);
+                keepBinary,
+                dataCenterId);
 
             if (pessimistic()) {
                 assert loadFut == null || loadFut.isDone() : loadFut;
@@ -3334,6 +3350,18 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
         else
             keys0 = keys;
 
+        CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
+
+        final Byte dataCenterId;
+
+        if (opCtx != null && opCtx.hasDataCenterId()) {
+            assert drMap == null : drMap;
+
+            dataCenterId = opCtx.dataCenterId();
+        }
+        else
+            dataCenterId = null;
+
         assert keys0 != null;
 
         if (log.isDebugEnabled()) {
@@ -3367,8 +3395,6 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
 
         final Collection<KeyCacheObject> enlisted = new ArrayList<>();
 
-        CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
-
         ExpiryPolicy plc;
 
         if (!F.isEmpty(filter))
@@ -3394,7 +3420,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
             drMap,
             opCtx != null && opCtx.skipStore(),
             singleRmv,
-            keepBinary
+            keepBinary,
+            dataCenterId
         );
 
         if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionManager.java
index 68d03cd..166c713 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionManager.java
@@ -176,7 +176,15 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version based on current topology.
      */
     public GridCacheVersion next() {
-        return next(cctx.kernalContext().discovery().topologyVersion(), true, false);
+        return next(cctx.kernalContext().discovery().topologyVersion(), true, false, dataCenterId);
+    }
+
+    /**
+     * @param dataCenterId Data center id.
+     * @return Next version based on current topology with given data center id.
+     */
+    public GridCacheVersion next(byte dataCenterId) {
+        return next(cctx.kernalContext().discovery().topologyVersion(), true, false, dataCenterId);
     }
 
     /**
@@ -188,7 +196,7 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version based on given topology version.
      */
     public GridCacheVersion next(AffinityTopologyVersion topVer) {
-        return next(topVer.topologyVersion(), true, false);
+        return next(topVer.topologyVersion(), true, false, dataCenterId);
     }
 
     /**
@@ -197,7 +205,7 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version for cache store operations.
      */
     public GridCacheVersion nextForLoad() {
-        return next(cctx.kernalContext().discovery().topologyVersion(), true, true);
+        return next(cctx.kernalContext().discovery().topologyVersion(), true, true, dataCenterId);
     }
 
     /**
@@ -206,7 +214,7 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version for cache store operations.
      */
     public GridCacheVersion nextForLoad(AffinityTopologyVersion topVer) {
-        return next(topVer.topologyVersion(), true, true);
+        return next(topVer.topologyVersion(), true, true, dataCenterId);
     }
 
     /**
@@ -215,7 +223,7 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version for cache store operations.
      */
     public GridCacheVersion nextForLoad(GridCacheVersion ver) {
-        return next(ver.topologyVersion(), false, true);
+        return next(ver.topologyVersion(), false, true, dataCenterId);
     }
 
     /**
@@ -225,7 +233,7 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @return Next version based on given cache version.
      */
     public GridCacheVersion next(GridCacheVersion ver) {
-        return next(ver.topologyVersion(), false, false);
+        return next(ver.topologyVersion(), false, false, dataCenterId);
     }
 
     /**
@@ -237,9 +245,10 @@ public class GridCacheVersionManager extends GridCacheSharedManagerAdapter {
      * @param topVer Topology version for which new version should be obtained.
      * @param addTime If {@code true} then adds to the given topology version number of seconds
      *        from the start time of the first grid node.
+     * @param dataCenterId Data center id.
      * @return New lock order.
      */
-    private GridCacheVersion next(long topVer, boolean addTime, boolean forLoad) {
+    private GridCacheVersion next(long topVer, boolean addTime, boolean forLoad, byte dataCenterId) {
         if (topVer == -1)
             topVer = cctx.kernalContext().discovery().topologyVersion();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 99d1a42..8bf877a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -1026,6 +1026,9 @@ public abstract class GridAbstractTest extends TestCase {
     protected IgniteConfiguration loadConfiguration(String springCfgPath) throws IgniteCheckedException {
         URL cfgLocation = U.resolveIgniteUrl(springCfgPath);
 
+        if (cfgLocation == null)
+            cfgLocation = U.resolveIgniteUrl(springCfgPath, false);
+
         assert cfgLocation != null;
 
         ApplicationContext springCtx;

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 21d8c69..c0f49c8 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -214,13 +214,6 @@
             <version>4.11</version>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-apache-license-gen</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope><!-- hack to have ignite-apache-license-gen at first place at mvn reactor -->
-        </dependency>
     </dependencies>
 
     <build>
@@ -715,48 +708,6 @@
                     </execution>
                 </executions>
             </plugin>
-
-            <plugin><!-- generates dependencies licenses -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-remote-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>ignite-dependencies</id>
-                        <goals>
-                            <goal>process</goal>
-                        </goals>
-                        <configuration>
-                            <resourceBundles>
-                                <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
-                            </resourceBundles>
-                            <excludeTransitive>true</excludeTransitive>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>licenses-file-rename</id>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <phase>compile</phase>
-                        <configuration>
-                            <target>
-                                <!-- moving licenses generated by "ignite-dependencies" -->
-                                <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
-                            </target>
-                            <failOnError>false</failOnError>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
         </plugins>
     </build>
 
@@ -998,5 +949,67 @@
                 </dependency>
             </dependencies>
         </profile>
+
+        <profile>
+            <id>release</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.ignite</groupId>
+                    <artifactId>ignite-apache-license-gen</artifactId>
+                    <version>${project.version}</version>
+                    <scope>test</scope><!-- hack to have ignite-apache-license-gen at first place at mvn reactor -->
+                </dependency>
+            </dependencies>
+
+            <build>
+                <plugins>
+                    <plugin><!-- generates dependencies licenses -->
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-remote-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>ignite-dependencies</id>
+                                <goals>
+                                    <goal>process</goal>
+                                </goals>
+                                <configuration>
+                                    <resourceBundles>
+                                        <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}
+                                        </resourceBundle>
+                                    </resourceBundles>
+                                    <excludeTransitive>true</excludeTransitive>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>licenses-file-rename</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <target>
+                                        <!-- moving licenses generated by "ignite-dependencies" -->
+                                        <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
+                                    </target>
+                                    <failOnError>false</failOnError>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/4e61602e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f797e8..bead3ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -918,22 +918,6 @@
                     </execution>
                 </executions>
             </plugin>
-
-            <plugin><!-- skipping generates dependencies licenses -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-remote-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>ignite-dependencies</id>
-                        <goals>
-                            <goal>process</goal>
-                        </goals>
-                        <configuration>
-                           <skip>true</skip>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>


[10/49] ignite git commit: JDBC driver authentication fixed

Posted by nt...@apache.org.
JDBC driver authentication fixed


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

Branch: refs/heads/ignite-2435
Commit: a4cf78a6207e5782d6a9b90f14a52955aca2c208
Parents: 644b198
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Wed Jan 27 18:52:00 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Wed Jan 27 18:52:00 2016 -0800

----------------------------------------------------------------------
 .../apache/ignite/internal/jdbc/JdbcConnection.java   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4cf78a6/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java
index a4be6f5..064a6f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java
@@ -44,6 +44,9 @@ import org.apache.ignite.internal.client.GridClientDisconnectedException;
 import org.apache.ignite.internal.client.GridClientException;
 import org.apache.ignite.internal.client.GridClientFactory;
 import org.apache.ignite.internal.client.GridClientFutureTimeoutException;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.plugin.security.SecurityCredentials;
+import org.apache.ignite.plugin.security.SecurityCredentialsBasicProvider;
 
 import static java.sql.ResultSet.CONCUR_READ_ONLY;
 import static java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT;
@@ -108,6 +111,15 @@ public class JdbcConnection implements Connection {
 
             cfg.setServers(Collections.singleton(props.getProperty(PROP_HOST) + ":" + props.getProperty(PROP_PORT)));
 
+            String user = props.getProperty("user");
+            String passwd = props.getProperty("password");
+
+            if (!F.isEmpty(user)) {
+                SecurityCredentials creds = new SecurityCredentials(user, passwd);
+
+                cfg.setSecurityCredentialsProvider(new SecurityCredentialsBasicProvider(creds));
+            }
+
             // Disable all fetching and caching for metadata.
             cfg.setEnableMetricsCache(false);
             cfg.setEnableAttributesCache(false);
@@ -575,4 +587,4 @@ public class JdbcConnection implements Connection {
     JdbcStatement createStatement0() throws SQLException {
         return (JdbcStatement)createStatement();
     }
-}
\ No newline at end of file
+}


[26/49] ignite git commit: WIP on local benchmarks: added profiler option.

Posted by nt...@apache.org.
WIP on local benchmarks: added profiler option.


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

Branch: refs/heads/ignite-2435
Commit: fb206c5bc0c8059cbcc8e503391cf0d8b8962c7d
Parents: 79db260
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 12:33:35 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 12:33:35 2016 +0300

----------------------------------------------------------------------
 modules/benchmarks/pom.xml                        |  2 +-
 .../jmh/cache/JmhCachePutBenchmark.java           |  2 ++
 .../jmh/runner/JmhIdeBenchmarkRunner.java         | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index e735491..7dbc66f 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -36,7 +36,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <jmh.version>1.11.1</jmh.version>
+        <jmh.version>1.11.3</jmh.version>
         <javac.target>1.6</javac.target>
         <uberjar.name>benchmarks</uberjar.name>
     </properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
index 1bc24af..848e7ce 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
@@ -23,6 +23,7 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner;
 import org.apache.ignite.internal.benchmarks.model.IntValue;
 import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.profile.GCProfiler;
 
 import java.util.concurrent.ThreadLocalRandom;
 
@@ -107,6 +108,7 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
             .measurementIterations(60)
             .classes(JmhCachePutBenchmark.class)
             .output(output + ".jmh.log")
+            .profilers(GCProfiler.class)
             .jvmArguments(
                 "-Xms4g",
                 "-Xmx4g",

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
index d92a879..af84862 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
@@ -54,6 +54,9 @@ public class JmhIdeBenchmarkRunner {
     /** Amount of threads. */
     private int threads;
 
+    /** Profilers. */
+    private Class[] profilers;
+
     /**
      * Create new runner.
      *
@@ -160,6 +163,16 @@ public class JmhIdeBenchmarkRunner {
     }
 
     /**
+     * @param profilers Profilers.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner profilers(Class... profilers) {
+        this.profilers = profilers;
+
+        return this;
+    }
+
+    /**
      * Get prepared options builder.
      *
      * @return Options builder.
@@ -189,6 +202,11 @@ public class JmhIdeBenchmarkRunner {
         if (output != null)
             builder.output(output);
 
+        if (profilers != null) {
+            for (Class profiler : profilers)
+                builder.addProfiler(profiler);
+        }
+
         return builder;
     }
 


[44/49] ignite git commit: TcpDiscoverySelfTest.testDiscoveryEventsDiscard fix

Posted by nt...@apache.org.
TcpDiscoverySelfTest.testDiscoveryEventsDiscard	fix


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

Branch: refs/heads/ignite-2435
Commit: 881d5a885fa169196dc4e91fa2da60f00a80474e
Parents: 5500a18
Author: Anton Vinogradov <av...@apache.org>
Authored: Mon Feb 1 13:38:22 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Mon Feb 1 13:38:22 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/881d5a88/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
index 4f329e1..2d5b2c5 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
@@ -72,6 +72,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMultic
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage;
 import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCustomEventMessage;
+import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryHeartbeatMessage;
 import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage;
 import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage;
 import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeFailedMessage;
@@ -1857,7 +1858,7 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
             long timeout) throws IOException, IgniteCheckedException {
             boolean add = msgIds.add(msg.id());
 
-            if (checkDuplicates && !add) {
+            if (checkDuplicates && !add && !(msg instanceof TcpDiscoveryHeartbeatMessage)) {
                 log.error("Send duplicated message: " + msg);
 
                 failed = true;


[27/49] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-2435
Commit: c081e3d50f2352502997b92511c50a1e92be122f
Parents: fb206c5 132b1ae
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 12:33:59 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 12:33:59 2016 +0300

----------------------------------------------------------------------
 .../GridServicePackagePrivateSelfTest.java      | 17 ++++---
 modules/docker/1.5.0.final/Dockerfile           | 40 ++++++++++++++++
 modules/docker/1.5.0.final/run.sh               | 50 ++++++++++++++++++++
 modules/docker/Dockerfile                       |  6 +--
 4 files changed, 104 insertions(+), 9 deletions(-)
----------------------------------------------------------------------



[23/49] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite

Posted by nt...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite


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

Branch: refs/heads/ignite-2435
Commit: 8823e46860c520abfc9b9c718df5c2d92f0c820f
Parents: 7a11154 79db260
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Thu Jan 28 16:09:36 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Thu Jan 28 16:09:36 2016 -0800

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 modules/benchmarks/pom.xml                      |  30 --
 .../benchmarks/jmh/JmhAbstractBenchmark.java    | 150 ++++++++
 .../jmh/cache/JmhCacheAbstractBenchmark.java    | 181 ++++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 122 +++++++
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 ---------
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 214 +++++++++++
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++--
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../near/GridNearTxFinishFuture.java            |  96 ++---
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 +++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 .../cpp/common/project/vs/common.vcxproj        |   2 +-
 .../Apache.Ignite.Benchmarks.csproj             |   4 +-
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   4 +-
 .../Apache.Ignite.Core.Tests.csproj             |   2 +-
 .../Apache.Ignite.Core.csproj                   |   8 +-
 .../Apache.Ignite.Core.ruleset                  |  26 ++
 .../Binary/BinaryConfiguration.cs               |   3 +
 .../Binary/BinaryTypeConfiguration.cs           |   5 +
 .../Binary/BinaryTypeNames.cs                   |  64 ++--
 .../Cache/CachePartialUpdateException.cs        |   3 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |  41 ++-
 .../Cache/Event/ICacheEntryEventFilter.cs       |   1 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   1 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |   2 +-
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |   2 +-
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |   6 +-
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |   7 +-
 .../Cache/Store/CacheStoreAdapter.cs            |   4 +
 .../Compute/ComputeJobAdapter.cs                |   2 +-
 .../Compute/ComputeJobResultPolicy.cs           |   2 -
 .../Compute/ComputeTaskAdapter.cs               |   3 +
 .../Compute/ComputeTaskSplitAdapter.cs          |  18 +-
 .../Datastream/StreamTransformer.cs             |   2 +
 .../Datastream/StreamVisitor.cs                 |   2 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |   8 +-
 .../Events/CacheQueryExecutedEvent.cs           |   4 +-
 .../Events/CacheQueryReadEvent.cs               |   6 +-
 .../Events/CacheRebalancingEvent.cs             |   4 +-
 .../Events/CheckpointEvent.cs                   |   4 +-
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   4 +-
 .../Apache.Ignite.Core/Events/EventBase.cs      |  70 +++-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   3 +-
 .../Apache.Ignite.Core/Impl/Binary/Binary.cs    |  47 +--
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   2 +-
 .../Impl/Binary/BinaryObject.cs                 |  44 ++-
 .../Impl/Binary/BinaryObjectBuilder.cs          |  75 ++--
 .../Impl/Binary/BinaryReader.cs                 |   1 +
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |   2 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   9 +-
 .../Impl/Binary/BinaryUtils.cs                  |   7 +-
 .../Impl/Binary/BinaryWriter.cs                 |   3 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |   9 +
 .../Impl/Binary/Marshaller.cs                   |  19 +-
 .../Impl/Binary/Metadata/BinaryType.cs          |   2 +
 .../Impl/Binary/SerializableObjectHolder.cs     |  13 +-
 .../Impl/Binary/Structure/BinaryStructure.cs    |   3 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  42 ++-
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |   4 +-
 .../Continuous/ContinuousQueryFilterHolder.cs   |   2 +-
 .../Continuous/ContinuousQueryHandleImpl.cs     |   4 +-
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   2 +
 .../Impl/Cache/Query/QueryCursor.cs             |   2 +
 .../Impl/Common/CancelledTask.cs                |   3 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   1 +
 .../Impl/Common/DelegateConverter.cs            |  11 +-
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |   2 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   1 +
 .../Closure/ComputeAbstractClosureTask.cs       |   3 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   2 +
 .../Closure/ComputeReducingClosureTask.cs       |   2 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   2 +
 .../Impl/Datastream/DataStreamerBatch.cs        |   1 +
 .../Impl/Datastream/DataStreamerImpl.cs         |   5 +-
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  56 +--
 .../Impl/Handle/HandleRegistry.cs               |   1 +
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  11 +-
 .../Impl/InteropExceptionHolder.cs              |  11 +-
 .../Memory/PlatformBigEndianMemoryStream.cs     |   8 +
 .../Impl/Memory/PlatformMemory.cs               |   2 +
 .../Impl/Memory/PlatformMemoryManager.cs        |   2 +
 .../Impl/Memory/PlatformMemoryStream.cs         |   2 +
 .../Impl/Memory/PlatformRawMemory.cs            |   2 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   3 +-
 .../Impl/Resource/ResourceProcessor.cs          |   2 +-
 .../Impl/Resource/ResourceTypeDescriptor.cs     |   2 +-
 .../Impl/Services/ServiceProxy.cs               |   2 +
 .../Impl/Services/ServiceProxyInvoker.cs        |   1 +
 .../Impl/Transactions/TransactionsImpl.cs       |   2 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   5 +-
 .../Services/ServiceInvocationException.cs      |   2 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    | 354 +++----------------
 modules/platforms/dotnet/Apache.Ignite.sln      |   4 +-
 .../Apache.Ignite.sln.TeamCity.DotSettings      |  30 ++
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   5 +-
 .../Apache.Ignite.Examples.csproj               |   4 +-
 .../Apache.Ignite.ExamplesDll.csproj            |   4 +-
 parent/pom.xml                                  |   3 +-
 124 files changed, 1816 insertions(+), 932 deletions(-)
----------------------------------------------------------------------



[18/49] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-2435
Commit: 077f237714aa134bef44d185263621e385167fe7
Parents: f74e891 579d33a
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 28 13:31:19 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 13:31:19 2016 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++--
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../near/GridNearTxFinishFuture.java            |  96 +++---
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 +++++++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 30 files changed, 548 insertions(+), 171 deletions(-)
----------------------------------------------------------------------



[24/49] ignite git commit: Added docker file for version 1.5.0.final.

Posted by nt...@apache.org.
Added docker file for version 1.5.0.final.


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

Branch: refs/heads/ignite-2435
Commit: 132b1ae7c88382e45a12e91bd6f4b0be94b7d77c
Parents: 8823e46
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Fri Jan 29 10:36:03 2016 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Fri Jan 29 10:36:03 2016 +0300

----------------------------------------------------------------------
 modules/docker/1.5.0.final/Dockerfile | 40 ++++++++++++++++++++++++
 modules/docker/1.5.0.final/run.sh     | 50 ++++++++++++++++++++++++++++++
 modules/docker/Dockerfile             |  6 ++--
 3 files changed, 93 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/132b1ae7/modules/docker/1.5.0.final/Dockerfile
----------------------------------------------------------------------
diff --git a/modules/docker/1.5.0.final/Dockerfile b/modules/docker/1.5.0.final/Dockerfile
new file mode 100644
index 0000000..bdc7baf
--- /dev/null
+++ b/modules/docker/1.5.0.final/Dockerfile
@@ -0,0 +1,40 @@
+#
+# 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.
+#
+
+# Start from a Java image.
+FROM java:7
+
+# Ignite version
+ENV IGNITE_VERSION 1.5.0.final
+
+WORKDIR /opt/ignite
+
+ADD http://www.us.apache.org/dist/ignite/1.5.0.final/apache-ignite-fabric-1.5.0.final-bin.zip /opt/ignite/ignite.zip
+
+# Ignite home
+ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-1.5.0.final-bin
+
+RUN unzip ignite.zip
+
+RUN rm ignite.zip
+
+# Copy sh files and set permission
+ADD ./run.sh $IGNITE_HOME/
+
+RUN chmod +x $IGNITE_HOME/run.sh
+
+CMD $IGNITE_HOME/run.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/132b1ae7/modules/docker/1.5.0.final/run.sh
----------------------------------------------------------------------
diff --git a/modules/docker/1.5.0.final/run.sh b/modules/docker/1.5.0.final/run.sh
new file mode 100644
index 0000000..dbf2871
--- /dev/null
+++ b/modules/docker/1.5.0.final/run.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# 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.
+#
+
+if [ ! -z "$OPTION_LIBS" ]; then
+  IFS=, LIBS_LIST=("$OPTION_LIBS")
+
+  for lib in ${LIBS_LIST[@]}; do
+    cp -r $IGNITE_HOME/libs/optional/"$lib"/* \
+        $IGNITE_HOME/libs/
+  done
+fi
+
+if [ ! -z "$EXTERNAL_LIBS" ]; then
+  IFS=, LIBS_LIST=("$EXTERNAL_LIBS")
+
+  for lib in ${LIBS_LIST[@]}; do
+    echo $lib >> temp
+  done
+
+  wget -i temp -P $IGNITE_HOME/libs
+
+  rm temp
+fi
+
+QUIET=""
+
+if [ "$IGNITE_QUIET" = "false" ]; then
+  QUIET="-v"
+fi
+
+if [ -z $CONFIG_URI ]; then
+  $IGNITE_HOME/bin/ignite.sh $QUIET
+else
+  $IGNITE_HOME/bin/ignite.sh $QUIET $CONFIG_URI
+fi

http://git-wip-us.apache.org/repos/asf/ignite/blob/132b1ae7/modules/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/modules/docker/Dockerfile b/modules/docker/Dockerfile
index 11be2b4..bdc7baf 100644
--- a/modules/docker/Dockerfile
+++ b/modules/docker/Dockerfile
@@ -19,14 +19,14 @@
 FROM java:7
 
 # Ignite version
-ENV IGNITE_VERSION 1.5.0-b1
+ENV IGNITE_VERSION 1.5.0.final
 
 WORKDIR /opt/ignite
 
-ADD http://www.us.apache.org/dist/ignite/1.5.0-b1/apache-ignite-fabric-1.5.0-b1-bin.zip /opt/ignite/ignite.zip
+ADD http://www.us.apache.org/dist/ignite/1.5.0.final/apache-ignite-fabric-1.5.0.final-bin.zip /opt/ignite/ignite.zip
 
 # Ignite home
-ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-1.5.0-b1-bin
+ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-1.5.0.final-bin
 
 RUN unzip ignite.zip
 


[06/49] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main

Posted by nt...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into master-main


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

Branch: refs/heads/ignite-2435
Commit: 54891f8c97075534096352823d7f08a31587eb16
Parents: 795a245 da4da8b
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jan 27 13:26:11 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jan 27 13:26:11 2016 +0300

----------------------------------------------------------------------

----------------------------------------------------------------------



[03/49] ignite git commit: IGNITE-944: proper look up of a default log file name

Posted by nt...@apache.org.
IGNITE-944: proper look up of a default log file name


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

Branch: refs/heads/ignite-2435
Commit: 31eb38d72cd451f8499725a1019a837cc7a6fe0c
Parents: 4edc7bd
Author: Saikat Maitra <sa...@gmail.com>
Authored: Wed Jan 27 13:01:41 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jan 27 13:01:41 2016 +0300

----------------------------------------------------------------------
 modules/core/pom.xml                            |  3 -
 .../handlers/log/GridLogCommandHandler.java     | 16 ++----
 .../handlers/log/GridLogCommandHandlerTest.java | 58 +++++++++++++++++---
 3 files changed, 55 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/31eb38d7/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index bdf822b..b07a754 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -229,9 +229,6 @@
                     <exclude>**/*.java</exclude>
                 </excludes>
             </testResource>
-            <testResource>
-                <directory>src/test/resources</directory>
-            </testResource>
         </testResources>
 
         <plugins>

http://git-wip-us.apache.org/repos/asf/ignite/blob/31eb38d7/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java
index 4957993..603faf3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java
@@ -18,16 +18,11 @@ package org.apache.ignite.internal.processors.rest.handlers.log;
 
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileReader;
 import java.io.IOException;
-import java.net.URI;
-import java.nio.charset.Charset;
-import java.nio.file.Files;
 import java.nio.file.InvalidPathException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Collection;
+
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -51,11 +46,6 @@ public class GridLogCommandHandler extends GridRestCommandHandlerAdapter {
     private static final Collection<GridRestCommand> SUPPORTED_COMMANDS = U.sealList(LOG);
 
     /**
-     * Default log file name *
-     */
-    private static final String DEFAULT_LOG_PATH = "work/log/ignite.log";
-
-    /**
      * Default log file start line number *
      */
     private static final int DEFAULT_FROM = 0;
@@ -126,7 +116,9 @@ public class GridLogCommandHandler extends GridRestCommandHandlerAdapter {
                 if (req0.path() != null)
                     logFile = new File(req0.path());
                 else
-                    logFile = new File(ctx.config().getIgniteHome() + "/" + DEFAULT_LOG_PATH);
+                    logFile = new File(log.fileName() == null ?
+                        ctx.config().getIgniteHome() + "/" + "work/log/ignite.log" :
+                        log.fileName());
             }
             catch (InvalidPathException e) {
                 return new GridFinishedFuture<>(new GridRestResponse(GridRestResponse.STATUS_FAILED,

http://git-wip-us.apache.org/repos/asf/ignite/blob/31eb38d7/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java
index cc673fb..572b267 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java
@@ -16,7 +16,14 @@
  */
 package org.apache.ignite.internal.processors.rest.handlers.log;
 
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
 import java.util.Collection;
+import java.util.List;
+
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.rest.GridRestCommand;
 import org.apache.ignite.internal.processors.rest.GridRestResponse;
@@ -28,6 +35,45 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
  * REST log command handler tests.
  */
 public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
+    /** */
+    private String igniteHome = System.getProperty("user.dir");
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        List<String> lines = Arrays.asList("[22:01:30,329][INFO ][grid-load-test-thread-12][GridDeploymentLocalStore] ",
+            "[22:01:30,329][INFO ][grid-load-test-thread-18][GridDeploymentLocalStore] Removed undeployed class: \n",
+            "[22:01:30,329][INFO ][grid-load-test-thread-18][GridDeploymentLocalStore] Task locally undeployed: \n"
+        );
+
+        Path file = Paths.get("test.log");
+        Files.write(file, lines, Charset.forName("UTF-8"));
+
+        lines = Arrays.asList("[22:01:30,329][INFO ][grid-load-test-thread-12][GridDeploymentLocalStore] ",
+            "[22:01:30,329][INFO ][grid-load-test-thread-18][GridDeploymentLocalStore] Removed undeployed class: \n",
+            "[22:01:30,329][INFO ][grid-load-test-thread-18][GridDeploymentLocalStore] Task locally undeployed: \n"
+        );
+
+        Path dir = Paths.get(igniteHome + "/work/log");
+        Files.createDirectories(dir);
+
+        file = Paths.get(igniteHome + "/work/log/" + "ignite.log");
+        Files.write(file, lines, Charset.forName("UTF-8"));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        Path file = Paths.get("test.log");
+        Files.delete(file);
+
+        Files.delete(Paths.get(igniteHome + "/work/log/" + "ignite.log"));
+        Files.delete(Paths.get(igniteHome + "/work/log/"));
+        Files.delete(Paths.get(igniteHome + "/work/"));
+
+        super.afterTestsStopped();
+    }
+
     /**
      * @throws Exception If failed.
      */
@@ -62,8 +108,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
         req.to(5);
         req.from(2);
 
-        req.path(getClass().getResource("/test.log").getFile());
-
+        req.path("test.log");
         IgniteInternalFuture<GridRestResponse> resp = cmdHandler.handleAsync(req);
 
         assertNull(resp.result().getError());
@@ -78,7 +123,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
         GridLogCommandHandler cmdHandler = new GridLogCommandHandler(newContext());
         GridRestLogRequest req = new GridRestLogRequest();
 
-        req.path(getClass().getResource("/test.log").getFile());
+        req.path("test.log");
 
         IgniteInternalFuture<GridRestResponse> resp = cmdHandler.handleAsync(req);
 
@@ -92,7 +137,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
      */
     public void testHandleAsyncPathNotSet() throws Exception {
         GridTestKernalContext ctx = newContext();
-        ctx.config().setIgniteHome(getClass().getResource("/").getFile());
+        ctx.config().setIgniteHome(igniteHome);
 
         GridLogCommandHandler cmdHandler = new GridLogCommandHandler(ctx);
         GridRestLogRequest req = new GridRestLogRequest();
@@ -116,8 +161,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
 
         req.to(2);
         req.from(5);
-        req.path(getClass().getResource("/test.log").getFile());
-
+        req.path("test.log");
 
         IgniteInternalFuture<GridRestResponse> resp = cmdHandler.handleAsync(req);
 
@@ -135,7 +179,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest {
 
         req.to(2);
         req.from(2);
-        req.path(getClass().getResource("/test.log").getFile());
+        req.path("test.log");
 
         IgniteInternalFuture<GridRestResponse> resp = cmdHandler.handleAsync(req);
 


[40/49] ignite git commit: IGNITE-1069 Added output of node type (server or client) in Visor commandline top command - Fixes #440.

Posted by nt...@apache.org.
IGNITE-1069 Added output of node type (server or client) in Visor commandline top command - Fixes #440.

Signed-off-by: Alexey Kuznetsov <ak...@apache.org>


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

Branch: refs/heads/ignite-2435
Commit: 59691291b55265e561ee5b707da8d95d2eee79db
Parents: 304370c
Author: kcheng <kc...@gmail.com>
Authored: Mon Feb 1 10:48:49 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Feb 1 10:48:49 2016 +0700

----------------------------------------------------------------------
 .../apache/ignite/visor/commands/top/VisorTopologyCommand.scala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/59691291/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
index 5e278ed..d2ec662 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
@@ -263,12 +263,13 @@ class VisorTopologyCommand extends VisorConsoleCommand {
 
         val hostsT = VisorTextTable()
 
-        hostsT #= ("Int./Ext. IPs", "Node ID8(@)", "OS", "CPUs", "MACs", "CPU Load")
+        hostsT #= ("Int./Ext. IPs", "Node ID8(@)","Node Type", "OS", "CPUs", "MACs", "CPU Load")
 
         neighborhood.foreach {
             case (_, neighbors) =>
                 var ips = Set.empty[String]
                 var id8s = List.empty[String]
+                var nodeTypes = List.empty[String]
                 var macs = Set.empty[String]
                 var cpuLoadSum = 0.0
 
@@ -287,6 +288,7 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 neighbors.foreach(n => {
                     id8s = id8s :+ (i.toString + ": " + nodeId8(n.id))
 
+                    nodeTypes = nodeTypes :+ (if (n.isClient) "Client" else "Server")
                     i += 1
 
                     ips = ips ++ n.addresses()
@@ -300,6 +302,7 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 hostsT += (
                     ips.toSeq,
                     id8s,
+                    nodeTypes,
                     os,
                     cpus,
                     macs.toSeq,


[13/49] ignite git commit: IGNITE-2324: .NET: Added static code analysis rules and suppressed warnings accordingly.

Posted by nt...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index dbb58c8..f55863e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -1000,36 +1000,46 @@ namespace Apache.Ignite.Core.Impl.Cache
         /// <summary>
         /// QueryContinuous implementation.
         /// </summary>
-        private IContinuousQueryHandle<ICacheEntry<TK, TV>> QueryContinuousImpl(ContinuousQuery<TK, TV> qry, 
+        private IContinuousQueryHandle<ICacheEntry<TK, TV>> QueryContinuousImpl(ContinuousQuery<TK, TV> qry,
             QueryBase initialQry)
         {
             qry.Validate();
 
             var hnd = new ContinuousQueryHandleImpl<TK, TV>(qry, Marshaller, _flagKeepBinary);
 
-            using (var stream = IgniteManager.Memory.Allocate().GetStream())
+            try
             {
-                var writer = Marshaller.StartMarshal(stream);
-
-                hnd.Start(_ignite, writer, () =>
+                using (var stream = IgniteManager.Memory.Allocate().GetStream())
                 {
-                    if (initialQry != null)
+                    var writer = Marshaller.StartMarshal(stream);
+
+                    hnd.Start(_ignite, writer, () =>
                     {
-                        writer.WriteInt((int) initialQry.OpId);
+                        if (initialQry != null)
+                        {
+                            writer.WriteInt((int) initialQry.OpId);
 
-                        initialQry.Write(writer, IsKeepBinary);
-                    }
-                    else
-                        writer.WriteInt(-1); // no initial query
+                            initialQry.Write(writer, IsKeepBinary);
+                        }
+                        else
+                            writer.WriteInt(-1); // no initial query
 
-                    FinishMarshal(writer);
+                        FinishMarshal(writer);
 
-                    // ReSharper disable once AccessToDisposedClosure
-                    return UU.CacheOutOpContinuousQuery(Target, (int)CacheOp.QryContinuous, stream.SynchronizeOutput());
-                }, qry);
+                        // ReSharper disable once AccessToDisposedClosure
+                        return UU.CacheOutOpContinuousQuery(Target, (int) CacheOp.QryContinuous,
+                            stream.SynchronizeOutput());
+                    }, qry);
+                }
+
+                return hnd;
             }
+            catch (Exception)
+            {
+                hnd.Dispose();
 
-            return hnd;
+                throw;
+            }
         }
 
         #endregion

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/AbstractQueryCursor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/AbstractQueryCursor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/AbstractQueryCursor.cs
index 55eb459..a22b247 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/AbstractQueryCursor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/AbstractQueryCursor.cs
@@ -20,7 +20,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Query
     using System;
     using System.Collections;
     using System.Collections.Generic;
-    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cache.Query;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Binary.IO;
@@ -108,14 +107,13 @@ namespace Apache.Ignite.Core.Impl.Cache.Query
         #region Public IEnumerable methods
 
         /** <inheritdoc /> */
-        [SuppressMessage("ReSharper", "PossibleNullReferenceException")]
         public IEnumerator<T> GetEnumerator()
         {
             ThrowIfDisposed();
 
             if (_iterCalled)
                 throw new InvalidOperationException("Failed to get enumerator entries because " + 
-                    "GetEnumeartor() method has already been called.");
+                    "GetEnumerator() method has already been called.");
 
             if (_getAllCalled)
                 throw new InvalidOperationException("Failed to get enumerator entries because " + 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
index 9f357ea..c2e7762 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
@@ -24,7 +24,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
     /// Continuous query remote filter holder. Wraps real filter into binary object,
     /// so that it can be passed over wire to another node.
     /// </summary>
-    public class ContinuousQueryFilterHolder : IBinaryWriteAware
+    internal class ContinuousQueryFilterHolder : IBinaryWriteAware
     {
         /** Filter object. */
         private readonly object _filter;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
index fef904b..bbc2dbe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
@@ -192,11 +192,9 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
         {
             lock (this)
             {
-                if (_disposed)
+                if (_disposed || _nativeQry == null)
                     return;
 
-                Debug.Assert(_nativeQry != null);
-
                 try
                 {
                     UU.ContinuousQueryClose(_nativeQry);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/FieldsQueryCursor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/FieldsQueryCursor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/FieldsQueryCursor.cs
index 6d45ecd..42fa1b9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/FieldsQueryCursor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/FieldsQueryCursor.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Cache.Query
 {
     using System.Collections;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Unmanaged;
 
@@ -39,6 +40,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Query
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected override IList Read(BinaryReader reader)
         {
             int cnt = reader.ReadInt();

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/QueryCursor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/QueryCursor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/QueryCursor.cs
index 6670ae6..5a46915 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/QueryCursor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/QueryCursor.cs
@@ -17,6 +17,7 @@
 
 namespace Apache.Ignite.Core.Impl.Cache.Query
 {
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Unmanaged;
@@ -39,6 +40,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Query
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected override ICacheEntry<TK, TV> Read(BinaryReader reader)
         {
             TK key = reader.ReadObject<TK>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CancelledTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CancelledTask.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CancelledTask.cs
index 0a84d81..7551d35 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CancelledTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CancelledTask.cs
@@ -17,6 +17,7 @@
 
 namespace Apache.Ignite.Core.Impl.Common
 {
+    using System.Diagnostics.CodeAnalysis;
     using System.Threading.Tasks;
 
     /// <summary>
@@ -30,6 +31,8 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <summary>
         /// Initializes the <see cref="CancelledTask{T}"/> class.
         /// </summary>
+        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
+            Justification = "Readability.")]
         static CancelledTask()
         {
             TaskCompletionSource = new TaskCompletionSource<T>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CopyOnWriteConcurrentDictionary.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CopyOnWriteConcurrentDictionary.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CopyOnWriteConcurrentDictionary.cs
index 918bbd1..01fc8a9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CopyOnWriteConcurrentDictionary.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/CopyOnWriteConcurrentDictionary.cs
@@ -48,6 +48,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <param name="key">The key.</param>
         /// <param name="valueFactory">The function used to generate a value for the key.</param>
         /// <returns>The value for the key.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
         {
             lock (this)

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs
index 5d1a4e2..fa19a9e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/DelegateConverter.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Impl.Common
 {
     using System;
     using System.Diagnostics;
+    using System.Diagnostics.CodeAnalysis;
     using System.Linq.Expressions;
     using System.Reflection;
     using System.Reflection.Emit;
@@ -30,12 +31,13 @@ namespace Apache.Ignite.Core.Impl.Common
     {
         /** */
         private const string DefaultMethodName = "Invoke";
-        
+
         /// <summary>
         /// Compiles a function without arguments.
         /// </summary>
         /// <param name="targetType">Type of the target.</param>
         /// <returns>Compiled function that calls specified method on specified target.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static Func<object, object> CompileFunc(Type targetType)
         {
             var method = targetType.GetMethod(DefaultMethodName);
@@ -62,6 +64,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <returns>
         /// Compiled function that calls specified method on specified target.
         /// </returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static T CompileFunc<T>(Type targetType, Type[] argTypes, bool[] convertToObject = null,
             string methodName = null)
             where T : class
@@ -84,6 +87,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <returns>
         /// Compiled function that calls specified method on specified target.
         /// </returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static T CompileFunc<T>(Type targetType, MethodInfo method, Type[] argTypes, 
             bool[] convertToObject = null)
             where T : class
@@ -155,6 +159,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <returns>
         /// Compiled generic constructor.
         /// </returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static T CompileCtor<T>(ConstructorInfo ctor, Type[] argTypes, bool convertResultToObject = true)
         {
             Debug.Assert(ctor != null);
@@ -189,6 +194,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <returns>
         /// Compiled generic constructor.
         /// </returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static T CompileCtor<T>(Type type, Type[] argTypes, bool convertResultToObject = true)
         {
             var ctor = type.GetConstructor(argTypes);
@@ -201,6 +207,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// </summary>
         /// <param name="field">The field.</param>
         /// <returns>Compiled field setter.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static Action<object, object> CompileFieldSetter(FieldInfo field)
         {
             Debug.Assert(field != null);
@@ -222,6 +229,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// </summary>
         /// <param name="prop">The property.</param>
         /// <returns>Compiled property setter.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static Action<object, object> CompilePropertySetter(PropertyInfo prop)
         {
             Debug.Assert(prop != null);
@@ -246,6 +254,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// </summary>
         /// <param name="field">The field.</param>
         /// <returns>Resulting MethodInfo.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public static DynamicMethod GetWriteFieldMethod(FieldInfo field)
         {
             Debug.Assert(field != null);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
index 0325b71..7e6f418 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
@@ -69,6 +69,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <summary>
         /// Gets the task.
         /// </summary>
+        [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
         public Task<T> Task
         {
             get { return _taskCompletionSource.Task; }
@@ -112,6 +113,7 @@ namespace Apache.Ignite.Core.Impl.Common
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
         public void OnNullResult()
         {
             if (_converter == null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/LoadedAssembliesResolver.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/LoadedAssembliesResolver.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/LoadedAssembliesResolver.cs
index c158d5c..83d4f96 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/LoadedAssembliesResolver.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/LoadedAssembliesResolver.cs
@@ -25,6 +25,7 @@ namespace Apache.Ignite.Core.Impl.Common
     /// <summary>
     /// Resolves loaded assemblies by name.
     /// </summary>
+    // ReSharper disable once ClassNeverInstantiated.Global
     public class LoadedAssembliesResolver
     {
         // The lazy singleton instance.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
index 286ae3a..220dbf8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
@@ -19,8 +19,10 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Compute;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Base class for all tasks working with closures.
@@ -60,6 +62,7 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         /// <returns>
         /// Result policy that dictates how to process further upcoming job results.
         /// </returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public ComputeJobResultPolicy OnResult(IComputeJobResult<T> res, IList<IComputeJobResult<T>> rcvd)
         {
             Exception err = res.Exception;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeMultiClosureTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeMultiClosureTask.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeMultiClosureTask.cs
index f26fe93..167ede9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeMultiClosureTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeMultiClosureTask.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Compute.Closure
 {
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Compute;
 
     /// <summary>
@@ -40,6 +41,7 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected override ComputeJobResultPolicy Result0(IComputeJobResult<T> res)
         {
             _res.Add(res.Data);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeReducingClosureTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeReducingClosureTask.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeReducingClosureTask.cs
index 8e2260e..d1dab05 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeReducingClosureTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeReducingClosureTask.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Compute.Closure
 {
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Compute;
     using Apache.Ignite.Core.Impl.Resource;
 
@@ -41,6 +42,7 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected override ComputeJobResultPolicy Result0(IComputeJobResult<T> res)
         {
             return _rdc.Collect(res.Data) ? ComputeJobResultPolicy.Wait : ComputeJobResultPolicy.Reduce;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeSingleClosureTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeSingleClosureTask.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeSingleClosureTask.cs
index 20da4b6..715c7e2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeSingleClosureTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeSingleClosureTask.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Compute.Closure
 {
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Compute;
 
     /// <summary>
@@ -30,6 +31,7 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         private TR _res;
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected override ComputeJobResultPolicy Result0(IComputeJobResult<T> res)
         {
             _res = (TR) res.Data;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerBatch.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerBatch.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerBatch.cs
index 29ec642..66ee695 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerBatch.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerBatch.cs
@@ -192,6 +192,7 @@ namespace Apache.Ignite.Core.Impl.Datastream
                 {
                     curBatch._fut.Get();
                 }
+                // ReSharper disable once EmptyGeneralCatchClause
                 catch (Exception)
                 {
                     // Ignore.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
index 3686ecb..6066504 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
@@ -537,6 +537,7 @@ namespace Apache.Ignite.Core.Impl.Datastream
                     if (_batch != null)
                         _batch.Send(this, PlcCancelClose);
                 }
+                // ReSharper disable once EmptyGeneralCatchClause
                 catch (Exception)
                 {
                     // Finalizers should never throw
@@ -544,9 +545,9 @@ namespace Apache.Ignite.Core.Impl.Datastream
 
                 Marshaller.Ignite.HandleRegistry.Release(_hnd, true);
                 Marshaller.Ignite.HandleRegistry.Release(_rcvHnd, true);
-
-                base.Dispose(false);
             }
+
+            base.Dispose(false);
         }
 
         /** <inheritDoc /> */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/ExceptionUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/ExceptionUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/ExceptionUtils.cs
index 665d37e..4d2e458 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/ExceptionUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/ExceptionUtils.cs
@@ -46,7 +46,7 @@ namespace Apache.Ignite.Core.Impl
         private const string ClsCachePartialUpdateErr = "org.apache.ignite.internal.processors.platform.cache.PlatformCachePartialUpdateException";
         
         /** Map with predefined exceptions. */
-        private static readonly IDictionary<string, ExceptionFactoryDelegate> EXS = new Dictionary<string, ExceptionFactoryDelegate>();
+        private static readonly IDictionary<string, ExceptionFactoryDelegate> Exs = new Dictionary<string, ExceptionFactoryDelegate>();
 
         /** Exception factory delegate. */
         private delegate Exception ExceptionFactoryDelegate(string msg);
@@ -59,46 +59,46 @@ namespace Apache.Ignite.Core.Impl
         static ExceptionUtils()
         {
             // Common Java exceptions mapped to common .Net exceptions.
-            EXS["java.lang.IllegalArgumentException"] = m => new ArgumentException(m);
-            EXS["java.lang.IllegalStateException"] = m => new InvalidOperationException(m);
-            EXS["java.lang.UnsupportedOperationException"] = m => new NotImplementedException(m);
-            EXS["java.lang.InterruptedException"] = m => new ThreadInterruptedException(m);
+            Exs["java.lang.IllegalArgumentException"] = m => new ArgumentException(m);
+            Exs["java.lang.IllegalStateException"] = m => new InvalidOperationException(m);
+            Exs["java.lang.UnsupportedOperationException"] = m => new NotImplementedException(m);
+            Exs["java.lang.InterruptedException"] = m => new ThreadInterruptedException(m);
             
             // Generic Ignite exceptions.
-            EXS["org.apache.ignite.IgniteException"] = m => new IgniteException(m);
-            EXS["org.apache.ignite.IgniteCheckedException"] = m => new IgniteException(m);
+            Exs["org.apache.ignite.IgniteException"] = m => new IgniteException(m);
+            Exs["org.apache.ignite.IgniteCheckedException"] = m => new IgniteException(m);
 
             // Cluster exceptions.
-            EXS["org.apache.ignite.cluster.ClusterGroupEmptyException"] = m => new ClusterGroupEmptyException(m);
-            EXS["org.apache.ignite.cluster.ClusterTopologyException"] = m => new ClusterTopologyException(m);
+            Exs["org.apache.ignite.cluster.ClusterGroupEmptyException"] = m => new ClusterGroupEmptyException(m);
+            Exs["org.apache.ignite.cluster.ClusterTopologyException"] = m => new ClusterTopologyException(m);
 
             // Compute exceptions.
-            EXS["org.apache.ignite.compute.ComputeExecutionRejectedException"] = m => new ComputeExecutionRejectedException(m);
-            EXS["org.apache.ignite.compute.ComputeJobFailoverException"] = m => new ComputeJobFailoverException(m);
-            EXS["org.apache.ignite.compute.ComputeTaskCancelledException"] = m => new ComputeTaskCancelledException(m);
-            EXS["org.apache.ignite.compute.ComputeTaskTimeoutException"] = m => new ComputeTaskTimeoutException(m);
-            EXS["org.apache.ignite.compute.ComputeUserUndeclaredException"] = m => new ComputeUserUndeclaredException(m);
+            Exs["org.apache.ignite.compute.ComputeExecutionRejectedException"] = m => new ComputeExecutionRejectedException(m);
+            Exs["org.apache.ignite.compute.ComputeJobFailoverException"] = m => new ComputeJobFailoverException(m);
+            Exs["org.apache.ignite.compute.ComputeTaskCancelledException"] = m => new ComputeTaskCancelledException(m);
+            Exs["org.apache.ignite.compute.ComputeTaskTimeoutException"] = m => new ComputeTaskTimeoutException(m);
+            Exs["org.apache.ignite.compute.ComputeUserUndeclaredException"] = m => new ComputeUserUndeclaredException(m);
 
             // Cache exceptions.
-            EXS["javax.cache.CacheException"] = m => new CacheException(m);
-            EXS["javax.cache.integration.CacheLoaderException"] = m => new CacheStoreException(m);
-            EXS["javax.cache.integration.CacheWriterException"] = m => new CacheStoreException(m);
-            EXS["javax.cache.processor.EntryProcessorException"] = m => new CacheEntryProcessorException(m);
-            EXS["org.apache.ignite.cache.CacheAtomicUpdateTimeoutException"] = m => new CacheAtomicUpdateTimeoutException(m);
+            Exs["javax.cache.CacheException"] = m => new CacheException(m);
+            Exs["javax.cache.integration.CacheLoaderException"] = m => new CacheStoreException(m);
+            Exs["javax.cache.integration.CacheWriterException"] = m => new CacheStoreException(m);
+            Exs["javax.cache.processor.EntryProcessorException"] = m => new CacheEntryProcessorException(m);
+            Exs["org.apache.ignite.cache.CacheAtomicUpdateTimeoutException"] = m => new CacheAtomicUpdateTimeoutException(m);
             
             // Transaction exceptions.
-            EXS["org.apache.ignite.transactions.TransactionOptimisticException"] = m => new TransactionOptimisticException(m);
-            EXS["org.apache.ignite.transactions.TransactionTimeoutException"] = m => new TransactionTimeoutException(m);
-            EXS["org.apache.ignite.transactions.TransactionRollbackException"] = m => new TransactionRollbackException(m);
-            EXS["org.apache.ignite.transactions.TransactionHeuristicException"] = m => new TransactionHeuristicException(m);
+            Exs["org.apache.ignite.transactions.TransactionOptimisticException"] = m => new TransactionOptimisticException(m);
+            Exs["org.apache.ignite.transactions.TransactionTimeoutException"] = m => new TransactionTimeoutException(m);
+            Exs["org.apache.ignite.transactions.TransactionRollbackException"] = m => new TransactionRollbackException(m);
+            Exs["org.apache.ignite.transactions.TransactionHeuristicException"] = m => new TransactionHeuristicException(m);
 
             // Security exceptions.
-            EXS["org.apache.ignite.IgniteAuthenticationException"] = m => new SecurityException(m);
-            EXS["org.apache.ignite.plugin.security.GridSecurityException"] = m => new SecurityException(m);
+            Exs["org.apache.ignite.IgniteAuthenticationException"] = m => new SecurityException(m);
+            Exs["org.apache.ignite.plugin.security.GridSecurityException"] = m => new SecurityException(m);
 
             // Future exceptions
-            EXS["org.apache.ignite.lang.IgniteFutureCancelledException"] = m => new IgniteFutureCancelledException(m);
-            EXS["org.apache.ignite.internal.IgniteFutureCancelledCheckedException"] = m => new IgniteFutureCancelledException(m);
+            Exs["org.apache.ignite.lang.IgniteFutureCancelledException"] = m => new IgniteFutureCancelledException(m);
+            Exs["org.apache.ignite.internal.IgniteFutureCancelledCheckedException"] = m => new IgniteFutureCancelledException(m);
         }
 
         /// <summary>
@@ -111,7 +111,7 @@ namespace Apache.Ignite.Core.Impl
         {
             ExceptionFactoryDelegate ctor;
 
-            if (EXS.TryGetValue(clsName, out ctor))
+            if (Exs.TryGetValue(clsName, out ctor))
                 return ctor(msg);
 
             if (ClsNoClsDefFoundErr.Equals(clsName))

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/HandleRegistry.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/HandleRegistry.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/HandleRegistry.cs
index 1979086..e18970f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/HandleRegistry.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/HandleRegistry.cs
@@ -211,6 +211,7 @@ namespace Apache.Ignite.Core.Impl.Handle
                     {
                         target0.Release();
                     }
+                    // ReSharper disable once EmptyGeneralCatchClause
                     catch (Exception)
                     {
                         // No-op.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
index 7929a5d..fe4548c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Impl
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Globalization;
     using System.IO;
     using System.Linq;
@@ -64,6 +65,8 @@ namespace Apache.Ignite.Core.Impl
         /// <summary>
         /// Initializes the <see cref="IgniteUtils"/> class.
         /// </summary>
+        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
+            Justification = "Readability.")]
         static IgniteUtils()
         {
             TryCleanTempDirectories();
@@ -72,10 +75,10 @@ namespace Apache.Ignite.Core.Impl
         /// <summary>
         /// Gets thread local random.
         /// </summary>
-        /// <returns>Thread local random.</returns>
-        private static Random ThreadLocalRandom()
+        /// <value>Thread local random.</value>
+        public static Random ThreadLocalRandom
         {
-            return _rnd ?? (_rnd = new Random());
+            get { return _rnd ?? (_rnd = new Random()); }
         }
 
         /// <summary>
@@ -89,7 +92,7 @@ namespace Apache.Ignite.Core.Impl
             if (cnt > 1) {
                 List<T> res = new List<T>(list);
 
-                Random rnd = ThreadLocalRandom();
+                Random rnd = ThreadLocalRandom;
 
                 while (cnt > 1)
                 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/InteropExceptionHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/InteropExceptionHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/InteropExceptionHolder.cs
index 42c21f3..9edcb03 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/InteropExceptionHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/InteropExceptionHolder.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
     using System.Runtime.Serialization.Formatters.Binary;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Impl.Binary;
@@ -29,7 +30,7 @@ namespace Apache.Ignite.Core.Impl
     internal class InteropExceptionHolder : IBinarizable
     {
         /** Initial exception. */
-        private Exception _err;
+        private readonly Exception _err;
 
         /// <summary>
         /// Constructor.
@@ -57,6 +58,7 @@ namespace Apache.Ignite.Core.Impl
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public void WriteBinary(IBinaryWriter writer)
         {
             var writer0 = (BinaryWriter) writer.GetRawWriter();
@@ -70,9 +72,10 @@ namespace Apache.Ignite.Core.Impl
             {
                 writer0.WriteBoolean(false);
 
-                BinaryFormatter bf = new BinaryFormatter();
-
-                bf.Serialize(new BinaryStreamAdapter(writer0.Stream), _err);
+                using (var streamAdapter = new BinaryStreamAdapter(writer0.Stream))
+                {
+                    new BinaryFormatter().Serialize(streamAdapter, _err);
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformBigEndianMemoryStream.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformBigEndianMemoryStream.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformBigEndianMemoryStream.cs
index 33a0487..d59d572 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformBigEndianMemoryStream.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformBigEndianMemoryStream.cs
@@ -17,6 +17,8 @@
 
 namespace Apache.Ignite.Core.Impl.Memory
 {
+    using System.Diagnostics.CodeAnalysis;
+
     /// <summary>
     /// Platform memory stream for big endian platforms.
     /// </summary>
@@ -45,6 +47,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteShortArray(short[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift2);
@@ -67,6 +70,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteCharArray(char[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift2);
@@ -111,6 +115,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteIntArray(int[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift4);
@@ -146,6 +151,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteLongArray(long[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift8);
@@ -174,6 +180,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteFloatArray(float[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift4);
@@ -198,6 +205,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override unsafe void WriteDoubleArray(double[] val)
         {
             byte* curPos = Data + EnsureWriteCapacityAndShift(val.Length << Shift8);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
index 4a905c3..cb30051 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Memory
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
 
     /// <summary>
     /// Abstract memory chunk.
@@ -38,6 +39,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public virtual PlatformMemoryStream GetStream()
         {
             return BitConverter.IsLittleEndian ? new PlatformMemoryStream(this) : 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
index dccf8ab..f934081 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
@@ -27,6 +27,7 @@ namespace Apache.Ignite.Core.Impl.Memory
     [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable",
         Justification = "This class instance usually lives as long as the app runs.")]
     [CLSCompliant(false)]
+    // ReSharper disable once ClassWithVirtualMembersNeverInherited.Global
     public class PlatformMemoryManager
     {
         /** Default capacity. */
@@ -80,6 +81,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         /// Gets or creates thread-local memory pool.
         /// </summary>
         /// <returns>Memory pool.</returns>
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public PlatformMemoryPool Pool()
         {
             PlatformMemoryPool pool = _threadLocPool.Value;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
index 374cc4a..ba0da19 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
@@ -71,6 +71,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         /// Constructor.
         /// </summary>
         /// <param name="mem">Memory.</param>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public PlatformMemoryStream(IPlatformMemory mem)
         {
             _mem = mem;
@@ -242,6 +243,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public int WriteString(char* chars, int charCnt, int byteCnt, Encoding encoding)
         {
             IgniteArgumentCheck.NotNull(charCnt, "charCnt");

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
index 76aa237..851d24f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Memory
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
 
     /// <summary>
     /// Non-resizeable raw memory chunk without metadata header.
@@ -43,6 +44,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public PlatformMemoryStream GetStream()
         {
             return BitConverter.IsLittleEndian ? new PlatformMemoryStream(this) :

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
index 0472ce4..c4258bd 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Impl
     using System.Diagnostics;
     using System.Diagnostics.CodeAnalysis;
     using System.IO;
-    using System.Threading;
     using System.Threading.Tasks;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Binary.IO;
@@ -235,7 +234,7 @@ namespace Apache.Ignite.Core.Impl
         /// <param name="writeItem">Write action to perform on item when it is not null.</param>
         /// <returns>The same writer for chaining.</returns>
         protected static BinaryWriter WriteNullable<T>(BinaryWriter writer, T item,
-            Func<BinaryWriter, T, BinaryWriter> writeItem)
+            Func<BinaryWriter, T, BinaryWriter> writeItem) where T : class
         {
             if (item == null)
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs
index 0a41d8c..99023b7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs
@@ -25,7 +25,7 @@ namespace Apache.Ignite.Core.Impl.Resource
     /// <summary>
     /// Resource processor.
     /// </summary>
-    internal class ResourceProcessor
+    internal static class ResourceProcessor
     {
         /** Mutex. */
         private static readonly object Mux = new object();

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs
index de5d4c7..6d2b7b0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs
@@ -46,7 +46,7 @@ namespace Apache.Ignite.Core.Impl.Resource
         private static readonly Type TypComputeTaskNoResCache = typeof(ComputeTaskNoResultCacheAttribute);
 
         /** Cached binding flags. */
-        private static readonly BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public |
+        private const BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public | 
             BindingFlags.NonPublic | BindingFlags.DeclaredOnly;
 
         /** Ignite injectors. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs
index ebb4c84..5c108d8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Impl.Services
 {
     using System;
     using System.Diagnostics;
+    using System.Diagnostics.CodeAnalysis;
     using System.Reflection;
     using System.Runtime.Remoting.Messaging;
     using System.Runtime.Remoting.Proxies;
@@ -45,6 +46,7 @@ namespace Apache.Ignite.Core.Impl.Services
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override IMessage Invoke(IMessage msg)
         {
             var methodCall = msg as IMethodCallMessage;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxyInvoker.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxyInvoker.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxyInvoker.cs
index 9cf173b..dc61a34 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxyInvoker.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxyInvoker.cs
@@ -88,6 +88,7 @@ namespace Apache.Ignite.Core.Impl.Services
                 return methods[0];
 
             // 3) 0 or more than 1 matching method - throw.
+            // ReSharper disable once ConditionIsAlwaysTrueOrFalse
             var argsString = arguments == null || arguments.Length == 0
                 ? "0"
                 : "(" +

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
index 0bc7172..229ff8c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Impl.Transactions
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
     using System.Threading.Tasks;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Impl.Binary;
@@ -90,6 +91,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
         }
 
         /** <inheritDoc /> */
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public ITransaction TxStart(TransactionConcurrency concurrency, TransactionIsolation isolation,
             TimeSpan timeout, int txSize)
         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
index e554cfc..7778484 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
@@ -77,6 +77,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
         private readonly GCHandle _thisHnd;
 
         /** Callbacks pointer. */
+        [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")]
         private readonly IntPtr _cbsPtr;
 
         /** Error type: generic. */
@@ -275,7 +276,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
                         if (_ignite != null)
                             cacheStore.Init(_ignite);
                         else
-                            _initActions.Add(g => cacheStore.Init(g));
+                            _initActions.Add(cacheStore.Init);
                     }
                 }
 
@@ -283,6 +284,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             }, true);
         }
 
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         private int CacheStoreInvoke(void* target, long objPtr, long memPtr, void* cb)
         {
             return SafeCall(() =>
@@ -603,6 +605,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             });
         }
 
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         private void DataStreamerStreamReceiverInvoke(void* target, long rcvPtr, void* cache, long memPtr, 
             byte keepBinary)
         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Services/ServiceInvocationException.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Services/ServiceInvocationException.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Services/ServiceInvocationException.cs
index 50365d3..cb0e2ae 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Services/ServiceInvocationException.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Services/ServiceInvocationException.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Services
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
     using System.Runtime.Serialization;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Common;
@@ -91,6 +92,7 @@ namespace Apache.Ignite.Core.Services
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             info.AddValue(KeyBinaryCause, _binaryCause);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.FxCop
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.FxCop b/modules/platforms/dotnet/Apache.Ignite.FxCop
index 0df73c5..2c78f41 100644
--- a/modules/platforms/dotnet/Apache.Ignite.FxCop
+++ b/modules/platforms/dotnet/Apache.Ignite.FxCop
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FxCopProject Version="1.36" Name="Apache Ignite.NET">
+<FxCopProject Version="1.36" Name="My FxCop Project">
  <ProjectOptions>
   <SharedProject>True</SharedProject>
-  <Stylesheet Apply="False" />
+  <Stylesheet Apply="False">c:\program files (x86)\microsoft fxcop 1.36\Xml\FxCopReport.xsl</Stylesheet>
   <SaveMessages>
    <Project Status="Active, Excluded" NewOnly="False" />
    <Report Status="Active" NewOnly="False" />
@@ -27,8 +27,8 @@
   <RuleFiles>
    <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="False">
     <Rule Name="AbstractTypesShouldNotHaveConstructors" Enabled="True" />
+    <Rule Name="AssembliesShouldHaveValidStrongNames" Enabled="True" />
     <Rule Name="AvoidEmptyInterfaces" Enabled="True" />
-    <Rule Name="AvoidOutParameters" Enabled="True" />
     <Rule Name="CollectionsShouldImplementGenericInterface" Enabled="True" />
     <Rule Name="ConsiderPassingBaseTypesAsParameters" Enabled="True" />
     <Rule Name="DeclareEventHandlersCorrectly" Enabled="True" />
@@ -80,9 +80,17 @@
     <Rule Name="UseGenericEventHandlerInstances" Enabled="True" />
     <Rule Name="UseGenericsWhereAppropriate" Enabled="True" />
     <Rule Name="UseIntegralOrStringArgumentForIndexers" Enabled="True" />
-    <Rule Name="UsePropertiesWhereAppropriate" Enabled="True" />
    </RuleFile>
-   <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
+   <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="False">
+    <Rule Name="AvoidDuplicateAccelerators" Enabled="True" />
+    <Rule Name="DoNotHardcodeLocaleSpecificStrings" Enabled="True" />
+    <Rule Name="NormalizeStringsToUppercase" Enabled="True" />
+    <Rule Name="SetLocaleForDataTypes" Enabled="True" />
+    <Rule Name="SpecifyCultureInfo" Enabled="True" />
+    <Rule Name="SpecifyMarshalingForPInvokeStringArguments" Enabled="True" />
+    <Rule Name="SpecifyMessageBoxOptions" Enabled="True" />
+    <Rule Name="UseOrdinalStringComparison" Enabled="True" />
+   </RuleFile>
    <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
    <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" />
    <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="False">
@@ -133,303 +141,49 @@
     <Rule Name="TypeLinkDemandsRequireInheritanceDemands" Enabled="True" />
     <Rule Name="WrapVulnerableFinallyClausesInOuterTry" Enabled="True" />
    </RuleFile>
-   <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
+   <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="False">
+    <Rule Name="CallBaseClassMethodsOnISerializableTypes" Enabled="True" />
+    <Rule Name="CallGCSuppressFinalizeCorrectly" Enabled="True" />
+    <Rule Name="CollectionPropertiesShouldBeReadOnly" Enabled="True" />
+    <Rule Name="DisposableFieldsShouldBeDisposed" Enabled="True" />
+    <Rule Name="DisposableTypesShouldDeclareFinalizer" Enabled="True" />
+    <Rule Name="DoNotCallOverridableMethodsInConstructors" Enabled="True" />
+    <Rule Name="DoNotDecreaseInheritedMemberVisibility" Enabled="True" />
+    <Rule Name="DoNotIgnoreMethodResults" Enabled="True" />
+    <Rule Name="DoNotMarkEnumsWithFlags" Enabled="True" />
+    <Rule Name="DoNotMarkServicedComponentsWithWebMethod" Enabled="True" />
+    <Rule Name="DoNotRaiseExceptionsInExceptionClauses" Enabled="True" />
+    <Rule Name="DoNotRaiseReservedExceptionTypes" Enabled="True" />
+    <Rule Name="DoNotShipUnreleasedResourceFormats" Enabled="True" />
+    <Rule Name="FinalizersShouldBeProtected" Enabled="True" />
+    <Rule Name="FinalizersShouldCallBaseClassFinalizer" Enabled="True" />
+    <Rule Name="ImplementISerializableCorrectly" Enabled="True" />
+    <Rule Name="ImplementSerializationConstructors" Enabled="True" />
+    <Rule Name="ImplementSerializationMethodsCorrectly" Enabled="True" />
+    <Rule Name="InitializeValueTypeStaticFieldsInline" Enabled="True" />
+    <Rule Name="InstantiateArgumentExceptionsCorrectly" Enabled="True" />
+    <Rule Name="MarkAllNonSerializableFields" Enabled="True" />
+    <Rule Name="MarkISerializableTypesWithSerializable" Enabled="True" />
+    <Rule Name="MarkWindowsFormsEntryPointsWithStaThread" Enabled="True" />
+    <Rule Name="MembersShouldDifferByMoreThanReturnType" Enabled="True" />
+    <Rule Name="NonConstantFieldsShouldNotBeVisible" Enabled="True" />
+    <Rule Name="OperationsShouldNotOverflow" Enabled="True" />
+    <Rule Name="OperatorOverloadsHaveNamedAlternates" Enabled="True" />
+    <Rule Name="OperatorsShouldHaveSymmetricalOverloads" Enabled="True" />
+    <Rule Name="OverloadOperatorEqualsOnOverridingValueTypeEquals" Enabled="True" />
+    <Rule Name="OverrideEqualsOnOverloadingOperatorEquals" Enabled="True" />
+    <Rule Name="OverrideGetHashCodeOnOverridingEquals" Enabled="True" />
+    <Rule Name="PassSystemUriObjectsInsteadOfStrings" Enabled="True" />
+    <Rule Name="ProvideDeserializationMethodsForOptionalFields" Enabled="True" />
+    <Rule Name="RethrowToPreserveStackDetails" Enabled="True" />
+    <Rule Name="ReviewUnusedParameters" Enabled="True" />
+    <Rule Name="TestForNaNCorrectly" Enabled="True" />
+    <Rule Name="UseManagedEquivalentsOfWin32Api" Enabled="True" />
+    <Rule Name="UseParamsForVariableArguments" Enabled="True" />
+   </RuleFile>
   </RuleFiles>
   <Groups />
   <Settings />
  </Rules>
- <FxCopReport Version="1.36">
-  <Targets>
-   <Target Name="$(ProjectDir)/Apache.Ignite.Core/bin/x64/Debug/Apache.Ignite.Core.dll">
-    <Modules>
-     <Module Name="apache.ignite.core.dll">
-      <Namespaces>
-       <Namespace Name="Apache.Ignite.Core.Binary">
-        <Types>
-         <Type Name="IBinaryReader">
-          <Members>
-           <Member Name="#GetRawReader()">
-            <Messages>
-             <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
-              <Issue Certainty="50">
-               <Item>'IBinaryReader.GetRawReader()'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-         <Type Name="IBinaryWriter">
-          <Members>
-           <Member Name="#GetRawWriter()">
-            <Messages>
-             <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
-              <Issue Certainty="50">
-               <Item>'IBinaryWriter.GetRawWriter()'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-         <Type Name="IIgniteBinary">
-          <Members>
-           <Member Name="#GetBinaryTypes()">
-            <Messages>
-             <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
-              <Issue Certainty="50">
-               <Item>'IIgniteBinary.GetBinaryTypes()'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Cache">
-        <Types>
-         <Type Name="ICache`2">
-          <Members>
-           <Member Name="#TryLocalPeek(!0,!1&amp;,Apache.Ignite.Core.Cache.CachePeekMode[])">
-            <Messages>
-             <Message Id="1#" TypeName="AvoidOutParameters" Category="Microsoft.Design" CheckId="CA1021" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'value'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Compute">
-        <Types>
-         <Type Name="ComputeJobAdapter`1">
-          <Members>
-           <Member Name="#GetArgument`1(System.Int32)">
-            <Messages>
-             <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2015-11-11 15:43:38Z">
-              <Issue Name="Reserved">
-               <Item>'ComputeJobAdapter&lt;T&gt;.GetArgument&lt;TArg&gt;(int)'</Item>
-               <Item>'IndexOutOfRangeException'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Events">
-        <Types>
-         <Type Name="IEvents">
-          <Members>
-           <Member Name="#GetEnabledEvents()">
-            <Messages>
-             <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
-              <Issue Certainty="50">
-               <Item>'IEvents.GetEnabledEvents()'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Impl">
-        <Types>
-         <Type Name="IgniteUtils">
-          <Members>
-           <Member Name="#.cctor()">
-            <Messages>
-             <Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'IgniteUtils'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Impl.Binary">
-        <Types>
-         <Type Name="BinaryReader">
-          <Members>
-           <Member Name="#Deserialize`1()">
-            <Messages>
-             <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object)'</Item>
-               <Item>'BinaryReader.Deserialize&lt;T&gt;()'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-           <Member Name="#IsNotNullHeader(System.Byte)">
-            <Messages>
-             <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object, object)'</Item>
-               <Item>'BinaryReader.IsNotNullHeader(byte)'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-         <Type Name="Marshaller">
-          <Members>
-           <Member Name="#AddType(System.Type,System.Int32,System.String,System.Boolean,System.Boolean,Apache.Ignite.Core.Binary.IBinaryNameMapper,Apache.Ignite.Core.Binary.IBinaryIdMapper,Apache.Ignite.Core.Binary.IBinarySerializer,System.String)">
-            <Messages>
-             <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object, object, object)'</Item>
-               <Item>'Marshaller.AddType(Type, int, string, bool, bool, IBinaryNameMapper, IBinaryIdMapper, IBinarySerializer, string)'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Impl.Common">
-        <Types>
-         <Type Name="Classpath">
-          <Members>
-           <Member Name="#AppendHomeClasspath(System.String,System.Boolean,System.Text.StringBuilder)">
-            <Messages>
-             <Message Id="System.String.EndsWith(System.String)" TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" CheckId="CA1307" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'Classpath.AppendHomeClasspath(string, bool, StringBuilder)'</Item>
-               <Item>'string.EndsWith(string)'</Item>
-               <Item>'string.EndsWith(string, StringComparison)'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-           <Member Name="#CreateClasspath(System.String,Apache.Ignite.Core.IgniteConfiguration,System.Boolean)">
-            <Messages>
-             <Message Id="System.String.EndsWith(System.String)" TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" CheckId="CA1307" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'Classpath.CreateClasspath(string, IgniteConfiguration, bool)'</Item>
-               <Item>'string.EndsWith(string)'</Item>
-               <Item>'string.EndsWith(string, StringComparison)'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-         <Type Name="Future`1">
-          <Members>
-           <Member Name="#OnNullResult()">
-            <Messages>
-             <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'Future&lt;T&gt;.OnNullResult()'</Item>
-               <Item>'Exception'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-         <Type Name="IgniteHome">
-          <Members>
-           <Member Name="#Resolve(Apache.Ignite.Core.IgniteConfiguration)">
-            <Messages>
-             <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object)'</Item>
-               <Item>'IgniteHome.Resolve(IgniteConfiguration)'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-             <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object, object)'</Item>
-               <Item>'IgniteHome.Resolve(IgniteConfiguration)'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Impl.Memory">
-        <Types>
-         <Type Name="IPlatformMemory">
-          <Members>
-           <Member Name="#GetStream()">
-            <Messages>
-             <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
-              <Issue Certainty="50">
-               <Item>'IPlatformMemory.GetStream()'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-       <Namespace Name="Apache.Ignite.Core.Impl.Unmanaged">
-        <Types>
-         <Type Name="UnmanagedUtils">
-          <Members>
-           <Member Name="#.cctor()">
-            <Messages>
-             <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2015-11-11 15:43:38Z">
-              <Issue>
-               <Item>'string.Format(string, object, object)'</Item>
-               <Item>'UnmanagedUtils.UnmanagedUtils()'</Item>
-               <Item>'string.Format(IFormatProvider, string, params object[])'</Item>
-              </Issue>
-             </Message>
-            </Messages>
-           </Member>
-          </Members>
-         </Type>
-        </Types>
-       </Namespace>
-      </Namespaces>
-     </Module>
-    </Modules>
-   </Target>
-  </Targets>
-  <Rules>
-   <Rule TypeName="AvoidOutParameters" Category="Microsoft.Design" CheckId="CA1021">
-    <Resolution Name="Default">Consider a design that does not require that {0} be an out parameter.</Resolution>
-   </Rule>
-   <Rule TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031">
-    <Resolution Name="Default">Modify {0} to catch a more specific exception than {1} or rethrow the exception.</Resolution>
-   </Rule>
-   <Rule TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201">
-    <Resolution Name="Reserved">{0} creates an exception of type {1}, an exception type that is reserved by the runtime and should never be raised by managed code. If this exception instance might be thrown, use a different exception type.</Resolution>
-   </Rule>
-   <Rule TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810">
-    <Resolution Name="Default">Initialize all static fields in {0} when those fields are declared and remove the explicit static constructor.</Resolution>
-   </Rule>
-   <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305">
-    <Resolution Name="Default">Because the behavior of {0} could vary based on the current user's locale settings, replace this call in {1} with a call to {2}. If the result of {2} will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'.</Resolution>
-   </Rule>
-   <Rule TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" CheckId="CA1307">
-    <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide a StringComparison. This should be replaced with a call to {2}.</Resolution>
-   </Rule>
-   <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024">
-    <Resolution Name="Default">Change {0} to a property if appropriate.</Resolution>
-   </Rule>
-  </Rules>
- </FxCopReport>
+ <FxCopReport Version="1.36" />
 </FxCopProject>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index 164f388..a28d714 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -1,4 +1,5 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
+
+Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core", "Apache.Ignite.Core\Apache.Ignite.Core.csproj", "{4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}"
 EndProject
@@ -24,6 +25,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 		Apache.Ignite.dxg = Apache.Ignite.dxg
 		Apache.Ignite.FxCop = Apache.Ignite.FxCop
 		Apache.Ignite.sln.DotSettings = Apache.Ignite.sln.DotSettings
+		Apache.Ignite.sln.TeamCity.DotSettings = Apache.Ignite.sln.TeamCity.DotSettings
 		build.bat = build.bat
 		DEVNOTES.txt = DEVNOTES.txt
 		examples\Config\example-cache-query.xml = examples\Config\example-cache-query.xml

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.sln.TeamCity.DotSettings
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln.TeamCity.DotSettings b/modules/platforms/dotnet/Apache.Ignite.sln.TeamCity.DotSettings
new file mode 100644
index 0000000..cf9e287
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.sln.TeamCity.DotSettings
@@ -0,0 +1,30 @@
+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLambdaExpression/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=DoNotCallOverridableMethodsInConstructor/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EmptyNamespace/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ForCanBeConvertedToForeach/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=IntroduceOptionalParameters_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=LoopCanBeConvertedToQuery/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBePrivate_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBePrivate_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeProtected_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterTypeCanBeEnumerable_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterTypeCanBeEnumerable_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossiblyMistakenUseOfParamsMethod/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReturnTypeCanBeEnumerable_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReturnTypeCanBeEnumerable_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FElsewhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMemberInSuper_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMethodReturnValue_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEverywhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StaticMemberInGenericType/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StaticFieldInGenericType/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberNeverOverriden_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+	
+	<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
index fa7d6cf..e2dae25 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{27F7F3C6-BDDE-43A9-B565-856F8395A04B}</ProjectGuid>
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
@@ -15,6 +15,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Debug\</OutputPath>
+    <RunCodeAnalysis>false</RunCodeAnalysis>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <PlatformTarget>x64</PlatformTarget>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
index abe4b14..d72eaa3 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{069FA680-3C4D-43A9-B84F-E67513B87827}</ProjectGuid>
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
index df19d2e..ccbdf4b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{DFB08363-202E-412D-8812-349EF10A8702}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4497d01..8f02fec 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -885,7 +885,7 @@
                                         <exclude>**/*.sln</exclude>
                                         <exclude>**/*.snk</exclude>
                                         <exclude>**/*.slnrel</exclude>
-                                        <exclude>**/*.sln.DotSettings</exclude>
+                                        <exclude>**/*.DotSettings</exclude>
                                         <exclude>**/*.FxCop</exclude>
                                         <exclude>**/*.csproj</exclude>
                                         <exclude>**/*.csprojrel</exclude>
@@ -895,6 +895,7 @@
                                         <exclude>**/mkbuild.cmd</exclude>
                                         <exclude>**/module.def</exclude>
                                         <exclude>**/*.fxcop</exclude>
+                                        <exclude>**/*.ruleset</exclude>
                                         <exclude>**/*.metaproj</exclude>
                                         <exclude>**/*.metaproj.tmp</exclude>
                                         <exclude>**/*.nunit</exclude>


[47/49] ignite git commit: IGNITE-2513: ThreadLocal.remove() is replaced with ThreadLocal.set(null) where possible to minimize amount of generated garbage.

Posted by nt...@apache.org.
IGNITE-2513: ThreadLocal.remove() is replaced with ThreadLocal.set(null) where possible to minimize amount of generated garbage.


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

Branch: refs/heads/ignite-2435
Commit: c3b83fe20275818b3bc57676c53e32be2eed9463
Parents: 8eab487
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Feb 1 16:13:29 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Feb 1 16:13:29 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/binary/GridBinaryMarshaller.java | 5 +----
 .../internal/processors/cache/transactions/IgniteTxManager.java | 2 +-
 .../ignite/internal/processors/task/GridTaskProcessor.java      | 2 +-
 .../marshaller/optimized/OptimizedObjectStreamRegistry.java     | 4 ++--
 .../internal/processors/query/h2/opt/GridH2IndexBase.java       | 5 +----
 .../internal/processors/query/h2/opt/GridH2TreeIndex.java       | 2 +-
 6 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
index b4f4291..da43558 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
@@ -316,10 +316,7 @@ public class GridBinaryMarshaller {
      * @param oldCtx Old binary context.
      */
     private static void popContext(@Nullable BinaryContext oldCtx) {
-        if (oldCtx == null)
-            BINARY_CTX.remove();
-        else
-            BINARY_CTX.set(oldCtx);
+        BINARY_CTX.set(oldCtx);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 7a3b8ff..3e43726 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -644,7 +644,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
      */
     public boolean setTxTopologyHint(@Nullable AffinityTopologyVersion topVer) {
         if (topVer == null)
-            txTop.remove();
+            txTop.set(null);
         else {
             if (txTop.get() == null) {
                 txTop.set(topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
index b8d1d78..2a2e3fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
@@ -486,7 +486,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
             map = EMPTY_ENUM_MAP;
         else
             // Reset thread-local context.
-            thCtx.remove();
+            thCtx.set(null);
 
         Long timeout = (Long)map.get(TC_TIMEOUT);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamRegistry.java b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamRegistry.java
index e0e4872..d7d0209 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamRegistry.java
@@ -95,7 +95,7 @@ class OptimizedObjectStreamRegistry {
         holder.releaseOut();
 
         if (pool != null) {
-            holders.remove();
+            holders.set(null);
 
             boolean b = pool.offer(holder);
 
@@ -117,7 +117,7 @@ class OptimizedObjectStreamRegistry {
         holder.releaseIn();
 
         if (pool != null) {
-            holders.remove();
+            holders.set(null);
 
             boolean b = pool.offer(holder);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index 39664ff..fe90dec 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -59,10 +59,7 @@ public abstract class GridH2IndexBase extends BaseIndex {
      * @param fs Filters.
      */
     public static void setFiltersForThread(IndexingQueryFilter fs) {
-        if (fs == null)
-            filters.remove();
-        else
-            filters.set(fs);
+        filters.set(fs);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3b83fe2/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index 28adeee..2c95b66 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -187,7 +187,7 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
 
         ConcurrentNavigableMap<GridSearchRowPointer, GridH2Row> s = snapshot.get();
 
-        snapshot.remove();
+        snapshot.set(null);
 
         if (s instanceof Closeable)
             U.closeQuiet((Closeable)s);


[37/49] ignite git commit: IGNITE-2016: Kafka Connect integration - reflected review comments (avoiding setting same task parameters more than once). - Fixes #335.

Posted by nt...@apache.org.
IGNITE-2016: Kafka Connect integration - reflected review comments (avoiding setting same task parameters more than once). - Fixes #335.

Signed-off-by: shtykh_roman <rs...@yahoo.com>


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

Branch: refs/heads/ignite-2435
Commit: c92c274737391546b3dfe3ccbe527329c462d95f
Parents: 861236a
Author: shtykh_roman <rs...@yahoo.com>
Authored: Mon Feb 1 10:35:02 2016 +0900
Committer: shtykh_roman <rs...@yahoo.com>
Committed: Mon Feb 1 10:35:02 2016 +0900

----------------------------------------------------------------------
 modules/kafka/README.txt                        | 111 +++++-
 modules/kafka/pom.xml                           |  69 ++--
 .../ignite/stream/kafka/KafkaStreamer.java      |   2 +-
 .../kafka/connect/IgniteSinkConnector.java      |  91 +++++
 .../kafka/connect/IgniteSinkConstants.java      |  38 ++
 .../stream/kafka/connect/IgniteSinkTask.java    | 165 ++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |   9 +-
 .../stream/kafka/KafkaEmbeddedBroker.java       | 387 -------------------
 .../kafka/KafkaIgniteStreamerSelfTest.java      |  13 +-
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 ---
 .../ignite/stream/kafka/TestKafkaBroker.java    | 237 ++++++++++++
 .../kafka/connect/IgniteSinkConnectorTest.java  | 250 ++++++++++++
 .../kafka/src/test/resources/example-ignite.xml |  71 ++++
 parent/pom.xml                                  |   9 +-
 14 files changed, 1011 insertions(+), 494 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/README.txt
----------------------------------------------------------------------
diff --git a/modules/kafka/README.txt b/modules/kafka/README.txt
index 1eaf861..f4e56bd 100644
--- a/modules/kafka/README.txt
+++ b/modules/kafka/README.txt
@@ -1,16 +1,17 @@
 Apache Ignite Kafka Streamer Module
-------------------------
+-----------------------------------
 
 Apache Ignite Kafka Streamer module provides streaming from Kafka to Ignite cache.
 
-To enable Kafka Streamer module when starting a standalone node, move 'optional/ignite-Kafka' folder to
-'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
-be added to classpath in this case.
+There are two ways this can be achieved:
+- importing Kafka Streamer module in your Maven project and instantiate KafkaStreamer for data streaming;
+- using Kafka Connect functionality.
 
-Importing Ignite Kafka Streamer Module In Maven Project
--------------------------------------
+Below are the details.
 
-If you are using Maven to manage dependencies of your project, you can add JCL module
+## Importing Ignite Kafka Streamer Module In Maven Project
+
+If you are using Maven to manage dependencies of your project, you can add Kafka module
 dependency like this (replace '${ignite.version}' with actual Ignite version you are
 interested in):
 
@@ -30,3 +31,99 @@ interested in):
     </dependencies>
     ...
 </project>
+
+
+## Streaming Data via Kafka Connect
+
+Sink Connector will help you export data from Kafka to Ignite cache. It polls data from Kafka topics and writes it to the user-specified cache.
+For more information on Kafka Connect, see [Kafka Documentation](http://kafka.apache.org/documentation.html#connect).
+
+Connector can be found in 'optional/ignite-kafka.' It and its dependencies have to be on the classpath of a Kafka running instance,
+as described in the following subsection.
+
+### Setting up and Running
+
+1. Put the following jar files on Kafka's classpath
+- ignite-kafka-connect-x.x.x-SNAPSHOT.jar
+- ignite-core-x.x.x-SNAPSHOT.jar
+- cache-api-1.0.0.jar
+- ignite-spring-1.5.0-SNAPSHOT.jar
+- spring-aop-4.1.0.RELEASE.jar
+- spring-beans-4.1.0.RELEASE.jar
+- spring-context-4.1.0.RELEASE.jar
+- spring-core-4.1.0.RELEASE.jar
+- spring-expression-4.1.0.RELEASE.jar
+- commons-logging-1.1.1.jar
+
+2. Prepare worker configurations, e.g.,
+```
+bootstrap.servers=localhost:9092
+
+key.converter=org.apache.kafka.connect.storage.StringConverter
+value.converter=org.apache.kafka.connect.storage.StringConverter
+key.converter.schemas.enable=false
+value.converter.schemas.enable=false
+
+internal.key.converter=org.apache.kafka.connect.storage.StringConverter
+internal.value.converter=org.apache.kafka.connect.storage.StringConverter
+internal.key.converter.schemas.enable=false
+internal.value.converter.schemas.enable=false
+
+offset.storage.file.filename=/tmp/connect.offsets
+offset.flush.interval.ms=10000
+```
+
+3. Prepare connector configurations, e.g.,
+```
+# connector
+name=string-ignite-connector
+connector.class=IgniteSinkConnector
+tasks.max=2
+topics=testTopic1,testTopic2
+
+# cache
+cacheName=cache1
+cacheAllowOverwrite=true
+igniteCfg=/some-path/ignite.xml
+```
+where 'cacheName' is the name of the cache you specify in '/some-path/ignite.xml' and the data from 'testTopic1,testTopic2'
+will be pulled and stored. 'cacheAllowOverwrite' is set to true if you want to enable overwriting existing values in cache.
+You can also set 'cachePerNodeDataSize' and 'cachePerNodeParOps' to adjust per-node buffer and the maximum number
+of parallel stream operations for a single node.
+
+See example-ignite.xml in tests for a simple cache configuration file example.
+
+4. Start connector, for instance, as follows,
+```
+./bin/connect-standalone.sh myconfig/connect-standalone.properties myconfig/ignite-connector.properties
+```
+
+## Checking the Flow
+
+To perform a very basic functionality check, you can do the following,
+
+1. Start Zookeeper
+```
+bin/zookeeper-server-start.sh config/zookeeper.properties
+```
+
+2. Start Kafka server
+```
+bin/kafka-server-start.sh config/server.properties
+```
+
+3. Provide some data input to the Kafka server
+```
+bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test --property parse.key=true --operty key.separator=,
+k1,v1
+```
+
+4. Start the connector. For example,
+```
+./bin/connect-standalone.sh myconfig/connect-standalone.properties myconfig/ignite-connector.properties
+```
+
+5. Check the value is in the cache. For example, via REST,
+```
+http://node1:8080/ignite?cmd=size&cacheName=cache1
+```

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index e00b190..0ac0487 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -20,7 +20,8 @@
 <!--
     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>
 
     <parent>
@@ -43,48 +44,28 @@
 
         <dependency>
             <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka_2.10</artifactId>
+            <artifactId>kafka_2.11</artifactId>
             <version>${kafka.version}</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>${zookeeper.version}</version>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>connect-api</artifactId>
+            <version>${kafka.version}</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>connect-runtime</artifactId>
+            <version>${kafka.version}</version>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
-            <groupId>org.ow2.asm</groupId>
-            <artifactId>asm-all</artifactId>
-            <version>${asm.version}</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>${curator.version}</version>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
@@ -96,11 +77,33 @@
 
         <dependency>
             <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-log4j</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <version>${easymock.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>
+
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka_2.11</artifactId>
+            <version>${kafka.version}</version>
+            <classifier>test</classifier>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/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 cbc5b1b..487c369 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
@@ -224,4 +224,4 @@ public class KafkaStreamer<T, K, V> extends StreamAdapter<T, K, V> {
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnector.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnector.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnector.java
new file mode 100644
index 0000000..9385920
--- /dev/null
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnector.java
@@ -0,0 +1,91 @@
+/*
+ * 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.connect;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.ignite.internal.util.typedef.internal.A;
+import org.apache.kafka.common.utils.AppInfoParser;
+import org.apache.kafka.connect.connector.Task;
+import org.apache.kafka.connect.errors.ConnectException;
+import org.apache.kafka.connect.sink.SinkConnector;
+
+/**
+ * Sink connector to manage sink tasks that transfer Kafka data to Ignite grid.
+ */
+public class IgniteSinkConnector extends SinkConnector {
+    /** Sink properties. */
+    private Map<String, String> configProps;
+
+    /** {@inheritDoc} */
+    @Override public String version() {
+        return AppInfoParser.getVersion();
+    }
+
+    /**
+     * A sink lifecycle method. Validates grid-specific sink properties.
+     *
+     * @param props Sink properties.
+     */
+    @Override public void start(Map<String, String> props) {
+        configProps = props;
+
+        try {
+            A.notNullOrEmpty(configProps.get(SinkConnector.TOPICS_CONFIG), "topics");
+            A.notNullOrEmpty(configProps.get(IgniteSinkConstants.CACHE_NAME), "cache name");
+            A.notNullOrEmpty(configProps.get(IgniteSinkConstants.CACHE_CFG_PATH), "path to cache config file");
+        }
+        catch (IllegalArgumentException e) {
+            throw new ConnectException("Cannot start IgniteSinkConnector due to configuration error", e);
+        }
+    }
+
+    /**
+     * Obtains a sink task class to be instantiated for feeding data into grid.
+     *
+     * @return IgniteSinkTask class.
+     */
+    @Override public Class<? extends Task> taskClass() {
+        return IgniteSinkTask.class;
+    }
+
+    /**
+     * Builds each config for <tt>maxTasks</tt> tasks.
+     *
+     * @param maxTasks Max number of tasks.
+     * @return Task configs.
+     */
+    @Override public List<Map<String, String>> taskConfigs(int maxTasks) {
+        List<Map<String, String>> taskConfigs = new ArrayList<>();
+        Map<String, String> taskProps = new HashMap<>();
+
+        taskProps.putAll(configProps);
+
+        for (int i = 0; i < maxTasks; i++)
+            taskConfigs.add(taskProps);
+
+        return taskConfigs;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConstants.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConstants.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConstants.java
new file mode 100644
index 0000000..7680d96
--- /dev/null
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConstants.java
@@ -0,0 +1,38 @@
+/*
+ * 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.connect;
+
+/**
+ * Sink configuration strings.
+ */
+public class IgniteSinkConstants {
+    /** Ignite configuration file path. */
+    public static final String CACHE_CFG_PATH = "igniteCfg";
+
+    /** Cache name. */
+    public static final String CACHE_NAME = "cacheName";
+
+    /** Flag to enable overwriting existing values in cache. */
+    public static final String CACHE_ALLOW_OVERWRITE = "cacheAllowOverwrite";
+
+    /** Size of per-node buffer before data is sent to remote node. */
+    public static final String CACHE_PER_NODE_DATA_SIZE = "cachePerNodeDataSize";
+
+    /** Maximum number of parallel stream operations per node. */
+    public static final String CACHE_PER_NODE_PAR_OPS = "cachePerNodeParOps";
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkTask.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkTask.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkTask.java
new file mode 100644
index 0000000..3d9a00d
--- /dev/null
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/IgniteSinkTask.java
@@ -0,0 +1,165 @@
+/*
+ * 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.connect;
+
+import java.util.Collection;
+import java.util.Map;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.Ignition;
+import org.apache.kafka.clients.consumer.OffsetAndMetadata;
+import org.apache.kafka.common.TopicPartition;
+import org.apache.kafka.connect.errors.ConnectException;
+import org.apache.kafka.connect.sink.SinkRecord;
+import org.apache.kafka.connect.sink.SinkTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Task to consume sequences of SinkRecords and write data to grid.
+ */
+public class IgniteSinkTask extends SinkTask {
+    /** Logger. */
+    private static final Logger log = LoggerFactory.getLogger(IgniteSinkTask.class);
+
+    /** Flag for stopped state. */
+    private static volatile boolean stopped = true;
+
+    /** Ignite grid configuration file. */
+    private static String igniteConfigFile;
+
+    /** Cache name. */
+    private static String cacheName;
+
+    /** {@inheritDoc} */
+    @Override public String version() {
+        return new IgniteSinkConnector().version();
+    }
+
+    /**
+     * Initializes grid client from configPath.
+     *
+     * @param props Task properties.
+     */
+    @Override public void start(Map<String, String> props) {
+        // Each task has the same parameters -- avoid setting more than once.
+        if (cacheName != null)
+            return;
+
+        cacheName = props.get(IgniteSinkConstants.CACHE_NAME);
+        igniteConfigFile = props.get(IgniteSinkConstants.CACHE_CFG_PATH);
+
+        if (props.containsKey(IgniteSinkConstants.CACHE_ALLOW_OVERWRITE))
+            StreamerContext.getStreamer().allowOverwrite(
+                Boolean.parseBoolean(props.get(IgniteSinkConstants.CACHE_ALLOW_OVERWRITE)));
+
+        if (props.containsKey(IgniteSinkConstants.CACHE_PER_NODE_DATA_SIZE))
+            StreamerContext.getStreamer().perNodeBufferSize(
+                Integer.parseInt(props.get(IgniteSinkConstants.CACHE_PER_NODE_DATA_SIZE)));
+
+        if (props.containsKey(IgniteSinkConstants.CACHE_PER_NODE_PAR_OPS))
+            StreamerContext.getStreamer().perNodeParallelOperations(
+                Integer.parseInt(props.get(IgniteSinkConstants.CACHE_PER_NODE_PAR_OPS)));
+
+        stopped = false;
+    }
+
+    /**
+     * Buffers records.
+     *
+     * @param records Records to inject into grid.
+     */
+    @SuppressWarnings("unchecked")
+    @Override public void put(Collection<SinkRecord> records) {
+        try {
+            for (SinkRecord record : records) {
+                if (record.key() != null) {
+                    // Data is flushed asynchronously when CACHE_PER_NODE_DATA_SIZE is reached.
+                    StreamerContext.getStreamer().addData(record.key(), record.value());
+                }
+                else {
+                    log.error("Failed to stream a record with null key!");
+                }
+
+            }
+        }
+        catch (ConnectException e) {
+            log.error("Failed adding record", e);
+
+            throw new ConnectException(e);
+        }
+    }
+
+    /**
+     * Pushes buffered data to grid. Flush interval is configured by worker configurations.
+     *
+     * @param offsets Offset information.
+     */
+    @Override public void flush(Map<TopicPartition, OffsetAndMetadata> offsets) {
+        if (stopped)
+            return;
+
+        StreamerContext.getStreamer().flush();
+    }
+
+    /**
+     * Stops the grid client.
+     */
+    @Override public void stop() {
+        if (stopped)
+            return;
+
+        stopped = true;
+
+        StreamerContext.getStreamer().close();
+        StreamerContext.getIgnite().close();
+    }
+
+    /**
+     * Streamer context initializing grid and data streamer instances on demand.
+     */
+    public static class StreamerContext {
+        /** Constructor. */
+        private StreamerContext() {
+        }
+
+        /** Instance holder. */
+        private static class Holder {
+            private static final Ignite IGNITE = Ignition.start(igniteConfigFile);
+            private static final IgniteDataStreamer STREAMER = IGNITE.dataStreamer(cacheName);
+        }
+
+        /**
+         * Obtains grid instance.
+         *
+         * @return Grid instance.
+         */
+        public static Ignite getIgnite() {
+            return Holder.IGNITE;
+        }
+
+        /**
+         * Obtains data streamer instance.
+         *
+         * @return Data streamer instance.
+         */
+        public static IgniteDataStreamer getStreamer() {
+            return Holder.STREAMER;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/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
index 9115ab4..731f540 100644
--- 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
@@ -18,9 +18,10 @@
 package org.apache.ignite.stream.kafka;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.stream.kafka.connect.IgniteSinkConnectorTest;
 
 /**
- * Apache Kafka streamer tests.
+ * Apache Kafka streamers tests.
  */
 public class IgniteKafkaStreamerSelfTestSuite extends TestSuite {
     /**
@@ -30,8 +31,12 @@ public class IgniteKafkaStreamerSelfTestSuite extends TestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("Apache Kafka streamer Test Suite");
 
+        // Kafka streamer.
         suite.addTest(new TestSuite(KafkaIgniteStreamerSelfTest.class));
 
+        // Kafka streamer via Connect API.
+        suite.addTest(new TestSuite(IgniteSinkConnectorTest.class));
+
         return suite;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/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
deleted file mode 100644
index 5e7cee7..0000000
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.stream.kafka;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-import kafka.admin.AdminUtils;
-import kafka.api.LeaderAndIsr;
-import kafka.api.PartitionStateInfo;
-import kafka.api.Request;
-import kafka.producer.KeyedMessage;
-import kafka.producer.Producer;
-import kafka.producer.ProducerConfig;
-import kafka.serializer.StringEncoder;
-import kafka.server.KafkaConfig;
-import kafka.server.KafkaServer;
-import kafka.utils.SystemTime$;
-import kafka.utils.ZKStringSerializer$;
-import kafka.utils.ZkUtils;
-import org.I0Itec.zkclient.ZkClient;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.zookeeper.server.NIOServerCnxnFactory;
-import org.apache.zookeeper.server.ZooKeeperServer;
-
-/**
- * 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 brokerCfg;
-
-    /** Kafka server. */
-    private KafkaServer kafkaSrv;
-
-    /** 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 partitions for the topic.
-     * @param replicationFactor Replication factor.
-     * @throws TimeoutException If operation is timed out.
-     * @throws InterruptedException If interrupted.
-     */
-    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.
-     *
-     * @param keyedMessages List of keyed messages.
-     * @return Producer used to send the message.
-     */
-    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.
-     */
-    public void shutdown() {
-        zkReady = false;
-
-        if (kafkaSrv != null)
-            kafkaSrv.shutdown();
-
-        List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerCfg.logDirs());
-
-        for (String logDir : logDirs)
-            U.delete(new File(logDir));
-
-        if (zkClient != null) {
-            zkClient.close();
-
-            zkClient = null;
-        }
-
-        if (zooKeeper != null) {
-
-            try {
-                zooKeeper.shutdown();
-            }
-            catch (IOException e) {
-                // No-op.
-            }
-
-            zooKeeper = null;
-        }
-    }
-
-    /**
-     * @return 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 part Partition.
-     * @return {@code True} if propagated, otherwise {@code false}.
-     */
-    private boolean isMetadataPropagated(String topic, int part) {
-        scala.Option<PartitionStateInfo> partStateOption =
-            kafkaSrv.apis().metadataCache().getPartitionInfo(topic, part);
-
-        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 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(String topic, int part, long timeout, long interval)
-        throws TimeoutException, InterruptedException {
-        int attempt = 1;
-
-        long startTime = System.currentTimeMillis();
-
-        while (true) {
-            if (isMetadataPropagated(topic, part))
-                return;
-
-            long duration = System.currentTimeMillis() - startTime;
-
-            if (duration < timeout)
-                Thread.sleep(interval);
-            else
-                throw new TimeoutException("Metadata propagation is timed out, attempt " + attempt);
-
-            attempt++;
-        }
-    }
-
-    /**
-     * Sets up embedded Kafka server.
-     *
-     * @throws IOException If failed.
-     */
-    private void setupEmbeddedKafkaServer() throws IOException {
-        A.ensure(zkReady, "Zookeeper should be setup before hand");
-
-        brokerCfg = new KafkaConfig(getBrokerConfig());
-
-        kafkaSrv = new KafkaServer(brokerCfg, SystemTime$.MODULE$);
-
-        kafkaSrv.startup();
-    }
-
-    /**
-     * Sets up embedded ZooKeeper.
-     *
-     * @throws IOException If failed.
-     * @throws InterruptedException If interrupted.
-     */
-    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 broker config.
-     *
-     * @return Kafka broker config.
-     * @throws IOException If failed.
-     */
-    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", 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.
-     *
-     * @param prefix Prefix.
-     * @return Created file.
-     * @throws IOException If failed.
-     */
-    private static File createTempDir( String prefix) throws IOException {
-        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(String zkHost, int zkPort) {
-            this.zkHost = zkHost;
-            this.zkPort = zkPort;
-        }
-
-        /**
-         * Starts up ZooKeeper.
-         *
-         * @throws IOException If failed.
-         * @throws InterruptedException If interrupted.
-         */
-        void startup() throws IOException, InterruptedException {
-            snapshotDir = createTempDir("_ss");
-
-            logDir = createTempDir("_log");
-
-            ZooKeeperServer zkSrv = new ZooKeeperServer(snapshotDir, logDir, 500);
-
-            factory = new NIOServerCnxnFactory();
-
-            factory.configure(new InetSocketAddress(zkHost, zkPort), 16);
-
-            factory.startup(zkSrv);
-        }
-
-        /**
-         * @return Actual port ZooKeeper is started.
-         */
-        int getActualPort() {
-            return factory.getLocalPort();
-        }
-
-        /**
-         * Shuts down ZooKeeper.
-         *
-         * @throws IOException If failed.
-         */
-        void shutdown() throws IOException {
-            if (factory != null) {
-                factory.shutdown();
-
-                U.delete(snapshotDir);
-
-                U.delete(logDir);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/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 927ba3d..829c877 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
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import kafka.consumer.ConsumerConfig;
 import kafka.producer.KeyedMessage;
@@ -40,14 +41,13 @@ import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT;
-import static org.apache.ignite.stream.kafka.KafkaEmbeddedBroker.getZKAddress;
 
 /**
  * Tests {@link KafkaStreamer}.
  */
 public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
     /** Embedded Kafka. */
-    private KafkaEmbeddedBroker embeddedBroker;
+    private TestKafkaBroker embeddedBroker;
 
     /** Count. */
     private static final int CNT = 100;
@@ -77,7 +77,7 @@ public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
     @Override protected void beforeTest() throws Exception {
         grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
 
-        embeddedBroker = new KafkaEmbeddedBroker();
+        embeddedBroker = new TestKafkaBroker();
     }
 
     /** {@inheritDoc} */
@@ -176,7 +176,7 @@ public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
             kafkaStmr.setThreads(4);
 
             // Set the consumer configuration.
-            kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(getZKAddress(), "groupX"));
+            kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(embeddedBroker.getZookeeperAddress(), "groupX"));
 
             // Set the decoders.
             StringDecoder strDecoder = new StringDecoder(new VerifiableProperties());
@@ -199,7 +199,8 @@ public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
 
             ignite.events(ignite.cluster().forCacheNodes(null)).remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
 
-            latch.await();
+            // Checks all events successfully processed in 10 seconds.
+            assertTrue(latch.await(10, TimeUnit.SECONDS));
 
             for (Map.Entry<String, String> entry : keyValMap.entrySet())
                 assertEquals(entry.getValue(), cache.get(entry.getKey()));
@@ -232,4 +233,4 @@ public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
 
         return new ConsumerConfig(props);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/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
deleted file mode 100644
index b49bebe..0000000
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.stream.kafka;
-
-import kafka.producer.Partitioner;
-import kafka.utils.VerifiableProperties;
-
-/**
- * Simple partitioner for Kafka.
- */
-@SuppressWarnings("UnusedDeclaration")
-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 partSize Partition size.
-     * @return partition Partition.
-     */
-    public int partition(Object key, int partSize) {
-        String keyStr = (String)key;
-
-        String[] keyValues = keyStr.split("\\.");
-
-        Integer intKey = Integer.parseInt(keyValues[3]);
-
-        return intKey > 0 ? intKey % partSize : 0;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
new file mode 100644
index 0000000..70acb78
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
@@ -0,0 +1,237 @@
+/*
+ * 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 java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeoutException;
+import kafka.producer.KeyedMessage;
+import kafka.producer.Producer;
+import kafka.producer.ProducerConfig;
+import kafka.server.KafkaConfig;
+import kafka.server.KafkaServer;
+import kafka.utils.SystemTime$;
+import kafka.utils.TestUtils;
+import kafka.utils.ZkUtils;
+import org.I0Itec.zkclient.ZkClient;
+import org.I0Itec.zkclient.ZkConnection;
+import org.apache.curator.test.TestingServer;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import scala.Tuple2;
+
+/**
+ * Kafka Test Broker.
+ */
+public class TestKafkaBroker {
+    /** 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 final int ZK_PORT = 21811;
+
+    /** Broker host. */
+    private static final String BROKER_HOST = "localhost";
+
+    /** Broker port. */
+    private static final int BROKER_PORT = 9092;
+
+    /** Kafka config. */
+    private KafkaConfig kafkaCfg;
+
+    /** Kafka server. */
+    private KafkaServer kafkaSrv;
+
+    /** ZooKeeper. */
+    private TestingServer zkServer;
+
+    /** Kafka Zookeeper utils. */
+    private ZkUtils zkUtils;
+
+    /**
+     * Kafka broker constructor.
+     */
+    public TestKafkaBroker() {
+        try {
+            setupZooKeeper();
+
+            setupKafkaServer();
+        }
+        catch (Exception e) {
+            throw new RuntimeException("Failed to start Kafka: " + e);
+        }
+    }
+
+    /**
+     * Creates a topic.
+     *
+     * @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, int partitions, int replicationFactor)
+        throws TimeoutException, InterruptedException {
+        List<KafkaServer> servers = new ArrayList<>();
+
+        servers.add(kafkaSrv);
+
+        TestUtils.createTopic(zkUtils, topic, partitions, replicationFactor,
+            scala.collection.JavaConversions.asScalaBuffer(servers), new Properties());
+    }
+
+    /**
+     * Sends a message to Kafka broker.
+     *
+     * @param keyedMessages List of keyed messages.
+     * @return Producer used to send the message.
+     */
+    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 test Kafka broker.
+     */
+    public void shutdown() {
+        if (zkUtils != null)
+            zkUtils.close();
+
+        if (kafkaSrv != null)
+            kafkaSrv.shutdown();
+
+        if (zkServer != null) {
+            try {
+                zkServer.stop();
+            }
+            catch (IOException e) {
+                // No-op.
+            }
+        }
+
+        List<String> logDirs = scala.collection.JavaConversions.seqAsJavaList(kafkaCfg.logDirs());
+
+        for (String logDir : logDirs)
+            U.delete(new File(logDir));
+    }
+
+    /**
+     * Sets up test Kafka broker.
+     *
+     * @throws IOException If failed.
+     */
+    private void setupKafkaServer() throws IOException {
+        kafkaCfg = new KafkaConfig(getKafkaConfig());
+
+        kafkaSrv = TestUtils.createServer(kafkaCfg, SystemTime$.MODULE$);
+
+        kafkaSrv.startup();
+    }
+
+    /**
+     * Sets up ZooKeeper test server.
+     *
+     * @throws Exception If failed.
+     */
+    private void setupZooKeeper() throws Exception {
+        zkServer = new TestingServer(ZK_PORT, true);
+
+        Tuple2<ZkClient, ZkConnection> zkTuple = ZkUtils.createZkClientAndConnection(zkServer.getConnectString(),
+            ZK_SESSION_TIMEOUT, ZK_CONNECTION_TIMEOUT);
+
+        zkUtils = new ZkUtils(zkTuple._1(), zkTuple._2(), false);
+    }
+
+    /**
+     * Obtains Kafka config.
+     *
+     * @return Kafka config.
+     * @throws IOException If failed.
+     */
+    private Properties getKafkaConfig() throws IOException {
+        Properties props = new Properties();
+
+        props.put("broker.id", "0");
+        props.put("zookeeper.connect", zkServer.getConnectString());
+        props.put("host.name", BROKER_HOST);
+        props.put("port", BROKER_PORT);
+        props.put("offsets.topic.replication.factor", "1");
+        props.put("log.dir", createTmpDir("_cfg").getAbsolutePath());
+        props.put("log.flush.interval.messages", "1");
+
+        return props;
+    }
+
+    /**
+     * Obtains broker address.
+     *
+     * @return Kafka broker address.
+     */
+    public String getBrokerAddress() {
+        return BROKER_HOST + ":" + BROKER_PORT;
+    }
+
+    /**
+     * Obtains Zookeeper address.
+     *
+     * @return Zookeeper address.
+     */
+    public String getZookeeperAddress() {
+        return BROKER_HOST + ":" + ZK_PORT;
+    }
+
+    /**
+     * Obtains producer config.
+     *
+     * @return Kafka Producer config.
+     */
+    private ProducerConfig getProducerConfig() {
+        Properties props = new Properties();
+
+        props.put("metadata.broker.list", getBrokerAddress());
+        props.put("bootstrap.servers", getBrokerAddress());
+        props.put("serializer.class", "kafka.serializer.StringEncoder");
+
+        return new ProducerConfig(props);
+    }
+
+    /**
+     * Creates temporary directory.
+     *
+     * @param prefix Prefix.
+     * @return Created file.
+     * @throws IOException If failed.
+     */
+    private static File createTmpDir(String prefix) throws IOException {
+        Path path = Files.createTempDirectory(prefix);
+
+        return path.toFile();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java
new file mode 100644
index 0000000..a8583d0
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java
@@ -0,0 +1,250 @@
+/*
+ * 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.connect;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import kafka.producer.KeyedMessage;
+import kafka.producer.Producer;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CachePeekMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.stream.kafka.TestKafkaBroker;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.kafka.common.utils.Utils;
+import org.apache.kafka.connect.runtime.ConnectorConfig;
+import org.apache.kafka.connect.runtime.Herder;
+import org.apache.kafka.connect.runtime.Worker;
+import org.apache.kafka.connect.runtime.WorkerConfig;
+import org.apache.kafka.connect.runtime.rest.entities.ConnectorInfo;
+import org.apache.kafka.connect.runtime.standalone.StandaloneConfig;
+import org.apache.kafka.connect.runtime.standalone.StandaloneHerder;
+import org.apache.kafka.connect.storage.OffsetBackingStore;
+import org.apache.kafka.connect.util.Callback;
+import org.apache.kafka.connect.util.FutureCallback;
+
+import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.mock;
+
+/**
+ * Tests for {@link IgniteSinkConnector}.
+ */
+public class IgniteSinkConnectorTest extends GridCommonAbstractTest {
+    /** Number of input messages. */
+    private static final int EVENT_CNT = 10000;
+
+    /** Cache name. */
+    private static final String CACHE_NAME = "testCache";
+
+    /** Test topics. */
+    private static final String[] TOPICS = {"test1", "test2"};
+
+    /** Kafka partition. */
+    private static final int PARTITIONS = 3;
+
+    /** Kafka replication factor. */
+    private static final int REPLICATION_FACTOR = 1;
+
+    /** Test Kafka broker. */
+    private TestKafkaBroker kafkaBroker;
+
+    /** Worker to run tasks. */
+    private Worker worker;
+
+    /** Workers' herder. */
+    private Herder herder;
+
+    /** Ignite server node. */
+    private Ignite grid;
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override protected void beforeTest() throws Exception {
+        IgniteConfiguration cfg = loadConfiguration("modules/kafka/src/test/resources/example-ignite.xml");
+
+        cfg.setClientMode(false);
+
+        grid = startGrid("igniteServerNode", cfg);
+
+        kafkaBroker = new TestKafkaBroker();
+
+        for (String topic : TOPICS)
+            kafkaBroker.createTopic(topic, PARTITIONS, REPLICATION_FACTOR);
+
+        WorkerConfig workerConfig = new StandaloneConfig(makeWorkerProps());
+
+        OffsetBackingStore offsetBackingStore = mock(OffsetBackingStore.class);
+        offsetBackingStore.configure(anyObject(Map.class));
+
+        worker = new Worker(workerConfig, offsetBackingStore);
+        worker.start();
+
+        herder = new StandaloneHerder(worker);
+        herder.start();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        herder.stop();
+
+        worker.stop();
+
+        kafkaBroker.shutdown();
+
+        stopAllGrids();
+    }
+
+    /**
+     * Tests the whole data flow from injecting data to Kafka to transferring it to the grid. It reads from two
+     * specified Kafka topics, because a sink task can read from multiple topics.
+     *
+     * @throws Exception Thrown in case of the failure.
+     */
+    public void testSinkPuts() throws Exception {
+        Map<String, String> sinkProps = makeSinkProps(Utils.join(TOPICS, ","));
+
+        FutureCallback<Herder.Created<ConnectorInfo>> cb = new FutureCallback<>(new Callback<Herder.Created<ConnectorInfo>>() {
+            @Override
+            public void onCompletion(Throwable error, Herder.Created<ConnectorInfo> info) {
+                if (error != null)
+                    throw new RuntimeException("Failed to create a job!");
+            }
+        });
+
+        herder.putConnectorConfig(
+            sinkProps.get(ConnectorConfig.NAME_CONFIG),
+            sinkProps, false, cb);
+
+        cb.get();
+
+        final CountDownLatch latch = new CountDownLatch(EVENT_CNT * TOPICS.length);
+
+        final IgnitePredicate<Event> putLsnr = new IgnitePredicate<Event>() {
+            @Override public boolean apply(Event evt) {
+                assert evt != null;
+
+                latch.countDown();
+
+                return true;
+            }
+        };
+
+        grid.events(grid.cluster().forCacheNodes(CACHE_NAME)).localListen(putLsnr, EVT_CACHE_OBJECT_PUT);
+
+        IgniteCache<String, String> cache = grid.cache(CACHE_NAME);
+
+        assertEquals(0, cache.size(CachePeekMode.PRIMARY));
+
+        Map<String, String> keyValMap = new HashMap<>(EVENT_CNT * TOPICS.length);
+
+        // Produces events for the specified number of topics
+        for (String topic : TOPICS)
+            keyValMap.putAll(produceStream(topic));
+
+        // Checks all events successfully processed in 10 seconds.
+        assertTrue(latch.await(10, TimeUnit.SECONDS));
+
+        grid.events(grid.cluster().forCacheNodes(CACHE_NAME)).stopLocalListen(putLsnr);
+
+        // Checks that each event was processed properly.
+        for (Map.Entry<String, String> entry : keyValMap.entrySet())
+            assertEquals(entry.getValue(), cache.get(entry.getKey()));
+
+        assertEquals(EVENT_CNT * TOPICS.length, cache.size(CachePeekMode.PRIMARY));
+    }
+
+    /**
+     * Sends messages to Kafka.
+     *
+     * @param topic Topic name.
+     * @return Map of key value messages.
+     */
+    private Map<String, String> produceStream(String topic) {
+        List<KeyedMessage<String, String>> messages = new ArrayList<>(EVENT_CNT);
+
+        Map<String, String> keyValMap = new HashMap<>();
+
+        for (int evt = 0; evt < EVENT_CNT; evt++) {
+            long runtime = System.currentTimeMillis();
+
+            String key = topic + "_" + String.valueOf(evt);
+            String msg = runtime + String.valueOf(evt);
+
+            messages.add(new KeyedMessage<>(topic, key, msg));
+
+            keyValMap.put(key, msg);
+        }
+
+        Producer<String, String> producer = kafkaBroker.sendMessages(messages);
+
+        producer.close();
+
+        return keyValMap;
+    }
+
+    /**
+     * Creates properties for test sink connector.
+     *
+     * @param topics Topics.
+     * @return Test sink connector properties.
+     */
+    private Map<String, String> makeSinkProps(String topics) {
+        Map<String, String> props = new HashMap<>();
+
+        props.put(ConnectorConfig.TOPICS_CONFIG, topics);
+        props.put(ConnectorConfig.TASKS_MAX_CONFIG, "2");
+        props.put(ConnectorConfig.NAME_CONFIG, "test-connector");
+        props.put(ConnectorConfig.CONNECTOR_CLASS_CONFIG, IgniteSinkConnector.class.getName());
+        props.put(IgniteSinkConstants.CACHE_NAME, "testCache");
+        props.put(IgniteSinkConstants.CACHE_ALLOW_OVERWRITE, "true");
+        props.put(IgniteSinkConstants.CACHE_CFG_PATH, "example-ignite.xml");
+
+        return props;
+    }
+
+    /**
+     * Creates properties for Kafka Connect workers.
+     *
+     * @return Worker configurations.
+     */
+    private Map<String, String> makeWorkerProps() {
+        Map<String, String> props = new HashMap<>();
+
+        props.put(WorkerConfig.INTERNAL_KEY_CONVERTER_CLASS_CONFIG, "org.apache.kafka.connect.storage.StringConverter");
+        props.put(WorkerConfig.INTERNAL_VALUE_CONVERTER_CLASS_CONFIG, "org.apache.kafka.connect.storage.StringConverter");
+        props.put("internal.key.converter.schemas.enable", "false");
+        props.put("internal.value.converter.schemas.enable", "false");
+        props.put(WorkerConfig.KEY_CONVERTER_CLASS_CONFIG, "org.apache.kafka.connect.storage.StringConverter");
+        props.put(WorkerConfig.VALUE_CONVERTER_CLASS_CONFIG, "org.apache.kafka.connect.storage.StringConverter");
+        props.put("key.converter.schemas.enable", "false");
+        props.put("value.converter.schemas.enable", "false");
+        props.put(WorkerConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaBroker.getBrokerAddress());
+        // fast flushing for testing.
+        props.put(WorkerConfig.OFFSET_COMMIT_INTERVAL_MS_CONFIG, "10");
+
+        return props;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/modules/kafka/src/test/resources/example-ignite.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/resources/example-ignite.xml b/modules/kafka/src/test/resources/example-ignite.xml
new file mode 100644
index 0000000..fbb05d3
--- /dev/null
+++ b/modules/kafka/src/test/resources/example-ignite.xml
@@ -0,0 +1,71 @@
+<?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.
+-->
+
+<!--
+    Ignite configuration with all defaults and enabled p2p deployment and enabled events.
+    Used for testing IgniteSink running Ignite in a client mode.
+-->
+<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">
+    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <!-- Enable client mode. -->
+        <property name="clientMode" value="true"/>
+
+        <!-- Cache accessed from IgniteSink. -->
+        <property name="cacheConfiguration">
+            <list>
+                <!-- Partitioned cache example configuration with configurations adjusted to server nodes'. -->
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="atomicityMode" value="ATOMIC"/>
+
+                    <property name="name" value="testCache"/>
+                </bean>
+            </list>
+        </property>
+
+        <!-- Enable cache events. -->
+        <property name="includeEventTypes">
+            <list>
+                <!-- Cache events (only EVT_CACHE_OBJECT_PUT for tests). -->
+                <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
+            </list>
+        </property>
+
+        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+        <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>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c92c2747/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 8f02fec..21d8c69 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -61,6 +61,7 @@
         <commons.lang.version>2.6</commons.lang.version>
         <cron4j.version>2.2.5</cron4j.version>
         <curator.version>2.9.1</curator.version>
+        <easymock.version>3.4</easymock.version>
         <ezmorph.bundle.version>1.0.6_1</ezmorph.bundle.version>
         <ezmorph.version>1.0.6</ezmorph.version>
         <flume.ng.version>1.6.0</flume.ng.version>
@@ -82,11 +83,9 @@
         <jsonlib.bundle.version>2.4_1</jsonlib.bundle.version>
         <jsonlib.version>2.4</jsonlib.version>
         <jtidy.version>r938</jtidy.version>
-        <kafka.bundle.version>0.8.2.1_1</kafka.bundle.version>
-        <kafka.clients.bundle.version>0.8.2.0_1</kafka.clients.bundle.version>
-        <kafka.clients.version>0.8.2.0</kafka.clients.version>
-        <kafka.version>0.8.2.1</kafka.version>
-        <kafka.version>0.8.2.1</kafka.version>
+        <kafka.bundle.version>0.9.0.0_1</kafka.bundle.version>
+        <kafka.clients.bundle.version>0.9.0.0_1</kafka.clients.bundle.version>
+        <kafka.version>0.9.0.0</kafka.version>
         <karaf.version>4.0.2</karaf.version>
         <lucene.bundle.version>3.5.0_1</lucene.bundle.version>
         <lucene.version>3.5.0</lucene.version>


[22/49] ignite git commit: Fixed GridServicePackagePrivateSelfTest - nodes were not properly stopped

Posted by nt...@apache.org.
Fixed GridServicePackagePrivateSelfTest - nodes were not properly stopped


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

Branch: refs/heads/ignite-2435
Commit: 7a11154201322fb44e8e0d3061f4cf19151f15fd
Parents: f9868d4
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Thu Jan 28 16:09:20 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Thu Jan 28 16:09:20 2016 -0800

----------------------------------------------------------------------
 .../service/GridServicePackagePrivateSelfTest.java | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7a111542/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
index 430d366..c085192 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java
@@ -31,16 +31,21 @@ public class GridServicePackagePrivateSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testPackagePrivateService() throws Exception {
-        Ignite server = startGrid("server");
+        try {
+            Ignite server = startGrid("server");
 
-        server.services().deployClusterSingleton("my-service", MyServiceFactory.create());
+            server.services().deployClusterSingleton("my-service", MyServiceFactory.create());
 
-        Ignition.setClientMode(true);
+            Ignition.setClientMode(true);
 
-        Ignite client = startGrid("client");
+            Ignite client = startGrid("client");
 
-        MyService svc = client.services().serviceProxy("my-service", MyService.class, true);
+            MyService svc = client.services().serviceProxy("my-service", MyService.class, true);
 
-        assertEquals(42, svc.hello());
+            assertEquals(42, svc.hello());
+        }
+        finally {
+            stopAllGrids();
+        }
     }
 }


[28/49] ignite git commit: IGNITE-2498: Full fix for (p2p + offheap) deserialization issue.

Posted by nt...@apache.org.
IGNITE-2498: Full fix for (p2p + offheap) deserialization issue.


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

Branch: refs/heads/ignite-2435
Commit: 5c76f80bf872989d0376d8f03e1adac6dc509222
Parents: 1614c75
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 12:44:49 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 12:44:49 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheMapEntry.java | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5c76f80b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 775ba87..19c1312 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -220,7 +220,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         }
         else {
             try {
-                if (cctx.kernalContext().config().isPeerClassLoadingEnabled()) {
+                if (isPeerClassLoadingEnabled()) {
                     Object val0 = null;
 
                     if (val != null && val.cacheObjectType() != CacheObject.TYPE_BYTE_ARR) {
@@ -571,7 +571,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             IgniteUuid valClsLdrId = null;
             IgniteUuid keyClsLdrId = null;
 
-            if (cctx.kernalContext().config().isPeerClassLoadingEnabled() && !cctx.binaryMarshaller()) {
+            if (isPeerClassLoadingEnabled()) {
                 if (val != null) {
                     valClsLdrId = cctx.deploy().getClassLoaderId(
                         U.detectObjectClassLoader(val.value(cctx.cacheObjectContext(), false)));
@@ -598,6 +598,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /**
+     * @return {@code True} if peer class loading is enabled.
+     */
+    private boolean isPeerClassLoadingEnabled() {
+        return !cctx.binaryMarshaller() && cctx.kernalContext().config().isPeerClassLoadingEnabled();
+    }
+
+    /**
      * @return Value bytes and flag indicating whether value is byte array.
      */
     protected IgniteBiTuple<byte[], Byte> valueBytes0() {
@@ -3157,7 +3164,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         if (hasOffHeapPointer()) {
             CacheObject val0 = cctx.fromOffheap(offHeapPointer(), tmp);
 
-            if (!tmp && cctx.kernalContext().config().isPeerClassLoadingEnabled())
+            if (!tmp && isPeerClassLoadingEnabled())
                 val0.finishUnmarshal(cctx.cacheObjectContext(), cctx.deploy().globalLoader());
 
             return val0;
@@ -4045,7 +4052,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                     IgniteUuid valClsLdrId = null;
                     IgniteUuid keyClsLdrId = null;
 
-                    if (cctx.kernalContext().config().isPeerClassLoadingEnabled()) {
+                    if (isPeerClassLoadingEnabled()) {
                         if (val != null) {
                             valClsLdrId = cctx.deploy().getClassLoaderId(
                                 U.detectObjectClassLoader(val.value(cctx.cacheObjectContext(), false)));


[45/49] ignite git commit: IGNITE-2502: More precise ArrayList allocation inside GridNearAtomicUpdateRequest.

Posted by nt...@apache.org.
IGNITE-2502: More precise ArrayList allocation inside GridNearAtomicUpdateRequest.


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

Branch: refs/heads/ignite-2435
Commit: 732dd4136f234036f390914a98aad8776514eb57
Parents: 881d5a8
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Feb 1 15:06:18 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Feb 1 15:06:18 2016 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  6 ++++--
 .../dht/atomic/GridNearAtomicUpdateRequest.java | 22 +++++++++++++++-----
 2 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/732dd413/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index c9e1a11..519df17 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -1100,7 +1100,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                             skipStore,
                             keepBinary,
                             cctx.kernalContext().clientNode(),
-                            cctx.deploymentEnabled());
+                            cctx.deploymentEnabled(),
+                            keys.size());
 
                         pendingMappings.put(nodeId, mapped);
                     }
@@ -1199,7 +1200,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 skipStore,
                 keepBinary,
                 cctx.kernalContext().clientNode(),
-                cctx.deploymentEnabled());
+                cctx.deploymentEnabled(),
+                1);
 
             req.addUpdateEntry(cacheKey,
                 val,

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dd413/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index 9c4b486..1a7fa88 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -158,6 +158,10 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
     @GridDirectTransient
     private GridNearAtomicUpdateResponse res;
 
+    /** Maximum possible size of inner collections. */
+    @GridDirectTransient
+    private int initSize;
+
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -187,6 +191,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
      * @param keepBinary Keep binary flag.
      * @param clientReq Client node request flag.
      * @param addDepInfo Deployment info flag.
+     * @param maxEntryCnt Maximum entries count.
      */
     public GridNearAtomicUpdateRequest(
         int cacheId,
@@ -207,7 +212,8 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
         boolean skipStore,
         boolean keepBinary,
         boolean clientReq,
-        boolean addDepInfo
+        boolean addDepInfo,
+        int maxEntryCnt
     ) {
         assert futVer != null;
 
@@ -232,7 +238,13 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
         this.clientReq = clientReq;
         this.addDepInfo = addDepInfo;
 
-        keys = new ArrayList<>();
+        // By default ArrayList expands to array of 10 elements on first add. We cannot guess how many entries
+        // will be added to request because of unknown affinity distribution. However, we DO KNOW how many keys
+        // participate in request. As such, we know upper bound of all collections in request. If this bound is lower
+        // than 10, we use it.
+        initSize = Math.min(maxEntryCnt, 10);
+
+        keys = new ArrayList<>(initSize);
     }
 
     /** {@inheritDoc} */
@@ -380,7 +392,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
 
         if (entryProcessor != null) {
             if (entryProcessors == null)
-                entryProcessors = new ArrayList<>();
+                entryProcessors = new ArrayList<>(initSize);
 
             entryProcessors.add(entryProcessor);
         }
@@ -388,7 +400,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
             assert val instanceof CacheObject : val;
 
             if (vals == null)
-                vals = new ArrayList<>();
+                vals = new ArrayList<>(initSize);
 
             vals.add((CacheObject)val);
         }
@@ -398,7 +410,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
         // In case there is no conflict, do not create the list.
         if (conflictVer != null) {
             if (conflictVers == null) {
-                conflictVers = new ArrayList<>();
+                conflictVers = new ArrayList<>(initSize);
 
                 for (int i = 0; i < keys.size() - 1; i++)
                     conflictVers.add(null);


[12/49] ignite git commit: Fixed 'misses' cache metric

Posted by nt...@apache.org.
Fixed 'misses' cache metric


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

Branch: refs/heads/ignite-2435
Commit: f9868d44757df79706b2d7c0a60acd1546ce8e8d
Parents: 457e8c1
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Wed Jan 27 19:49:37 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Wed Jan 27 19:49:37 2016 -0800

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/CacheMetricsSnapshot.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f9868d44/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
index fc7e9a7..1971d5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
@@ -353,7 +353,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
             reads += e.getCacheGets();
             puts += e.getCachePuts();
             hits += e.getCacheHits();
-            misses += e.getCacheHits();
+            misses += e.getCacheMisses();
             txCommits += e.getCacheTxCommits();
             txRollbacks += e.getCacheTxRollbacks();
             evicts += e.getCacheEvictions();
@@ -966,4 +966,4 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
         writeBehindCriticalOverflowCnt = in.readInt();
         writeBehindErrorRetryCnt = in.readInt();
     }
-}
\ No newline at end of file
+}


[15/49] ignite git commit: IGNITE-1355 - Fixed potential NPE in CacheAffinityProxy - Fixes #263.

Posted by nt...@apache.org.
IGNITE-1355 - Fixed potential NPE in CacheAffinityProxy - Fixes #263.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-2435
Commit: 550a4ea7eab41a3d27ff29d1e3a8df09d698524a
Parents: a34d705
Author: ashutak <as...@gridgain.com>
Authored: Thu Jan 28 12:20:21 2016 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Jan 28 12:20:21 2016 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++--
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 +++++++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 29 files changed, 499 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
index 2ec0620..c059ced 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
@@ -22,10 +22,10 @@ import java.util.Collection;
 import java.util.Map;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCluster;
 import org.apache.ignite.IgniteCompute;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.examples.ExampleNodeStartup;
 import org.apache.ignite.lang.IgniteRunnable;
@@ -103,7 +103,7 @@ public final class CacheAffinityExample {
     }
 
     /**
-     * Collocates jobs with keys they need to work on using {@link IgniteCluster#mapKeysToNodes(String, Collection)}
+     * Collocates jobs with keys they need to work on using {@link Affinity#mapKeysToNodes(Collection)}
      * method. The difference from {@code affinityRun(...)} method is that here we process multiple keys
      * in a single job.
      */
@@ -116,7 +116,7 @@ public final class CacheAffinityExample {
             keys.add(i);
 
         // Map all keys to nodes.
-        Map<ClusterNode, Collection<Integer>> mappings = ignite.cluster().mapKeysToNodes(CACHE_NAME, keys);
+        Map<ClusterNode, Collection<Integer>> mappings = ignite.<Integer>affinity(CACHE_NAME).mapKeysToNodes(keys);
 
         for (Map.Entry<ClusterNode, Collection<Integer>> mapping : mappings.entrySet()) {
             ClusterNode node = mapping.getKey();
@@ -139,4 +139,4 @@ public final class CacheAffinityExample {
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java b/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
index fbf348f..2867bf1 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
@@ -22,11 +22,11 @@ import java.util.Collection;
 import java.util.Map;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCluster;
 import org.apache.ignite.IgniteCompute;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.examples.ExampleNodeStartup;
@@ -105,7 +105,7 @@ public final class CacheAffinityExample {
     }
 
     /**
-     * Collocates jobs with keys they need to work on using {@link IgniteCluster#mapKeysToNodes(String, Collection)}
+     * Collocates jobs with keys they need to work on using {@link Affinity#mapKeysToNodes(Collection)}
      * method. The difference from {@code affinityRun(...)} method is that here we process multiple keys
      * in a single job.
      */
@@ -118,7 +118,7 @@ public final class CacheAffinityExample {
             keys.add(i);
 
         // Map all keys to nodes.
-        Map<ClusterNode, Collection<Integer>> mappings = ignite.cluster().mapKeysToNodes(CACHE_NAME, keys);
+        Map<ClusterNode, Collection<Integer>> mappings = ignite.<Integer>affinity(CACHE_NAME).mapKeysToNodes(keys);
 
         for (Map.Entry<ClusterNode, Collection<Integer>> mapping : mappings.entrySet()) {
             ClusterNode node = mapping.getKey();

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientGetAffinityTask.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientGetAffinityTask.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientGetAffinityTask.java
index 94367d1..509324a 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientGetAffinityTask.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientGetAffinityTask.java
@@ -50,7 +50,7 @@ public class ClientGetAffinityTask extends TaskSingleJobSplitAdapter<String, Int
         if ("null".equals(cacheName))
             cacheName = null;
 
-        ClusterNode node = ignite.cluster().mapKeyToNode(cacheName, affKey);
+        ClusterNode node = ignite.affinity(cacheName).mapKeyToNode(affKey);
 
         return node.id().toString();
     }
@@ -62,4 +62,4 @@ public class ClientGetAffinityTask extends TaskSingleJobSplitAdapter<String, Int
 
         return WAIT;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index 97701dd..23b03df 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentMap;
+import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.affinity.AffinityFunction;
 import org.apache.ignite.cluster.ClusterGroup;
 import org.apache.ignite.cluster.ClusterNode;
@@ -124,7 +125,9 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      * @param keys Cache keys to map to nodes.
      * @return Map of nodes to cache keys or empty map if there are no alive nodes for this cache.
      * @throws IgniteException If failed to map cache keys.
+     * @deprecated Use {@link Affinity#mapKeysToNodes(Collection)} instead.
      */
+    @Deprecated
     public <K> Map<ClusterNode, Collection<K>> mapKeysToNodes(@Nullable String cacheName,
         @Nullable Collection<? extends K> keys) throws IgniteException;
 
@@ -148,7 +151,9 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      * @return Primary node for the key or {@code null} if cache with given name
      *      is not present in the grid.
      * @throws IgniteException If failed to map key.
+     * @deprecated Use {@link Affinity#mapKeyToNode(Object)} instead.
      */
+    @Deprecated
     public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key) throws IgniteException;
 
     /**
@@ -343,4 +348,4 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
 
     /** {@inheritDoc} */
     @Override public IgniteCluster withAsync();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
index 28dc0ec..a5756e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
@@ -19,13 +19,14 @@ package org.apache.ignite.cache.affinity;
 
 import java.util.Collection;
 import java.util.Map;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Provides affinity information to detect which node is primary and which nodes are
  * backups for a partitioned cache. You can get an instance of this interface by calling
- * {@code Cache.affinity()} method.
+ * {@code Ignite.affinity(cacheName)} method.
  * <p>
  * Mapping of a key to a node is a three-step operation. First step will get an affinity key for given key
  * using {@link AffinityKeyMapper}. If mapper is not specified, the original key will be used. Second step
@@ -41,6 +42,7 @@ public interface Affinity<K> {
      * Gets number of partitions in cache according to configured affinity function.
      *
      * @return Number of cache partitions.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -52,6 +54,7 @@ public interface Affinity<K> {
      *
      * @param key Key to get partition id for.
      * @return Partition id.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -64,6 +67,7 @@ public interface Affinity<K> {
      * @param n Node to check.
      * @param key Key to check.
      * @return {@code True} if local node is the primary node for given key.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public boolean isPrimary(ClusterNode n, K key);
 
@@ -73,6 +77,7 @@ public interface Affinity<K> {
      * @param n Node to check.
      * @param key Key to check.
      * @return {@code True} if local node is one of the backup nodes for given key.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public boolean isBackup(ClusterNode n, K key);
 
@@ -86,6 +91,7 @@ public interface Affinity<K> {
      * @param n Node to check.
      * @param key Key to check.
      * @return {@code True} if local node is primary or backup for given key.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public boolean isPrimaryOrBackup(ClusterNode n, K key);
 
@@ -94,6 +100,7 @@ public interface Affinity<K> {
      *
      * @param n Cluster node.
      * @return Partition ids for which given cluster node has primary ownership.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -105,6 +112,7 @@ public interface Affinity<K> {
      *
      * @param n Cluster node.
      * @return Partition ids for which given cluster node has backup ownership.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -117,6 +125,7 @@ public interface Affinity<K> {
      *
      * @param n Cluster node.
      * @return Partition ids for which given cluster node has any ownership, primary or backup.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -132,6 +141,7 @@ public interface Affinity<K> {
      * @param key Key to map.
      * @return Key to be used for node-to-affinity mapping (may be the same
      *      key as passed in).
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public Object affinityKey(K key);
 
@@ -151,7 +161,8 @@ public interface Affinity<K> {
      * </ul>
      *
      * @param keys Keys to map to nodes.
-     * @return Map of nodes to keys or empty map if there are no alive nodes for this cache.
+     * @return Map of nodes to keys.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public Map<ClusterNode, Collection<K>> mapKeysToNodes(Collection<? extends K> keys);
 
@@ -171,7 +182,8 @@ public interface Affinity<K> {
      * </ul>
      *
      * @param key Keys to map to a node.
-     * @return Primary node for the key or {@code null} if there are no alive nodes for this cache.
+     * @return Primary node for the key.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     @Nullable public ClusterNode mapKeyToNode(K key);
 
@@ -182,6 +194,7 @@ public interface Affinity<K> {
      * @param key Key to get affinity nodes for.
      * @return Collection of primary and backup nodes for the key with primary node
      *      always first.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public Collection<ClusterNode> mapKeyToPrimaryAndBackups(K key);
 
@@ -190,6 +203,7 @@ public interface Affinity<K> {
      *
      * @param part Partition id.
      * @return Primary node for the given partition.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -201,6 +215,7 @@ public interface Affinity<K> {
      *
      * @param parts Partition ids.
      * @return Mapping of given partitions to their primary nodes.
+     * @throws IgniteException If there are no alive nodes for this cache.
      * @see AffinityFunction
      * @see org.apache.ignite.configuration.CacheConfiguration#getAffinity()
      * @see org.apache.ignite.configuration.CacheConfiguration#setAffinity(AffinityFunction)
@@ -214,6 +229,7 @@ public interface Affinity<K> {
      * @param part Partition to get affinity nodes for.
      * @return Collection of primary and backup nodes for partition with primary node
      *      always first.
+     * @throws IgniteException If there are no alive nodes for this cache.
      */
     public Collection<ClusterNode> mapPartitionToPrimaryAndBackups(int part);
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index 90306b0..8a0194c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -178,7 +178,8 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
      * @return Picked node.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key, AffinityTopologyVersion topVer) throws IgniteCheckedException {
+    @Nullable public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key,
+        AffinityTopologyVersion topVer) throws IgniteCheckedException {
         Map<ClusterNode, Collection<K>> map = keysToNodes(cacheName, F.asList(key), topVer);
 
         return map != null ? F.first(map.keySet()) : null;
@@ -209,20 +210,6 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Map single key to primary and backup nodes.
-     *
-     * @param cacheName Cache name.
-     * @param key Key to map.
-     * @return Affinity nodes, primary first.
-     * @throws IgniteCheckedException If failed.
-     */
-    public <K> List<ClusterNode> mapKeyToPrimaryAndBackups(@Nullable String cacheName, K key)
-        throws IgniteCheckedException
-    {
-        return mapKeyToPrimaryAndBackups(cacheName, key, ctx.discovery().topologyVersionEx());
-    }
-
-    /**
      * Gets affinity key for cache key.
      *
      * @param cacheName Cache name.
@@ -318,7 +305,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
             if (cache == null)
                 return null;
 
-            GridCacheContext<Object,Object> cctx = cache.context();
+            GridCacheContext<Object, Object> cctx = cache.context();
 
             cctx.awaitStarted();
 
@@ -424,8 +411,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Requests {@link AffinityFunction} and
-     * {@link AffinityKeyMapper} from remote node.
+     * Requests {@link AffinityFunction} and {@link AffinityKeyMapper} from remote node.
      *
      * @param cacheName Name of cache on which affinity is requested.
      * @param topVer Topology version.
@@ -518,7 +504,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
      */
     private <K> List<ClusterNode> primaryAndBackups(AffinityInfo aff, K key) {
         if (key instanceof CacheObject && !(key instanceof BinaryObject))
-            key = ((CacheObject) key).value(aff.cacheObjCtx, false);
+            key = ((CacheObject)key).value(aff.cacheObjCtx, false);
 
         int part = aff.affFunc.partition(aff.mapper.affinityKey(key));
 
@@ -801,7 +787,12 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
             ctx.gateway().readLock();
 
             try {
-                return GridAffinityProcessor.this.mapKeysToNodes(cacheName, keys);
+                if (F.isEmpty(keys))
+                    return Collections.emptyMap();
+
+                AffinityInfo affInfo = cache();
+
+                return affinityMap(affInfo, keys);
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException(e);
@@ -813,10 +804,16 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Nullable @Override public ClusterNode mapKeyToNode(K key) {
+            A.notNull(key, "key");
+
             ctx.gateway().readLock();
 
             try {
-                return GridAffinityProcessor.this.mapKeyToNode(cacheName, key);
+                AffinityInfo affInfo = cache();
+
+                Map<ClusterNode, Collection<K>> map = affinityMap(affInfo, Collections.singletonList(key));
+
+                return F.first(map.keySet());
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException(e);
@@ -880,9 +877,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
             ctx.gateway().readLock();
 
             try {
-                AffinityInfo cache = cache();
-
-                return cache != null ? cache.assignment().get(part) : Collections.<ClusterNode>emptyList();
+                return cache().assignment().get(part);
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException(e);
@@ -896,15 +891,14 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
          * @return Affinity info for current topology version.
          * @throws IgniteCheckedException If failed.
          */
-        @Nullable private AffinityInfo cache() throws IgniteCheckedException {
-            return affinityCache(cacheName, new AffinityTopologyVersion(topologyVersion()));
-        }
+        private AffinityInfo cache() throws IgniteCheckedException {
+            AffinityInfo aff = affinityCache(cacheName, ctx.discovery().topologyVersionEx());
 
-        /**
-         * @return Topology version.
-         */
-        private long topologyVersion() {
-            return ctx.discovery().topologyVersion();
+            if (aff == null)
+                throw new IgniteException("Failed to find cache (cache was not started " +
+                    "yet or cache was already stopped): " + cacheName);
+
+            return aff;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index eddffea..375219a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -23,6 +23,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException;
@@ -42,6 +43,10 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
     /** */
     private static final AffinityTopologyVersion TOP_FIRST = new AffinityTopologyVersion(1);
 
+    /** */
+    public static final String FAILED_TO_FIND_CACHE_ERR_MSG = "Failed to find cache (cache was not started " +
+        "yet or cache was already stopped): ";
+
     /** Affinity cached function. */
     private GridAffinityAssignmentCache aff;
 
@@ -189,7 +194,12 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
      * @return Partition count.
      */
     public int partitions() {
-        return aff.partitions();
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.partitions();
     }
 
     /**
@@ -201,7 +211,12 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
      * @return Partition.
      */
     public int partition(Object key) {
-        return aff.partition(key);
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.partition(key);
     }
 
     /**
@@ -222,7 +237,12 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
         if (cctx.isLocal())
             topVer = new AffinityTopologyVersion(1);
 
-        return aff.nodes(part, topVer);
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.nodes(part, topVer);
     }
 
     /**
@@ -363,7 +383,12 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
         if (cctx.isLocal())
             topVer = new AffinityTopologyVersion(1);
 
-        return aff.primaryPartitions(nodeId, topVer);
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.primaryPartitions(nodeId, topVer);
     }
 
     /**
@@ -375,14 +400,24 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
         if (cctx.isLocal())
             topVer = new AffinityTopologyVersion(1);
 
-        return aff.backupPartitions(nodeId, topVer);
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.backupPartitions(nodeId, topVer);
     }
 
     /**
      * @return Affinity-ready topology version.
      */
     public AffinityTopologyVersion affinityTopologyVersion() {
-        return aff.lastVersion();
+        GridAffinityAssignmentCache aff0 = aff;
+
+        if (aff0 == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return aff0.lastVersion();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
index b9045e9..3bc71fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -23,12 +23,15 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
@@ -39,6 +42,10 @@ import org.jetbrains.annotations.Nullable;
  * Affinity interface implementation.
  */
 public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
+    /** */
+    public static final String FAILED_TO_FIND_CACHE_ERR_MSG = "Failed to find cache (cache was not started " +
+        "yet or cache was already stopped): ";
+
     /** Cache context. */
     private GridCacheContext<K, V> cctx;
 
@@ -56,7 +63,12 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
 
     /** {@inheritDoc} */
     @Override public int partitions() {
-        return cctx.config().getAffinity().partitions();
+        CacheConfiguration ccfg = cctx.config();
+
+        if (ccfg == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+        return ccfg.getAffinity().partitions();
     }
 
     /** {@inheritDoc} */
@@ -151,10 +163,21 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
     @Override public Object affinityKey(K key) {
         A.notNull(key, "key");
 
-        if (key instanceof CacheObject && !(key instanceof BinaryObject))
-            key = ((CacheObject)key).value(cctx.cacheObjectContext(), false);
+        if (key instanceof CacheObject && !(key instanceof BinaryObject)) {
+            CacheObjectContext ctx = cctx.cacheObjectContext();
+
+            if (ctx == null)
+                throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
+
+            key = ((CacheObject)key).value(ctx, false);
+        }
+
+        CacheConfiguration ccfg = cctx.config();
+
+        if (ccfg == null)
+            throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name());
 
-        return cctx.config().getAffinityMapper().affinityKey(key);
+        return ccfg.getAffinityMapper().affinityKey(key);
     }
 
     /** {@inheritDoc} */
@@ -178,17 +201,18 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
         for (K key : keys) {
             ClusterNode primary = cctx.affinity().primary(key, topVer);
 
-            if (primary != null) {
-                Collection<K> mapped = res.get(primary);
+            if (primary == null)
+                throw new IgniteException("Failed to get primare node [topVer=" + topVer + ", key=" + key + ']');
 
-                if (mapped == null) {
-                    mapped = new ArrayList<>(Math.max(keys.size() / nodesCnt, 16));
+            Collection<K> mapped = res.get(primary);
 
-                    res.put(primary, mapped);
-                }
+            if (mapped == null) {
+                mapped = new ArrayList<>(Math.max(keys.size() / nodesCnt, 16));
 
-                mapped.add(key);
+                res.put(primary, mapped);
             }
+
+            mapped.add(key);
         }
 
         return res;
@@ -216,4 +240,4 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
     private AffinityTopologyVersion topologyVersion() {
         return cctx.affinity().affinityTopologyVersion();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java
index 777f843..099afd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java
@@ -109,18 +109,18 @@ public class GridAffinityMappedTest extends GridCommonAbstractTest {
         //Key 0 is mapped to partition 0, first node.
         //Key 1 is mapped to partition 1, second node.
         //key 2 is mapped to partition 0, first node because mapper substitutes key 2 with affinity key 0.
-        Map<ClusterNode, Collection<Integer>> map = g1.cluster().mapKeysToNodes(null, F.asList(0));
+        Map<ClusterNode, Collection<Integer>> map = g1.<Integer>affinity(null).mapKeysToNodes(F.asList(0));
 
         assertNotNull(map);
         assertEquals("Invalid map size: " + map.size(), 1, map.size());
         assertEquals(F.first(map.keySet()), first);
 
-        UUID id1 = g1.cluster().mapKeyToNode(null, 1).id();
+        UUID id1 = g1.affinity(null).mapKeyToNode(1).id();
 
         assertNotNull(id1);
         assertEquals(second.id(),  id1);
 
-        UUID id2 = g1.cluster().mapKeyToNode(null, 2).id();
+        UUID id2 = g1.affinity(null).mapKeyToNode(2).id();
 
         assertNotNull(id2);
         assertEquals(first.id(),  id2);
@@ -163,4 +163,4 @@ public class GridAffinityMappedTest extends GridCommonAbstractTest {
             // This mapper is stateless and needs no initialization logic.
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java
new file mode 100644
index 0000000..6fb1280
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java
@@ -0,0 +1,290 @@
+/*
+ * 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;
+
+import java.nio.ByteBuffer;
+import java.util.Collections;
+import java.util.concurrent.Callable;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cache.affinity.Affinity;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectContext;
+import org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl;
+import org.apache.ignite.internal.util.typedef.internal.A;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Tests usage of affinity in case when cache doesn't exist.
+ */
+public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest {
+    /** */
+    public static final String EXPECTED_MSG = "Failed to find cache";
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        startGrids(2);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+
+        super.afterTestsStopped();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAffinityProxyNoCache() throws Exception {
+        checkAffinityProxyNoCache(new Object());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAffinityProxyNoCacheCacheObject() throws Exception {
+        checkAffinityProxyNoCache(new TestCacheObject(new Object()));
+    }
+
+    /**
+     * @param key Key.
+     */
+    private void checkAffinityProxyNoCache(Object key) {
+        IgniteEx ignite = grid(0);
+
+        final Affinity<Object> affinity = ignite.affinity("noCache");
+
+        assertFalse("Affinity proxy instance expected", affinity instanceof GridCacheAffinityImpl);
+
+        final ClusterNode n = ignite.cluster().localNode();
+
+        assertAffinityMethodsException(affinity, key, n);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAffinityImplCacheDeleted() throws Exception {
+        checkAffinityImplCacheDeleted(new Object());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAffinityImplCacheDeletedCacheObject() throws Exception {
+        checkAffinityImplCacheDeleted(new TestCacheObject(new Object()));
+    }
+
+    /**
+     * @param key Key.
+     */
+    private void checkAffinityImplCacheDeleted(Object key) {
+        IgniteEx grid = grid(0);
+
+        final String cacheName = "cacheToBeDeleted";
+
+        grid(1).getOrCreateCache(cacheName);
+
+        Affinity<Object> affinity = grid.affinity(cacheName);
+
+        assertTrue(affinity instanceof GridCacheAffinityImpl);
+
+        final ClusterNode n = grid.cluster().localNode();
+
+        grid.cache(cacheName).destroy();
+
+        assertAffinityMethodsException(affinity, key, n);
+    }
+
+    /**
+     * @param affinity Affinity.
+     * @param key Key.
+     * @param n Node.
+     */
+    private void assertAffinityMethodsException(final Affinity<Object> affinity, final Object key,
+        final ClusterNode n) {
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.affinityKey(key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.allPartitions(n);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.backupPartitions(n);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.isBackup(n, key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.isPrimary(n, key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.isPrimaryOrBackup(n, key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapKeysToNodes(Collections.singleton(key));
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapKeyToPrimaryAndBackups(key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapPartitionsToNodes(Collections.singleton(0));
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapPartitionToNode(0);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapPartitionToPrimaryAndBackups(0);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.mapKeyToNode(key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.partition(key);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.partitions();
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                return affinity.primaryPartitions(n);
+            }
+        }, IgniteException.class, EXPECTED_MSG);
+    }
+
+    /**
+     */
+    private static class TestCacheObject implements CacheObject {
+        /** */
+        private Object val;
+
+        /**
+         * @param val Value.
+         */
+        private TestCacheObject(Object val) {
+            this.val = val;
+        }
+
+        /** {@inheritDoc} */
+        @Nullable @Override public <T> T value(CacheObjectContext ctx, boolean cpy) {
+            A.notNull(ctx, "ctx");
+
+            return (T)val;
+        }
+
+        /** {@inheritDoc} */
+        @Override public byte[] valueBytes(CacheObjectContext ctx) throws IgniteCheckedException {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public byte cacheObjectType() {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean isPlatformType() {
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        @Override public CacheObject prepareForCache(CacheObjectContext ctx) {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void finishUnmarshal(CacheObjectContext ctx, ClassLoader ldr) throws IgniteCheckedException {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void prepareMarshal(CacheObjectContext ctx) throws IgniteCheckedException {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public byte directType() {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public byte fieldsCount() {
+            throw new UnsupportedOperationException();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java
index f96b6c6..e42c4fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java
@@ -176,13 +176,13 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest {
             //Key 0 is mapped to partition 0, first node.
             //Key 1 is mapped to partition 1, second node.
             //key 2 is mapped to partition 0, first node because mapper substitutes key 2 with affinity key 0.
-            Map<ClusterNode, Collection<Integer>> map = g1.cluster().mapKeysToNodes(null, F.asList(0));
+            Map<ClusterNode, Collection<Integer>> map = g1.<Integer>affinity(null).mapKeysToNodes(F.asList(0));
 
             assertNotNull(map);
             assertEquals("Invalid map size: " + map.size(), 1, map.size());
             assertEquals(F.first(map.keySet()), first);
 
-            ClusterNode n1 = g1.cluster().mapKeyToNode(null, 1);
+            ClusterNode n1 = g1.affinity(null).mapKeyToNode(1);
 
             assertNotNull(n1);
 
@@ -191,7 +191,7 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest {
             assertNotNull(id1);
             assertEquals(second.id(), id1);
 
-            ClusterNode n2 = g1.cluster().mapKeyToNode(null, 2);
+            ClusterNode n2 = g1.affinity(null).mapKeyToNode(2);
 
             assertNotNull(n2);
 
@@ -206,4 +206,4 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest {
             stopGrid(3);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java
index 4c0e2e0..0515685 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java
@@ -91,18 +91,18 @@ public class GridAffinitySelfTest extends GridCommonAbstractTest {
         assert caches(g1).size() == 0;
         assert F.first(caches(g2)).getCacheMode() == PARTITIONED;
 
-        Map<ClusterNode, Collection<String>> map = g1.cluster().mapKeysToNodes(null, F.asList("1"));
+        Map<ClusterNode, Collection<String>> map = g1.<String>affinity(null).mapKeysToNodes(F.asList("1"));
 
         assertNotNull(map);
         assertEquals("Invalid map size: " + map.size(), 1, map.size());
         assertEquals(F.first(map.keySet()), g2.cluster().localNode());
 
-        UUID id1 = g1.cluster().mapKeyToNode(null, "2").id();
+        UUID id1 = g1.affinity(null).mapKeyToNode("2").id();
 
         assertNotNull(id1);
         assertEquals(g2.cluster().localNode().id(), id1);
 
-        UUID id2 = g1.cluster().mapKeyToNode(null, "3").id();
+        UUID id2 = g1.affinity(null).mapKeyToNode("3").id();
 
         assertNotNull(id2);
         assertEquals(g2.cluster().localNode().id(), id2);
@@ -120,4 +120,4 @@ public class GridAffinitySelfTest extends GridCommonAbstractTest {
             }
         });
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 1e0071e..93ff515 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -325,7 +325,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             map.put("key" + i, i);
 
         // Put in primary nodes to avoid near readers which will prevent entry from being cleared.
-        Map<ClusterNode, Collection<String>> mapped = grid(0).cluster().mapKeysToNodes(null, map.keySet());
+        Map<ClusterNode, Collection<String>> mapped = grid(0).<String>affinity(null).mapKeysToNodes(map.keySet());
 
         for (int i = 0; i < gridCount(); i++) {
             Collection<String> keys = mapped.get(grid(i).localNode());
@@ -338,7 +338,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         map.remove("key0");
 
-        mapped = grid(0).cluster().mapKeysToNodes(null, map.keySet());
+        mapped = grid(0).<String>affinity(null).mapKeysToNodes(map.keySet());
 
         for (int i = 0; i < gridCount(); i++) {
             // Will actually delete entry from map.

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
index a89403d..34a74eb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
@@ -276,8 +276,8 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public void applyx() throws IgniteCheckedException {
-            assert ignite.cluster().localNode().id().equals(ignite.cluster().mapKeyToNode(null, affKey).id());
-            assert ignite.cluster().localNode().id().equals(ignite.cluster().mapKeyToNode(null, key).id());
+            assert ignite.cluster().localNode().id().equals(ignite.affinity(null).mapKeyToNode(affKey).id());
+            assert ignite.cluster().localNode().id().equals(ignite.affinity(null).mapKeyToNode(key).id());
         }
     }
 
@@ -412,10 +412,10 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object call() throws IgniteCheckedException {
-            assert ignite.cluster().localNode().id().equals(ignite.cluster().mapKeyToNode(null, affKey).id());
-            assert ignite.cluster().localNode().id().equals(ignite.cluster().mapKeyToNode(null, key).id());
+            assert ignite.cluster().localNode().id().equals(ignite.affinity(null).mapKeyToNode(affKey).id());
+            assert ignite.cluster().localNode().id().equals(ignite.affinity(null).mapKeyToNode(key).id());
 
             return null;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 45c8c2c..69445ea 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -228,7 +228,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
                     String terminalId = String.valueOf(++tid);
 
                     // Server partition cache
-                    UUID mappedId = srvr1.cluster().mapKeyToNode(null, terminalId).id();
+                    UUID mappedId = srvr1.affinity(null).mapKeyToNode(terminalId).id();
 
                     if (!srvrId.equals(mappedId))
                         continue;
@@ -840,4 +840,4 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
             return null;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
index 73454b8..7d209c6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
@@ -19,8 +19,10 @@ package org.apache.ignite.internal.processors.cache;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.Callable;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -28,6 +30,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
@@ -167,18 +170,24 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst
             // Start daemon node.
             daemon = true;
 
-            Ignite g2 = startGrid(4);
+            final Ignite g2 = startGrid(4);
 
             for (long i = 0; i < Integer.MAX_VALUE; i = (i << 1) + 1) {
                 // Call mapKeyToNode for normal node.
-                assertNotNull(g1.cluster().mapKeyToNode(null, i));
+                assertNotNull(g1.<Long>affinity(null).mapKeyToNode(i));
 
                 // Call mapKeyToNode for daemon node.
-                assertNull(g2.cluster().mapKeyToNode(null, i));
+                final long i0 = i;
+
+                GridTestUtils.assertThrows(log, new Callable<Object>() {
+                    @Override public Object call() throws Exception {
+                        return g2.<Long>affinity(null).mapKeyToNode(i0);
+                    }
+                }, IgniteException.class, "Failed to find cache");
             }
         }
         finally {
             stopAllGrids();
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
index 613e98c..db6c882 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -158,7 +158,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < 1000; i++) {
                 key = "1" + i;
 
-                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id()))
+                if (g1.affinity(null).mapKeyToNode(key).id().equals(g2.cluster().localNode().id()))
                     break;
             }
 
@@ -193,7 +193,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < 1000; i++) {
                 key = "1" + i;
 
-                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id()))
+                if (g1.affinity(null).mapKeyToNode(key).id().equals(g2.cluster().localNode().id()))
                     break;
             }
 
@@ -352,7 +352,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < 1000; i++) {
                 key = "1" + i;
 
-                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id()))
+                if (g1.affinity(null).mapKeyToNode(key).id().equals(g2.cluster().localNode().id()))
                     break;
             }
 
@@ -385,7 +385,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < 1000; i++) {
                 key = "1" + i;
 
-                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id()))
+                if (g1.affinity(null).mapKeyToNode(key).id().equals(g2.cluster().localNode().id()))
                     break;
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
index 0e92f50..9e3ea7b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
@@ -217,7 +217,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
                 while (true) {
                     key++;
 
-                    if (grid(0).cluster().mapKeyToNode(null, key).equals(grid(0).localNode())) {
+                    if (grid(0).affinity(null).mapKeyToNode(key).equals(grid(0).localNode())) {
                         if (i > 0)
                             jcache(0).put(key, new Value(new byte[i * 1024]));
 
@@ -271,7 +271,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
                 while (true) {
                     key++;
 
-                    if (grid(0).cluster().mapKeyToNode(null, key).equals(grid(0).localNode())) {
+                    if (grid(0).affinity(null).mapKeyToNode(key).equals(grid(0).localNode())) {
                         if (i > 0)
                             jcache(0).put(key, new Value(new byte[i * 1024]));
 
@@ -346,4 +346,4 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
             return arr != null ? Arrays.hashCode(arr) : 0;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
index be555fb..7d2b550 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
@@ -88,7 +88,7 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb
         Ignite g1 = grid(1);
 
         for (int i = 0; i < 100; i++)
-            assertEquals(g0.cluster().mapKeyToNode(null, i).id(), g1.cluster().mapKeyToNode(null, i).id());
+            assertEquals(g0.affinity(null).mapKeyToNode(i).id(), g1.affinity(null).mapKeyToNode(i).id());
     }
 
     /** @throws Exception If failed. */
@@ -105,8 +105,8 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb
             g1.cluster().forNodeIds(F.asList(g0.cluster().localNode().id(), g1.cluster().localNode().id()));
 
         for (int i = 0; i < 100; i++)
-            assertEquals(g0Pinned.ignite().cluster().mapKeyToNode(null, i).id(),
-                g01Pinned.ignite().cluster().mapKeyToNode(null, i).id());
+            assertEquals(g0Pinned.ignite().affinity(null).mapKeyToNode(i).id(),
+                g01Pinned.ignite().affinity(null).mapKeyToNode(i).id());
     }
 
     /** @throws Exception If failed. */
@@ -114,4 +114,4 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb
     private void waitTopologyUpdate() throws Exception {
         GridTestUtils.waitTopologyUpdate(null, BACKUPS, log());
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
index 0c0d9c1..b48bbc7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -303,7 +303,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
 
         try {
             // Dummy call to fetch affinity function from remote node
-            master.cluster().mapKeyToNode(CACHE_NAME, "Dummy");
+            master.affinity(CACHE_NAME).mapKeyToNode("Dummy");
 
             Random rnd = new Random();
 
@@ -517,7 +517,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
             IgniteCompute comp = compute(master.cluster().forPredicate(workerNodesFilter)).withAsync();
 
             for (Integer key : testKeys) {
-                ClusterNode mappedNode = master.cluster().mapKeyToNode(CACHE_NAME, key);
+                ClusterNode mappedNode = master.affinity(CACHE_NAME).mapKeyToNode(key);
 
                 UUID nodeId = mappedNode.id();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java
index 03b8af0..e1e5315 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java
@@ -70,7 +70,7 @@ public class GridCacheDhtMultiBackupTest extends GridCommonAbstractTest {
             for (int key = 0; key < 1000; key++) {
                 SampleKey key1 = new SampleKey(key);
 
-                if (!g.cluster().localNode().id().equals(g.cluster().mapKeyToNode("partitioned", key1).id())) {
+                if (!g.cluster().localNode().id().equals(g.affinity("partitioned").mapKeyToNode(key1).id())) {
                     cache.put(key1, new SampleValue(key));
 
                     cnt++;
@@ -133,4 +133,4 @@ public class GridCacheDhtMultiBackupTest extends GridCommonAbstractTest {
             return obj instanceof SampleValue && ((SampleValue)obj).val == val;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java
index 72c2ae8..c7e53e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java
@@ -148,7 +148,7 @@ public class GridCacheNearOnlyTopologySelfTest extends GridCommonAbstractTest {
             Ignite compute = startGrid(4);
 
             for (int i = 0; i < 100; i++) {
-                ClusterNode node = compute.cluster().mapKeyToNode(null, i);
+                ClusterNode node = compute.affinity(null).mapKeyToNode(i);
 
                 assertFalse("For key: " + i, node.id().equals(compute.cluster().localNode().id()));
                 assertFalse("For key: " + i, node.id().equals(grid(0).localNode().id()));
@@ -250,4 +250,4 @@ public class GridCacheNearOnlyTopologySelfTest extends GridCommonAbstractTest {
             stopAllGrids();
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
index 1b28a4a..c246049 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
@@ -104,7 +104,7 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest {
         try {
             Integer mainKey = 0;
 
-            ClusterNode priNode = ignite.cluster().mapKeyToNode(null, mainKey);
+            ClusterNode priNode = ignite.affinity(null).mapKeyToNode(mainKey);
             ClusterNode backupNode = F.first(F.view(ignite.affinity(null).mapKeyToPrimaryAndBackups(mainKey),
                 F.notIn(F.asList(priNode))));
             ClusterNode otherNode = F.first(ignite.cluster().forPredicate(F.notIn(F.asList(priNode, backupNode))).nodes());
@@ -250,4 +250,4 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest {
         for (IgniteInternalTx tx : txs)
             assert tx.done() : "Transaction is not finished: " + tx;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
index 068f2ed..a7eaa33 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
@@ -92,10 +92,10 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom
 
         Integer key = 0;
 
-        while (grid(idx).cluster().mapKeyToNode(null, key).id().equals(grid(0).localNode().id()))
+        while (grid(idx).affinity(null).mapKeyToNode(key).id().equals(grid(0).localNode().id()))
             key++;
 
-        ClusterNode node = grid(idx).cluster().mapKeyToNode(null, key);
+        ClusterNode node = grid(idx).affinity(null).mapKeyToNode(key);
 
         info("Primary node for key [id=" + node.id() + ", order=" + node.order() + ", key=" + key + ']');
 
@@ -158,4 +158,4 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom
             break;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index db59a7f..5abb98d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -70,10 +70,10 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
+
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -581,7 +581,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             int key = 0;
 
             while (true) {
-                ClusterNode n = grid(0).cluster().mapKeyToNode(null, key);
+                ClusterNode n = grid(0).affinity(null).mapKeyToNode(key);
 
                 assert n != null;
 
@@ -655,7 +655,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             int key = 0;
 
             while (true) {
-                ClusterNode n = grid(0).cluster().mapKeyToNode(null, key);
+                ClusterNode n = grid(0).affinity(null).mapKeyToNode(key);
 
                 assert n != null;
 
@@ -741,7 +741,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             int key = 0;
 
             while (true) {
-                ClusterNode n = grid(0).cluster().mapKeyToNode(null, key);
+                ClusterNode n = grid(0).affinity(null).mapKeyToNode(key);
 
                 assert n != null;
 
@@ -1117,4 +1117,4 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             // No-op.
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
index 2f40c8b..8383a18 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
@@ -214,7 +214,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest {
         while (true) {
             affKey = new IgniteUuid(uuid, idx);
 
-            if (grid(0).cluster().mapKeyToNode(DATA_CACHE_NAME, affKey).id().equals(grid(0).localNode().id()))
+            if (grid(0).affinity(DATA_CACHE_NAME).mapKeyToNode(affKey).id().equals(grid(0).localNode().id()))
                 break;
 
             idx++;
@@ -488,4 +488,4 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest {
                 "[size=%7d, rate=%3.1f MB/sec]", expSize, expSize * 1000. / time / 1024 / 1024));
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiClient.java b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiClient.java
index 2c8e6c4..a065580 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiClient.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiClient.java
@@ -272,7 +272,7 @@ public class GridDsiClient implements Callable {
                             String terminalId = String.valueOf(++tid);
 
                             // Server partition cache.
-                            if (!srvrId.equals(g.cluster().mapKeyToNode("PARTITIONED_CACHE", terminalId).id()))
+                            if (!srvrId.equals(g.affinity("PARTITIONED_CACHE").mapKeyToNode(terminalId).id()))
                                 continue;
 
                             if (terminalsPerSrv < srvMaxNoTerminals) {
@@ -428,4 +428,4 @@ public class GridDsiClient implements Callable {
             fileLock.close();
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
index 3214a3a..f600e99 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
@@ -110,7 +110,7 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest {
 
         Ignite ignite2 = startGridWithSpi(2, new TestCommunicationSpi(GridNearUnlockRequest.class, 1000));
 
-        if (!ignite1.cluster().mapKeyToNode(null, kv).id().equals(ignite1.cluster().localNode().id())) {
+        if (!ignite1.affinity(null).mapKeyToNode(kv).id().equals(ignite1.cluster().localNode().id())) {
             Ignite tmp = ignite1;
             ignite1 = ignite2;
             ignite2 = tmp;
@@ -287,4 +287,4 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest {
             super.notifyListener(sndId, msg, msgC);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/550a4ea7/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
index e2c7e26..699ad0c 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
@@ -19,6 +19,7 @@ package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
 import org.apache.ignite.internal.ClusterNodeMetricsSelfTest;
+import org.apache.ignite.internal.GridAffinityNoCacheSelfTest;
 import org.apache.ignite.internal.GridAffinitySelfTest;
 import org.apache.ignite.internal.GridAlwaysFailoverSpiFailSelfTest;
 import org.apache.ignite.internal.GridCancelOnGridStopSelfTest;
@@ -137,6 +138,7 @@ public class IgniteComputeGridTestSuite {
         suite.addTestSuite(GridFailoverTaskWithPredicateSelfTest.class);
         suite.addTestSuite(GridProjectionLocalJobMultipleArgumentsSelfTest.class);
         suite.addTestSuite(GridAffinitySelfTest.class);
+        suite.addTestSuite(GridAffinityNoCacheSelfTest.class);
         suite.addTestSuite(GridEventStorageRuntimeConfigurationSelfTest.class);
         suite.addTestSuite(GridMultinodeRedeployContinuousModeSelfTest.class);
         suite.addTestSuite(GridMultinodeRedeploySharedModeSelfTest.class);
@@ -149,4 +151,4 @@ public class IgniteComputeGridTestSuite {
 
         return suite;
     }
-}
\ No newline at end of file
+}


[38/49] ignite git commit: IGNITE-1069 Added output of node type (server or client) in Visor commandline top command.

Posted by nt...@apache.org.
IGNITE-1069 Added output of node type (server or client) in Visor commandline top command.


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

Branch: refs/heads/ignite-2435
Commit: e5fda53ae5f0e64e63f97db9d664081d24b34fa7
Parents: c92c274
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Feb 1 10:08:21 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Feb 1 10:08:21 2016 +0700

----------------------------------------------------------------------
 .../apache/ignite/visor/commands/top/VisorTopologyCommand.scala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e5fda53a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
index 5e278ed..d2ec662 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
@@ -263,12 +263,13 @@ class VisorTopologyCommand extends VisorConsoleCommand {
 
         val hostsT = VisorTextTable()
 
-        hostsT #= ("Int./Ext. IPs", "Node ID8(@)", "OS", "CPUs", "MACs", "CPU Load")
+        hostsT #= ("Int./Ext. IPs", "Node ID8(@)","Node Type", "OS", "CPUs", "MACs", "CPU Load")
 
         neighborhood.foreach {
             case (_, neighbors) =>
                 var ips = Set.empty[String]
                 var id8s = List.empty[String]
+                var nodeTypes = List.empty[String]
                 var macs = Set.empty[String]
                 var cpuLoadSum = 0.0
 
@@ -287,6 +288,7 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 neighbors.foreach(n => {
                     id8s = id8s :+ (i.toString + ": " + nodeId8(n.id))
 
+                    nodeTypes = nodeTypes :+ (if (n.isClient) "Client" else "Server")
                     i += 1
 
                     ips = ips ++ n.addresses()
@@ -300,6 +302,7 @@ class VisorTopologyCommand extends VisorConsoleCommand {
                 hostsT += (
                     ips.toSeq,
                     id8s,
+                    nodeTypes,
                     os,
                     cpus,
                     macs.toSeq,


[30/49] ignite git commit: Merge branch 'master' into ignite-2498

Posted by nt...@apache.org.
Merge branch 'master' into ignite-2498


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

Branch: refs/heads/ignite-2435
Commit: 9103b201c4edf68b0fa75f05f5936e5ca637a0ac
Parents: 14a5f93 c081e3d
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 13:10:59 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 13:10:59 2016 +0300

----------------------------------------------------------------------
 modules/benchmarks/pom.xml                      |  2 +-
 .../jmh/cache/JmhCachePutBenchmark.java         |  2 +
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 18 +++++++
 .../GridServicePackagePrivateSelfTest.java      | 17 ++++---
 modules/docker/1.5.0.final/Dockerfile           | 40 ++++++++++++++++
 modules/docker/1.5.0.final/run.sh               | 50 ++++++++++++++++++++
 modules/docker/Dockerfile                       |  6 +--
 7 files changed, 125 insertions(+), 10 deletions(-)
----------------------------------------------------------------------



[46/49] ignite git commit: Merge branch 'ignite-2498'

Posted by nt...@apache.org.
Merge branch 'ignite-2498'


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

Branch: refs/heads/ignite-2435
Commit: 8eab48778467c09a3a89f5a46b88d82bb53b38b9
Parents: 732dd41 0dfb7a5
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Feb 1 15:09:35 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Feb 1 15:09:35 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     |  6 +--
 .../GridCacheDeploymentOffHeapSelfTest.java     |  4 +-
 ...ridCacheDeploymentOffHeapValuesSelfTest.java | 41 ++++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite3.java       |  2 +
 4 files changed, 48 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[41/49] ignite git commit: Fixed IGNITE-2419 Ignite on YARN do not handle memory overhead. This closes #414.

Posted by nt...@apache.org.
Fixed IGNITE-2419 Ignite on YARN do not handle memory overhead. This closes #414.


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

Branch: refs/heads/ignite-2435
Commit: 1945b98849cb52fc297c726fa79a270706135581
Parents: 5969129
Author: Edouard Chevalier <ed...@techmydata.net>
Authored: Mon Feb 1 07:34:59 2016 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Mon Feb 1 07:34:59 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   |  12 +-
 .../apache/ignite/yarn/ClusterProperties.java   | 144 +++++++++++--------
 .../yarn/IgniteApplicationMasterSelfTest.java   |  52 +++++++
 3 files changed, 140 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1945b988/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index 755e4e4..b9ab02d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -137,8 +137,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                             + "cp -r ./libs/* ./ignite/*/libs/ || true && "
                             + "./ignite/*/bin/ignite.sh "
                             + "./ignite-config.xml"
-                            + " -J-Xmx" + c.getResource().getMemory() + "m"
-                            + " -J-Xms" + c.getResource().getMemory() + "m"
+                            + " -J-Xmx" + ((int)props.memoryPerNode()) + "m"
+                            + " -J-Xms" + ((int)props.memoryPerNode()) + "m"
                             + IgniteYarnUtils.YARN_LOG_OUT
                         ));
 
@@ -178,7 +178,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
         // Check that slave satisfies min requirements.
         if (cont.getResource().getVirtualCores() < props.cpusPerNode()
-            || cont.getResource().getMemory() < props.memoryPerNode()) {
+            || cont.getResource().getMemory() < props.totalMemoryPerNode()) {
             log.log(Level.FINE, "Container resources not sufficient requirements. Host: {0}, cpu: {1}, mem: {2}",
                 new Object[]{cont.getNodeId().getHost(), cont.getResource().getVirtualCores(),
                    cont.getResource().getMemory()});
@@ -291,7 +291,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                     // Resource requirements for worker containers.
                     Resource capability = Records.newRecord(Resource.class);
 
-                    capability.setMemory((int)props.memoryPerNode());
+                    capability.setMemory((int)props.totalMemoryPerNode());
                     capability.setVirtualCores((int)props.cpusPerNode());
 
                     for (int i = 0; i < props.instances() - runningCnt; ++i) {
@@ -302,7 +302,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                         rmClient.addContainerRequest(containerAsk);
 
                         log.log(Level.INFO, "Making request. Memory: {0}, cpu {1}.",
-                            new Object[]{props.memoryPerNode(), props.cpusPerNode()});
+                            new Object[]{props.totalMemoryPerNode(), props.cpusPerNode()});
                     }
                 }
 
@@ -329,7 +329,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private boolean checkAvailableResource() {
         Resource availableRes = rmClient.getAvailableResources();
 
-        return availableRes == null || availableRes.getMemory() >= props.memoryPerNode()
+        return availableRes == null || availableRes.getMemory() >= props.totalMemoryPerNode()
             && availableRes.getVirtualCores() >= props.cpusPerNode();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1945b988/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
index d040e9f..647aef2 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
@@ -48,6 +48,12 @@ public class ClusterProperties {
 
     /** */
     public static final double DEFAULT_MEM_PER_NODE = 2048;
+    
+    /**
+     * The minimum memory overhead: overhead is by default 0.1* MEMORY_PER_NODE,
+     * with a minimum of DEFAULT_MINIMUM_MEM_OVERHEAD_PER_NODE.
+     */
+    public static final double DEFAULT_MINIMUM_MEM_OVERHEAD_PER_NODE = 384;
 
     /** Cluster name. */
     private String clusterName = DEFAULT_CLUSTER_NAME;
@@ -63,6 +69,12 @@ public class ClusterProperties {
 
     /** Memory limit. */
     private double memPerNode = DEFAULT_MEM_PER_NODE;
+    
+    /** */
+    public static final String IGNITE_MEMORY_OVERHEAD_PER_NODE = "IGNITE_MEMORY_OVERHEAD_PER_NODE";
+
+    /** Memory over head to request yarn. */
+    private double memOverHeadPerNode = 0;
 
     /** */
     public static final String IGNITE_NODE_COUNT = "IGNITE_NODE_COUNT";
@@ -185,7 +197,30 @@ public class ClusterProperties {
     }
 
     /**
-     * @return instance count limit.
+     * @return Memory overhead for requested memory.
+     */
+    public double memoryOverHeadPerNode() {
+		return memOverHeadPerNode;
+	}
+
+    /**
+     * Sets memory overhead requested to YARN.
+     *
+     * @param memOverHeadPerNode Memory over head per node.
+     */
+	public void memoryOverHeadPerNode(double memOverHeadPerNode) {
+		this.memOverHeadPerNode = memOverHeadPerNode;
+	}
+	
+	/**
+	 * @return Provide the total memory requested to ResourceManagers (memoryPerNode + memoryOverheadPerNode).
+	 */
+	public double totalMemoryPerNode(){
+		return memoryPerNode() + memoryOverHeadPerNode();
+	}
+
+	/**
+     * @return Instance count limit.
      */
     public double instances() {
         return nodeCnt;
@@ -278,7 +313,50 @@ public class ClusterProperties {
     }
 
     /**
-     * @param config path to config file.
+     * Instantiate a ClusterProperties from a set of properties.
+     *
+     * @param props If {@code null} will be used system properties.
+     * @return Cluster properties.
+     */
+    private static ClusterProperties fromProperties(Properties props) {
+    	ClusterProperties prop = new ClusterProperties();
+
+        prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, props, DEFAULT_CLUSTER_NAME);
+
+        prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, DEFAULT_CPU_PER_NODE);
+        prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, DEFAULT_MEM_PER_NODE);
+        // The minimum memory overhead: overhead is by default 0.1* MEMORY_PER_NODE,
+        // with a minimum of DEFAULT_MINIMUM_MEM_OVERHEAD_PER_NODE
+        prop.memOverHeadPerNode = getDoubleProperty(IGNITE_MEMORY_OVERHEAD_PER_NODE, props,
+            Math.max( 0.1 * prop.memPerNode, DEFAULT_MINIMUM_MEM_OVERHEAD_PER_NODE));
+        prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
+
+        prop.igniteUrl = getStringProperty(IGNITE_URL, props, null);
+        prop.ignitePath = getStringProperty(IGNITE_PATH, props, null);
+        prop.licencePath = getStringProperty(LICENCE_PATH, props, null);
+        prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, props, null);
+        prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
+        prop.igniteLocalWorkDir = getStringProperty(IGNITE_LOCAL_WORK_DIR, props, DEFAULT_IGNITE_LOCAL_WORK_DIR);
+        prop.igniteReleasesDir = getStringProperty(IGNITE_RELEASES_DIR, props, DEFAULT_IGNITE_RELEASES_DIR);
+        prop.igniteCfg = getStringProperty(IGNITE_CONFIG_XML, props, null);
+        prop.userLibs = getStringProperty(IGNITE_USERS_LIBS, props, null);
+
+        String pattern = getStringProperty(IGNITE_HOSTNAME_CONSTRAINT, props, null);
+
+        if (pattern != null) {
+            try {
+                prop.hostnameConstraint = Pattern.compile(pattern);
+            }
+            catch (PatternSyntaxException e) {
+                log.log(Level.WARNING, "IGNITE_HOSTNAME_CONSTRAINT has invalid pattern. It will be ignore.", e);
+            }
+        }
+
+        return prop;
+    }
+    
+    /**
+     * @param config Path to config file.
      * @return Cluster configuration.
      */
     public static ClusterProperties from(String config) {
@@ -291,36 +369,7 @@ public class ClusterProperties {
                 props.load(new FileInputStream(config));
             }
 
-            ClusterProperties prop = new ClusterProperties();
-
-            prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, props, DEFAULT_CLUSTER_NAME);
-
-            prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, DEFAULT_CPU_PER_NODE);
-            prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, DEFAULT_MEM_PER_NODE);
-            prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
-
-            prop.igniteUrl = getStringProperty(IGNITE_URL, props, null);
-            prop.ignitePath = getStringProperty(IGNITE_PATH, props, null);
-            prop.licencePath = getStringProperty(LICENCE_PATH, props, null);
-            prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, props, null);
-            prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
-            prop.igniteLocalWorkDir = getStringProperty(IGNITE_LOCAL_WORK_DIR, props, DEFAULT_IGNITE_LOCAL_WORK_DIR);
-            prop.igniteReleasesDir = getStringProperty(IGNITE_RELEASES_DIR, props, DEFAULT_IGNITE_RELEASES_DIR);
-            prop.igniteCfg = getStringProperty(IGNITE_CONFIG_XML, props, null);
-            prop.userLibs = getStringProperty(IGNITE_USERS_LIBS, props, null);
-
-            String pattern = getStringProperty(IGNITE_HOSTNAME_CONSTRAINT, props, null);
-
-            if (pattern != null) {
-                try {
-                    prop.hostnameConstraint = Pattern.compile(pattern);
-                }
-                catch (PatternSyntaxException e) {
-                    log.log(Level.WARNING, "IGNITE_HOSTNAME_CONSTRAINT has invalid pattern. It will be ignore.", e);
-                }
-            }
-
-            return prop;
+            return fromProperties(props);
         }
         catch (IOException e) {
             throw new RuntimeException(e);
@@ -331,36 +380,7 @@ public class ClusterProperties {
      * @return Cluster configuration.
      */
     public static ClusterProperties from() {
-        ClusterProperties prop = new ClusterProperties();
-
-        prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, null, DEFAULT_CLUSTER_NAME);
-
-        prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, null, DEFAULT_CPU_PER_NODE);
-        prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, DEFAULT_MEM_PER_NODE);
-        prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, DEFAULT_IGNITE_NODE_COUNT);
-
-        prop.igniteUrl = getStringProperty(IGNITE_URL, null, null);
-        prop.ignitePath = getStringProperty(IGNITE_PATH, null, null);
-        prop.licencePath = getStringProperty(LICENCE_PATH, null, null);
-        prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, null, null);
-        prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, null, DEFAULT_IGNITE_WORK_DIR);
-        prop.igniteLocalWorkDir = getStringProperty(IGNITE_LOCAL_WORK_DIR, null, DEFAULT_IGNITE_LOCAL_WORK_DIR);
-        prop.igniteReleasesDir = getStringProperty(IGNITE_RELEASES_DIR, null, DEFAULT_IGNITE_RELEASES_DIR);
-        prop.igniteCfg = getStringProperty(IGNITE_CONFIG_XML, null, null);
-        prop.userLibs = getStringProperty(IGNITE_USERS_LIBS, null, null);
-
-        String pattern = getStringProperty(IGNITE_HOSTNAME_CONSTRAINT, null, null);
-
-        if (pattern != null) {
-            try {
-                prop.hostnameConstraint = Pattern.compile(pattern);
-            }
-            catch (PatternSyntaxException e) {
-                log.log(Level.WARNING, "IGNITE_HOSTNAME_CONSTRAINT has invalid pattern. It will be ignore.", e);
-            }
-        }
-
-        return prop;
+        return fromProperties(null);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/1945b988/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
index 97f6a12..1190313 100644
--- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
+++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
@@ -103,6 +103,58 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
             assertEquals(1024, req.getCapability().getMemory());
         }
     }
+    
+    /**
+     * Tests whether memory overhead is allocated within container memory.
+     *
+     * @throws Exception If failed.
+     */
+    public void testMemoryOverHeadAllocation() throws Exception {
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(new NMMock());
+
+        props.cpusPerNode(2);
+        props.memoryPerNode(1024);
+        props.memoryOverHeadPerNode(512);
+        props.instances(3);
+
+        Thread thread = runAppMaster(appMaster);
+
+        List<AMRMClient.ContainerRequest> contRequests = collectRequests(rmMock, 1, 1000);
+
+        interruptedThread(thread);
+
+        assertEquals(3, contRequests.size());
+
+        for (AMRMClient.ContainerRequest req : contRequests) {
+            assertEquals(2, req.getCapability().getVirtualCores());
+            assertEquals(1024 + 512, req.getCapability().getMemory());
+        }
+    }
+
+    /**
+     * Tests whether memory overhead prevents from allocating container.
+     *
+     * @throws Exception If failed.
+     */
+     public void testMemoryOverHeadPreventAllocation() throws Exception {
+        rmMock.availableRes(new MockResource(1024, 2));
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(new NMMock());
+
+        props.cpusPerNode(2);
+        props.memoryPerNode(1024);
+        props.memoryOverHeadPerNode(512);
+        props.instances(3);
+
+        Thread thread = runAppMaster(appMaster);
+
+        List<AMRMClient.ContainerRequest> contRequests = collectRequests(rmMock, 1, 1000);
+
+        interruptedThread(thread);
+
+        assertEquals(0, contRequests.size());
+     }
 
     /**
      * @throws Exception If failed.


[29/49] ignite git commit: IGNITE-2498: Finalization.

Posted by nt...@apache.org.
IGNITE-2498: Finalization.


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

Branch: refs/heads/ignite-2435
Commit: 14a5f93bfdb74cad9c2ff77d6c8f703a55abdd10
Parents: 5c76f80
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 13:10:48 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 13:10:48 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     |  2 +-
 .../GridCacheDeploymentOffHeapSelfTest.java     |  4 +-
 ...ridCacheDeploymentOffHeapValuesSelfTest.java | 41 ++++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite3.java       |  2 +
 4 files changed, 46 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 19c1312..b258c73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -3164,7 +3164,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         if (hasOffHeapPointer()) {
             CacheObject val0 = cctx.fromOffheap(offHeapPointer(), tmp);
 
-            if (!tmp && isPeerClassLoadingEnabled())
+            if (!tmp && cctx.kernalContext().config().isPeerClassLoadingEnabled())
                 val0.finishUnmarshal(cctx.cacheObjectContext(), cctx.deploy().globalLoader());
 
             return val0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
index 1adc3b4..ed58c3e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
@@ -21,7 +21,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
+import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 
 /**
  * Tests deployment with off-heap storage.
@@ -31,7 +31,7 @@ public class GridCacheDeploymentOffHeapSelfTest extends GridCacheDeploymentSelfT
     @Override protected CacheConfiguration cacheConfiguration() throws Exception {
         CacheConfiguration cacheCfg = super.cacheConfiguration();
 
-        cacheCfg.setMemoryMode(OFFHEAP_VALUES);
+        cacheCfg.setMemoryMode(OFFHEAP_TIERED);
         cacheCfg.setOffHeapMaxMemory(0);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
         cacheCfg.setNearConfiguration(new NearCacheConfiguration());

http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
new file mode 100644
index 0000000..73d5183
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
+
+/**
+ * Tests deployment with off-heap storage.
+ */
+public class GridCacheDeploymentOffHeapValuesSelfTest extends GridCacheDeploymentSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheConfiguration cacheConfiguration() throws Exception {
+        CacheConfiguration cacheCfg = super.cacheConfiguration();
+
+        cacheCfg.setMemoryMode(OFFHEAP_VALUES);
+        cacheCfg.setOffHeapMaxMemory(0);
+        cacheCfg.setAtomicityMode(TRANSACTIONAL);
+        cacheCfg.setNearConfiguration(new NearCacheConfiguration());
+
+        return cacheCfg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index b86a33d..d82f0b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -21,6 +21,7 @@ import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheConditionalDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapValuesSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryVersionSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheOrderedPreloadingSelfTest;
@@ -125,6 +126,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
 
         suite.addTestSuite(GridCacheDeploymentSelfTest.class);
         suite.addTestSuite(GridCacheDeploymentOffHeapSelfTest.class);
+        suite.addTestSuite(GridCacheDeploymentOffHeapValuesSelfTest.class);
         suite.addTestSuite(GridCacheConditionalDeploymentSelfTest.class);
         suite.addTestSuite(GridCacheAtomicEntryProcessorDeploymentSelfTest.class);
         suite.addTestSuite(GridCacheTransactionalEntryProcessorDeploymentSelfTest.class);


[36/49] ignite git commit: gc

Posted by nt...@apache.org.
gc


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

Branch: refs/heads/ignite-2435
Commit: 861236a16851317d3c580eb5a72ef8e5f8561b80
Parents: 8a8a8c1
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Jan 29 18:43:10 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Jan 29 18:43:10 2016 +0300

----------------------------------------------------------------------
 .../rebalancing/GridCacheRebalancingSyncSelfTest.java        | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/861236a1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
index 4ee080f..e4ad66b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
@@ -35,6 +35,7 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 /**
@@ -177,6 +178,13 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest {
         }
     }
 
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        GridTestUtils.runGC(); // Clean heap before rebalancing.
+    }
+
     /**
      * @throws Exception If failed.
      */


[33/49] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-2435
Commit: d2a107b0df17213c334c595c3e0ed5f33978bab2
Parents: e886b90 c081e3d
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Jan 29 14:35:44 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Jan 29 14:35:44 2016 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 modules/benchmarks/pom.xml                      |  32 +-
 .../benchmarks/jmh/cache/PutBenchmark.java      | 170 ---------
 .../ignite/benchmarks/model/IntValue.java       |  91 -----
 .../benchmarks/jmh/JmhAbstractBenchmark.java    | 150 ++++++++
 .../jmh/cache/JmhCacheAbstractBenchmark.java    | 181 +++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 124 +++++++
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 232 ++++++++++++
 .../internal/benchmarks/model/IntValue.java     |  91 +++++
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../ignite/internal/jdbc/JdbcConnection.java    |  14 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++-
 .../processors/cache/CacheMetricsSnapshot.java  |   4 +-
 .../processors/cache/GridCacheAdapter.java      |  78 +---
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../processors/cache/GridCacheUtils.java        |  36 +-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../near/GridNearTxFinishFuture.java            |  96 ++---
 .../processors/service/ServiceContextImpl.java  |   4 +-
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 +++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../cache/GridCacheUtilsSelfTest.java           | 136 +------
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |  79 ----
 .../random/RandomEvictionPolicySelfTest.java    | 363 -------------------
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../GridServicePackagePrivateSelfTest.java      |  51 +++
 .../processors/service/inner/MyService.java     |  30 ++
 .../service/inner/MyServiceFactory.java         |  30 ++
 .../processors/service/inner/MyServiceImpl.java |  45 +++
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |   4 -
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |   4 +-
 modules/docker/1.5.0.final/Dockerfile           |  40 ++
 modules/docker/1.5.0.final/run.sh               |  50 +++
 modules/docker/Dockerfile                       |   6 +-
 .../cpp/common/project/vs/common.vcxproj        |   2 +-
 .../Apache.Ignite.Benchmarks.csproj             |   4 +-
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   4 +-
 .../Apache.Ignite.Core.Tests.csproj             |   2 +-
 .../Apache.Ignite.Core.csproj                   |   8 +-
 .../Apache.Ignite.Core.ruleset                  |  26 ++
 .../Binary/BinaryConfiguration.cs               |   3 +
 .../Binary/BinaryTypeConfiguration.cs           |   5 +
 .../Binary/BinaryTypeNames.cs                   |  64 ++--
 .../Cache/CachePartialUpdateException.cs        |   3 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |  41 ++-
 .../Cache/Event/ICacheEntryEventFilter.cs       |   1 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   1 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |   2 +-
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |   2 +-
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |   6 +-
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |   7 +-
 .../Cache/Store/CacheStoreAdapter.cs            |   4 +
 .../Compute/ComputeJobAdapter.cs                |   2 +-
 .../Compute/ComputeJobResultPolicy.cs           |   2 -
 .../Compute/ComputeTaskAdapter.cs               |   3 +
 .../Compute/ComputeTaskSplitAdapter.cs          |  18 +-
 .../Datastream/StreamTransformer.cs             |   2 +
 .../Datastream/StreamVisitor.cs                 |   2 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |   8 +-
 .../Events/CacheQueryExecutedEvent.cs           |   4 +-
 .../Events/CacheQueryReadEvent.cs               |   6 +-
 .../Events/CacheRebalancingEvent.cs             |   4 +-
 .../Events/CheckpointEvent.cs                   |   4 +-
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   4 +-
 .../Apache.Ignite.Core/Events/EventBase.cs      |  70 +++-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   3 +-
 .../Apache.Ignite.Core/Impl/Binary/Binary.cs    |  47 +--
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   2 +-
 .../Impl/Binary/BinaryObject.cs                 |  44 ++-
 .../Impl/Binary/BinaryObjectBuilder.cs          |  75 ++--
 .../Impl/Binary/BinaryReader.cs                 |   1 +
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |   2 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   9 +-
 .../Impl/Binary/BinaryUtils.cs                  |   7 +-
 .../Impl/Binary/BinaryWriter.cs                 |   3 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |   9 +
 .../Impl/Binary/Marshaller.cs                   |  19 +-
 .../Impl/Binary/Metadata/BinaryType.cs          |   2 +
 .../Impl/Binary/SerializableObjectHolder.cs     |  13 +-
 .../Impl/Binary/Structure/BinaryStructure.cs    |   3 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  42 ++-
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |   4 +-
 .../Continuous/ContinuousQueryFilterHolder.cs   |   2 +-
 .../Continuous/ContinuousQueryHandleImpl.cs     |   4 +-
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   2 +
 .../Impl/Cache/Query/QueryCursor.cs             |   2 +
 .../Impl/Common/CancelledTask.cs                |   3 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   1 +
 .../Impl/Common/DelegateConverter.cs            |  11 +-
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |   2 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   1 +
 .../Closure/ComputeAbstractClosureTask.cs       |   3 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   2 +
 .../Closure/ComputeReducingClosureTask.cs       |   2 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   2 +
 .../Impl/Datastream/DataStreamerBatch.cs        |   1 +
 .../Impl/Datastream/DataStreamerImpl.cs         |   5 +-
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  56 +--
 .../Impl/Handle/HandleRegistry.cs               |   1 +
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  11 +-
 .../Impl/InteropExceptionHolder.cs              |  11 +-
 .../Memory/PlatformBigEndianMemoryStream.cs     |   8 +
 .../Impl/Memory/PlatformMemory.cs               |   2 +
 .../Impl/Memory/PlatformMemoryManager.cs        |   2 +
 .../Impl/Memory/PlatformMemoryStream.cs         |   2 +
 .../Impl/Memory/PlatformRawMemory.cs            |   2 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   3 +-
 .../Impl/Resource/ResourceProcessor.cs          |   2 +-
 .../Impl/Resource/ResourceTypeDescriptor.cs     |   2 +-
 .../Impl/Services/ServiceProxy.cs               |   2 +
 .../Impl/Services/ServiceProxyInvoker.cs        |   1 +
 .../Impl/Transactions/TransactionsImpl.cs       |   2 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   5 +-
 .../Services/ServiceInvocationException.cs      |   2 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    | 354 +++---------------
 modules/platforms/dotnet/Apache.Ignite.sln      |   4 +-
 .../Apache.Ignite.sln.TeamCity.DotSettings      |  30 ++
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   5 +-
 .../Apache.Ignite.Examples.csproj               |   4 +-
 .../Apache.Ignite.ExamplesDll.csproj            |   4 +-
 parent/pom.xml                                  |   3 +-
 143 files changed, 2209 insertions(+), 1717 deletions(-)
----------------------------------------------------------------------



[34/49] ignite git commit: Proper initialization of utility and marshalling pools.

Posted by nt...@apache.org.
Proper initialization of utility and marshalling pools.


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

Branch: refs/heads/ignite-2435
Commit: c2e5638d01fbe44f90878d1aee6bf4979a935a7c
Parents: a34d705
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jan 29 15:51:44 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jan 29 15:51:44 2016 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/internal/IgnitionEx.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c2e5638d/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 5153fb3..8f23b05 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -1662,7 +1662,7 @@ public class IgnitionEx {
                 "utility",
                 cfg.getGridName(),
                 myCfg.getUtilityCacheThreadPoolSize(),
-                DFLT_SYSTEM_MAX_THREAD_CNT,
+                myCfg.getUtilityCacheThreadPoolSize(),
                 myCfg.getUtilityCacheKeepAliveTime(),
                 new LinkedBlockingQueue<Runnable>(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP));
 
@@ -1670,7 +1670,7 @@ public class IgnitionEx {
                 "marshaller-cache",
                 cfg.getGridName(),
                 myCfg.getMarshallerCacheThreadPoolSize(),
-                DFLT_SYSTEM_MAX_THREAD_CNT,
+                myCfg.getMarshallerCacheThreadPoolSize(),
                 myCfg.getMarshallerCacheKeepAliveTime(),
                 new LinkedBlockingQueue<Runnable>(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP));
 


[49/49] ignite git commit: Merge branch 'master' into ignite-2435

Posted by nt...@apache.org.
Merge branch 'master' into ignite-2435


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

Branch: refs/heads/ignite-2435
Commit: 47bc381b9e3178f1c8b578d706b05fd7af76587b
Parents: acae0a5 58dce88
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Mon Feb 1 17:19:27 2016 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Mon Feb 1 17:19:27 2016 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |   2 +-
 examples/schema-import/pom.xml                  |   2 +-
 .../examples/datagrid/CacheAffinityExample.java |   8 +-
 .../java8/datagrid/CacheAffinityExample.java    |   6 +-
 modules/aop/pom.xml                             |   2 +-
 modules/apache-license-gen/pom.xml              |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/benchmarks/pom.xml                      | 140 +++++++
 .../benchmarks/jmh/JmhAbstractBenchmark.java    | 150 +++++++
 .../jmh/cache/JmhCacheAbstractBenchmark.java    | 181 +++++++++
 .../jmh/cache/JmhCachePutBenchmark.java         | 124 ++++++
 .../jmh/runner/JmhIdeBenchmarkRunner.java       | 232 +++++++++++
 .../internal/benchmarks/model/IntValue.java     |  91 +++++
 modules/camel/pom.xml                           |   2 +-
 modules/clients/pom.xml                         |   2 +-
 .../internal/client/ClientGetAffinityTask.java  |   4 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   5 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   7 +-
 .../apache/ignite/cache/affinity/Affinity.java  |  24 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   4 +-
 .../internal/binary/GridBinaryMarshaller.java   |   5 +-
 .../ignite/internal/jdbc/JdbcConnection.java    |  14 +-
 .../affinity/GridAffinityProcessor.java         |  60 ++-
 .../processors/cache/CacheMetricsSnapshot.java  |   4 +-
 .../processors/cache/CacheOperationContext.java |  43 ++-
 .../processors/cache/GridCacheAdapter.java      |  86 +----
 .../cache/GridCacheAffinityManager.java         |  47 ++-
 .../processors/cache/GridCacheMapEntry.java     |   6 +-
 .../processors/cache/GridCacheProxyImpl.java    |  11 +-
 .../processors/cache/GridCacheUtils.java        |  36 +-
 .../processors/cache/IgniteCacheProxy.java      |  43 ++-
 .../cache/affinity/GridCacheAffinityImpl.java   |  48 ++-
 .../dht/atomic/GridDhtAtomicCache.java          | 108 ++++--
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  10 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  22 +-
 .../dht/preloader/GridDhtPartitionDemander.java |   4 +-
 .../near/GridNearTxFinishFuture.java            |  96 ++---
 .../processors/cache/dr/GridCacheDrInfo.java    |  49 ++-
 .../transactions/IgniteTxLocalAdapter.java      |  81 ++--
 .../cache/transactions/IgniteTxManager.java     |   2 +-
 .../cache/version/GridCacheVersionManager.java  |  23 +-
 .../handlers/log/GridLogCommandHandler.java     |  16 +-
 .../processors/service/ServiceContextImpl.java  |   4 +-
 .../processors/task/GridTaskProcessor.java      |   2 +-
 .../OptimizedObjectStreamRegistry.java          |   4 +-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../ignite/internal/GridAffinityMappedTest.java |   8 +-
 .../internal/GridAffinityNoCacheSelfTest.java   | 290 ++++++++++++++
 .../internal/GridAffinityP2PSelfTest.java       |   8 +-
 .../ignite/internal/GridAffinitySelfTest.java   |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   4 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   4 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  17 +-
 .../GridCacheDeploymentOffHeapSelfTest.java     |   4 +-
 ...ridCacheDeploymentOffHeapValuesSelfTest.java |  41 ++
 .../cache/GridCacheDeploymentSelfTest.java      |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   6 +-
 ...hePartitionedProjectionAffinitySelfTest.java |   8 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   4 +-
 .../cache/GridCacheUtilsSelfTest.java           | 136 +------
 .../dht/GridCacheDhtMultiBackupTest.java        |   4 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |   4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |   4 +-
 ...titionedExplicitLockNodeFailureSelfTest.java |   6 +-
 .../GridCacheRebalancingSyncSelfTest.java       |   8 +
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |  79 ----
 .../random/RandomEvictionPolicySelfTest.java    | 363 -----------------
 ...ridCacheContinuousQueryAbstractSelfTest.java |  10 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |   4 +-
 .../handlers/log/GridLogCommandHandlerTest.java |  58 ++-
 .../GridServicePackagePrivateSelfTest.java      |  51 +++
 .../processors/service/inner/MyService.java     |  30 ++
 .../service/inner/MyServiceFactory.java         |  30 ++
 .../processors/service/inner/MyServiceImpl.java |  45 +++
 .../ignite/loadtests/dsi/GridDsiClient.java     |   4 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |   4 +-
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   3 +-
 .../testframework/junits/GridAbstractTest.java  |   3 +
 .../IgniteCacheEvictionSelfTestSuite.java       |   4 -
 .../testsuites/IgniteCacheTestSuite3.java       |   2 +
 .../testsuites/IgniteComputeGridTestSuite.java  |   4 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |   4 +-
 modules/docker/1.5.0.final/Dockerfile           |  40 ++
 modules/docker/1.5.0.final/run.sh               |  50 +++
 modules/docker/Dockerfile                       |   6 +-
 modules/extdata/p2p/pom.xml                     |   2 +-
 .../extdata/uri/modules/uri-dependency/pom.xml  |   2 +-
 modules/extdata/uri/pom.xml                     |   2 +-
 modules/flume/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 +-
 .../query/h2/opt/GridH2IndexBase.java           |   5 +-
 .../query/h2/opt/GridH2TreeIndex.java           |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jms11/pom.xml                           |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/kafka/README.txt                        | 111 +++++-
 modules/kafka/pom.xml                           |  71 ++--
 .../ignite/stream/kafka/KafkaStreamer.java      |   2 +-
 .../kafka/connect/IgniteSinkConnector.java      |  91 +++++
 .../kafka/connect/IgniteSinkConstants.java      |  38 ++
 .../stream/kafka/connect/IgniteSinkTask.java    | 165 ++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |   9 +-
 .../stream/kafka/KafkaEmbeddedBroker.java       | 387 -------------------
 .../kafka/KafkaIgniteStreamerSelfTest.java      |  13 +-
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 ---
 .../ignite/stream/kafka/TestKafkaBroker.java    | 237 ++++++++++++
 .../kafka/connect/IgniteSinkConnectorTest.java  | 250 ++++++++++++
 .../kafka/src/test/resources/example-ignite.xml |  71 ++++
 modules/log4j/pom.xml                           |   2 +-
 modules/log4j2/pom.xml                          |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/mqtt/pom.xml                            |   2 +-
 modules/osgi-karaf/pom.xml                      |   2 +-
 modules/osgi-paxlogging/pom.xml                 |   2 +-
 modules/osgi/pom.xml                            |   2 +-
 modules/platforms/cpp/common/configure.ac       |   2 +-
 .../cpp/common/project/vs/common.vcxproj        |   2 +-
 modules/platforms/cpp/core-test/configure.ac    |   2 +-
 modules/platforms/cpp/core/configure.ac         |   2 +-
 modules/platforms/cpp/examples/configure.ac     |   2 +-
 modules/platforms/cpp/ignite/configure.ac       |   2 +-
 .../Apache.Ignite.Benchmarks.csproj             |   4 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   4 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Apache.Ignite.Core.Tests.csproj             |   2 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Apache.Ignite.Core.csproj                   |   8 +-
 .../Apache.Ignite.Core.ruleset                  |  26 ++
 .../Binary/BinaryConfiguration.cs               |   3 +
 .../Binary/BinaryTypeConfiguration.cs           |   5 +
 .../Binary/BinaryTypeNames.cs                   |  64 +--
 .../Cache/CachePartialUpdateException.cs        |   3 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |  41 +-
 .../Cache/Event/ICacheEntryEventFilter.cs       |   1 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   1 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |   2 +-
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |   2 +-
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |   6 +-
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |   7 +-
 .../Cache/Store/CacheStoreAdapter.cs            |   4 +
 .../Compute/ComputeJobAdapter.cs                |   2 +-
 .../Compute/ComputeJobResultPolicy.cs           |   2 -
 .../Compute/ComputeTaskAdapter.cs               |   3 +
 .../Compute/ComputeTaskSplitAdapter.cs          |  18 +-
 .../Datastream/StreamTransformer.cs             |   2 +
 .../Datastream/StreamVisitor.cs                 |   2 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |   8 +-
 .../Events/CacheQueryExecutedEvent.cs           |   4 +-
 .../Events/CacheQueryReadEvent.cs               |   6 +-
 .../Events/CacheRebalancingEvent.cs             |   4 +-
 .../Events/CheckpointEvent.cs                   |   4 +-
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   4 +-
 .../Apache.Ignite.Core/Events/EventBase.cs      |  70 +++-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   3 +-
 .../Apache.Ignite.Core/Impl/Binary/Binary.cs    |  47 +--
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   2 +-
 .../Impl/Binary/BinaryObject.cs                 |  44 ++-
 .../Impl/Binary/BinaryObjectBuilder.cs          |  75 ++--
 .../Impl/Binary/BinaryReader.cs                 |   1 +
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |   2 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   9 +-
 .../Impl/Binary/BinaryUtils.cs                  |   7 +-
 .../Impl/Binary/BinaryWriter.cs                 |   3 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |   9 +
 .../Impl/Binary/Marshaller.cs                   |  19 +-
 .../Impl/Binary/Metadata/BinaryType.cs          |   2 +
 .../Impl/Binary/SerializableObjectHolder.cs     |  13 +-
 .../Impl/Binary/Structure/BinaryStructure.cs    |   3 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  42 +-
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |   4 +-
 .../Continuous/ContinuousQueryFilterHolder.cs   |   2 +-
 .../Continuous/ContinuousQueryHandleImpl.cs     |   4 +-
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   2 +
 .../Impl/Cache/Query/QueryCursor.cs             |   2 +
 .../Impl/Common/CancelledTask.cs                |   3 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   1 +
 .../Impl/Common/DelegateConverter.cs            |  11 +-
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |   2 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   1 +
 .../Closure/ComputeAbstractClosureTask.cs       |   3 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   2 +
 .../Closure/ComputeReducingClosureTask.cs       |   2 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   2 +
 .../Impl/Datastream/DataStreamerBatch.cs        |   1 +
 .../Impl/Datastream/DataStreamerImpl.cs         |   5 +-
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  56 +--
 .../Impl/Handle/HandleRegistry.cs               |   1 +
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  11 +-
 .../Impl/InteropExceptionHolder.cs              |  11 +-
 .../Memory/PlatformBigEndianMemoryStream.cs     |   8 +
 .../Impl/Memory/PlatformMemory.cs               |   2 +
 .../Impl/Memory/PlatformMemoryManager.cs        |   2 +
 .../Impl/Memory/PlatformMemoryStream.cs         |   2 +
 .../Impl/Memory/PlatformRawMemory.cs            |   2 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   3 +-
 .../Impl/Resource/ResourceProcessor.cs          |   2 +-
 .../Impl/Resource/ResourceTypeDescriptor.cs     |   2 +-
 .../Impl/Services/ServiceProxy.cs               |   2 +
 .../Impl/Services/ServiceProxyInvoker.cs        |   1 +
 .../Impl/Transactions/TransactionsImpl.cs       |   2 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   5 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Services/ServiceInvocationException.cs      |   2 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    | 354 +++--------------
 modules/platforms/dotnet/Apache.Ignite.sln      |   4 +-
 .../Apache.Ignite.sln.TeamCity.DotSettings      |  30 ++
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   5 +-
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   6 +-
 .../Apache.Ignite.Examples.csproj               |   4 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Apache.Ignite.ExamplesDll.csproj            |   4 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 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/storm/pom.xml                           |   6 +-
 modules/tools/pom.xml                           |   2 +-
 modules/twitter/pom.xml                         |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 .../visor/commands/node/VisorNodeCommand.scala  |   1 +
 .../commands/top/VisorTopologyCommand.scala     |   5 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   3 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 modules/yarn/pom.xml                            |   2 +-
 .../apache/ignite/yarn/ApplicationMaster.java   |  12 +-
 .../apache/ignite/yarn/ClusterProperties.java   | 144 ++++---
 .../yarn/IgniteApplicationMasterSelfTest.java   |  52 +++
 modules/zookeeper/pom.xml                       |   2 +-
 parent/pom.xml                                  | 123 +++---
 pom.xml                                         |  19 +-
 250 files changed, 4086 insertions(+), 2269 deletions(-)
----------------------------------------------------------------------



[14/49] ignite git commit: IGNITE-2324: .NET: Added static code analysis rules and suppressed warnings accordingly.

Posted by nt...@apache.org.
IGNITE-2324: .NET: Added static code analysis rules and suppressed warnings accordingly.


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

Branch: refs/heads/ignite-2435
Commit: a34d7058bd2901359cd2fda3d57a3f05ab6291df
Parents: f9868d4
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Jan 28 11:25:20 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 28 11:25:20 2016 +0300

----------------------------------------------------------------------
 .../cpp/common/project/vs/common.vcxproj        |   2 +-
 .../Apache.Ignite.Benchmarks.csproj             |   4 +-
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   4 +-
 .../Apache.Ignite.Core.Tests.csproj             |   2 +-
 .../Apache.Ignite.Core.csproj                   |   8 +-
 .../Apache.Ignite.Core.ruleset                  |  26 ++
 .../Binary/BinaryConfiguration.cs               |   3 +
 .../Binary/BinaryTypeConfiguration.cs           |   5 +
 .../Binary/BinaryTypeNames.cs                   |  64 ++--
 .../Cache/CachePartialUpdateException.cs        |   3 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |  41 ++-
 .../Cache/Event/ICacheEntryEventFilter.cs       |   1 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   1 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |   2 +-
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |   2 +-
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |   6 +-
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |   7 +-
 .../Cache/Store/CacheStoreAdapter.cs            |   4 +
 .../Compute/ComputeJobAdapter.cs                |   2 +-
 .../Compute/ComputeJobResultPolicy.cs           |   2 -
 .../Compute/ComputeTaskAdapter.cs               |   3 +
 .../Compute/ComputeTaskSplitAdapter.cs          |  18 +-
 .../Datastream/StreamTransformer.cs             |   2 +
 .../Datastream/StreamVisitor.cs                 |   2 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |   8 +-
 .../Events/CacheQueryExecutedEvent.cs           |   4 +-
 .../Events/CacheQueryReadEvent.cs               |   6 +-
 .../Events/CacheRebalancingEvent.cs             |   4 +-
 .../Events/CheckpointEvent.cs                   |   4 +-
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   4 +-
 .../Apache.Ignite.Core/Events/EventBase.cs      |  70 +++-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   3 +-
 .../Apache.Ignite.Core/Impl/Binary/Binary.cs    |  47 +--
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   2 +-
 .../Impl/Binary/BinaryObject.cs                 |  44 ++-
 .../Impl/Binary/BinaryObjectBuilder.cs          |  75 ++--
 .../Impl/Binary/BinaryReader.cs                 |   1 +
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |   2 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   9 +-
 .../Impl/Binary/BinaryUtils.cs                  |   7 +-
 .../Impl/Binary/BinaryWriter.cs                 |   3 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |   9 +
 .../Impl/Binary/Marshaller.cs                   |  19 +-
 .../Impl/Binary/Metadata/BinaryType.cs          |   2 +
 .../Impl/Binary/SerializableObjectHolder.cs     |  13 +-
 .../Impl/Binary/Structure/BinaryStructure.cs    |   3 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  42 ++-
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |   4 +-
 .../Continuous/ContinuousQueryFilterHolder.cs   |   2 +-
 .../Continuous/ContinuousQueryHandleImpl.cs     |   4 +-
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   2 +
 .../Impl/Cache/Query/QueryCursor.cs             |   2 +
 .../Impl/Common/CancelledTask.cs                |   3 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   1 +
 .../Impl/Common/DelegateConverter.cs            |  11 +-
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |   2 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   1 +
 .../Closure/ComputeAbstractClosureTask.cs       |   3 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   2 +
 .../Closure/ComputeReducingClosureTask.cs       |   2 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   2 +
 .../Impl/Datastream/DataStreamerBatch.cs        |   1 +
 .../Impl/Datastream/DataStreamerImpl.cs         |   5 +-
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  56 +--
 .../Impl/Handle/HandleRegistry.cs               |   1 +
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  11 +-
 .../Impl/InteropExceptionHolder.cs              |  11 +-
 .../Memory/PlatformBigEndianMemoryStream.cs     |   8 +
 .../Impl/Memory/PlatformMemory.cs               |   2 +
 .../Impl/Memory/PlatformMemoryManager.cs        |   2 +
 .../Impl/Memory/PlatformMemoryStream.cs         |   2 +
 .../Impl/Memory/PlatformRawMemory.cs            |   2 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   3 +-
 .../Impl/Resource/ResourceProcessor.cs          |   2 +-
 .../Impl/Resource/ResourceTypeDescriptor.cs     |   2 +-
 .../Impl/Services/ServiceProxy.cs               |   2 +
 .../Impl/Services/ServiceProxyInvoker.cs        |   1 +
 .../Impl/Transactions/TransactionsImpl.cs       |   2 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   5 +-
 .../Services/ServiceInvocationException.cs      |   2 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    | 354 +++----------------
 modules/platforms/dotnet/Apache.Ignite.sln      |   4 +-
 .../Apache.Ignite.sln.TeamCity.DotSettings      |  30 ++
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   5 +-
 .../Apache.Ignite.Examples.csproj               |   4 +-
 .../Apache.Ignite.ExamplesDll.csproj            |   4 +-
 parent/pom.xml                                  |   3 +-
 88 files changed, 601 insertions(+), 561 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/cpp/common/project/vs/common.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/common.vcxproj b/modules/platforms/cpp/common/project/vs/common.vcxproj
index 0fa1d0e..ac7d504 100644
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
index f4c7894..b477d17 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{8F507DBE-56F9-437F-82D4-74C02EC44E41}</ProjectGuid>
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
index ebc8043..ebe07eb 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{F4A69E2D-908E-4F0F-A794-84D508D60E5F}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index a247f63..5a1e176 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -3,7 +3,7 @@
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{6A62F66C-DA5B-4FBB-8CE7-A95F740FDC7A}</ProjectGuid>
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 12404be..7de8330 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -3,7 +3,7 @@
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
     <ProjectGuid>{4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
@@ -18,6 +18,8 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <DefineConstants>DEBUG;CODE_ANALYSIS</DefineConstants>
     <DocumentationFile>bin\x64\Debug\Apache.Ignite.Core.XML</DocumentationFile>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
+    <CodeAnalysisRuleSet>Apache.Ignite.Core.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <PlatformTarget>x64</PlatformTarget>
@@ -25,6 +27,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <Optimize>true</Optimize>
     <DocumentationFile>bin\x64\Release\Apache.Ignite.Core.XML</DocumentationFile>
+    <CodeAnalysisRuleSet>Apache.Ignite.Core.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <PlatformTarget>x86</PlatformTarget>
@@ -32,6 +35,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <DefineConstants>DEBUG;CODE_ANALYSIS</DefineConstants>
     <DocumentationFile>bin\x86\Debug\Apache.Ignite.Core.XML</DocumentationFile>
+    <CodeAnalysisRuleSet>Apache.Ignite.Core.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     <PlatformTarget>x86</PlatformTarget>
@@ -39,6 +43,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <Optimize>true</Optimize>
     <DocumentationFile>bin\x86\Release\Apache.Ignite.Core.XML</DocumentationFile>
+    <CodeAnalysisRuleSet>Apache.Ignite.Core.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>
@@ -397,6 +402,7 @@
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
+    <None Include="Apache.Ignite.Core.ruleset" />
     <None Include="Apache.Ignite.Core.snk" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.ruleset
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.ruleset b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.ruleset
new file mode 100644
index 0000000..0b4f76b
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.ruleset
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Rules for Apache.Ignite.Core" Description="Code analysis rules for Apache.Ignite.Core.csproj." ToolsVersion="14.0">
+  <IncludeAll Action="Error" />
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1004" Action="None" />
+    <Rule Id="CA1005" Action="None" />
+    <Rule Id="CA1006" Action="None" />
+    <Rule Id="CA1020" Action="None" />
+    <Rule Id="CA1021" Action="None" />
+    <Rule Id="CA1024" Action="None" />
+    <Rule Id="CA1026" Action="None" />
+    <Rule Id="CA1303" Action="None" />
+    <Rule Id="CA1305" Action="None" />
+    <Rule Id="CA1307" Action="None" />
+    <Rule Id="CA1502" Action="None" />
+    <Rule Id="CA1506" Action="None" />
+    <Rule Id="CA1704" Action="None" />
+    <Rule Id="CA1709" Action="None" />
+    <Rule Id="CA1716" Action="None" />
+    <Rule Id="CA1720" Action="None" />
+    <Rule Id="CA1726" Action="None" />
+    <Rule Id="CA2001" Action="None" />
+    <Rule Id="CA2204" Action="None" />
+    <Rule Id="CA2243" Action="None" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryConfiguration.cs
index 5041a84..4d82a65 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryConfiguration.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Binary
 {
     using System.Collections.Generic;
     using System.Diagnostics.CodeAnalysis;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Binary type configuration.
@@ -39,6 +40,8 @@ namespace Apache.Ignite.Core.Binary
         /// <param name="cfg">Configuration to copy.</param>
         public BinaryConfiguration(BinaryConfiguration cfg)
         {
+            IgniteArgumentCheck.NotNull(cfg, "cfg");
+
             DefaultIdMapper = cfg.DefaultIdMapper;
             DefaultNameMapper = cfg.DefaultNameMapper;
             DefaultKeepDeserialized = cfg.DefaultKeepDeserialized;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeConfiguration.cs
index 99f8572..c36b9fd 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeConfiguration.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Binary
 {
     using System;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Binary type configuration.
@@ -47,6 +48,8 @@ namespace Apache.Ignite.Core.Binary
         /// <param name="type">Type.</param> 
         public BinaryTypeConfiguration(Type type)
         {
+            IgniteArgumentCheck.NotNull(type, "type");
+
             TypeName = type.AssemblyQualifiedName;
             IsEnum = type.IsEnum;
         }
@@ -57,6 +60,8 @@ namespace Apache.Ignite.Core.Binary
         /// <param name="cfg">Configuration to copy.</param>
         public BinaryTypeConfiguration(BinaryTypeConfiguration cfg)
         {
+            IgniteArgumentCheck.NotNull(cfg, "cfg");
+
             AffinityKeyFieldName = cfg.AffinityKeyFieldName;
             IdMapper = cfg.IdMapper;
             NameMapper = cfg.NameMapper;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeNames.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeNames.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeNames.cs
index f3d4ea6..1cb0cc5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeNames.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/BinaryTypeNames.cs
@@ -22,100 +22,100 @@ namespace Apache.Ignite.Core.Binary
     /// </summary>
     public static class BinaryTypeNames
     {
-        /** Type name: boolean. */
+        /// <summary> Type name: boolean. </summary>
         public const string TypeNameBool = "boolean";
 
-        /** Type name: byte. */
+        /// <summary> Type name: byte. </summary>
         public const string TypeNameByte = "byte";
 
-        /** Type name: short. */
+        /// <summary> Type name: short. </summary>
         public const string TypeNameShort = "short";
 
-        /** Type name: char. */
+        /// <summary> Type name: char. </summary>
         public const string TypeNameChar = "char";
 
-        /** Type name: int. */
+        /// <summary> Type name: int. </summary>
         public const string TypeNameInt = "int";
 
-        /** Type name: long. */
+        /// <summary> Type name: long. </summary>
         public const string TypeNameLong = "long";
 
-        /** Type name: float. */
+        /// <summary> Type name: float. </summary>
         public const string TypeNameFloat = "float";
 
-        /** Type name: double. */
+        /// <summary> Type name: double. </summary>
         public const string TypeNameDouble = "double";
 
-        /** Type name: decimal. */
+        /// <summary> Type name: decimal. </summary>
         public const string TypeNameDecimal = "decimal";
 
-        /** Type name: String. */
+        /// <summary> Type name: String. </summary>
         public const string TypeNameString = "String";
 
-        /** Type name: UUID. */
+        /// <summary> Type name: UUID. </summary>
         public const string TypeNameGuid = "UUID";
 
-        /** Type name: date. */
+        /// <summary> Type name: date. </summary>
         public const string TypeNameDate = "Date";
 
-        /** Type name: timestamp. */
+        /// <summary> Type name: timestamp. </summary>
         public const string TypeNameTimestamp = "Timestamp";
 
-        /** Type name: Enum. */
+        /// <summary> Type name: Enum. </summary>
         public const string TypeNameEnum = "Enum";
 
-        /** Type name: Object. */
+        /// <summary> Type name: Object. </summary>
         public const string TypeNameObject = "Object";
 
-        /** Type name: boolean array. */
+        /// <summary> Type name: boolean array. </summary>
         public const string TypeNameArrayBool = "boolean[]";
 
-        /** Type name: byte array. */
+        /// <summary> Type name: byte array. </summary>
         public const string TypeNameArrayByte = "byte[]";
 
-        /** Type name: short array. */
+        /// <summary> Type name: short array. </summary>
         public const string TypeNameArrayShort = "short[]";
 
-        /** Type name: char array. */
+        /// <summary> Type name: char array. </summary>
         public const string TypeNameArrayChar = "char[]";
 
-        /** Type name: int array. */
+        /// <summary> Type name: int array. </summary>
         public const string TypeNameArrayInt = "int[]";
 
-        /** Type name: long array. */
+        /// <summary> Type name: long array. </summary>
         public const string TypeNameArrayLong = "long[]";
 
-        /** Type name: float array. */
+        /// <summary> Type name: float array. </summary>
         public const string TypeNameArrayFloat = "float[]";
 
-        /** Type name: double array. */
+        /// <summary> Type name: double array. </summary>
         public const string TypeNameArrayDouble = "double[]";
 
-        /** Type name: decimal array. */
+        /// <summary> Type name: decimal array. </summary>
         public const string TypeNameArrayDecimal = "decimal[]";
 
-        /** Type name: String array. */
+        /// <summary> Type name: String array. </summary>
         public const string TypeNameArrayString = "String[]";
 
-        /** Type name: UUID array. */
+        /// <summary> Type name: UUID array. </summary>
         public const string TypeNameArrayGuid = "UUID[]";
 
-        /** Type name: timestamp array. */
+        /// <summary> Type name: timestamp array. </summary>
         public const string TypeNameArrayDate = "Date[]";
 
-        /** Type name: timestamp array. */
+        /// <summary> Type name: timestamp array. </summary>
         public const string TypeNameArrayTimestamp = "Timestamp[]";
 
-        /** Type name: Enum array. */
+        /// <summary> Type name: Enum array. </summary>
         public const string TypeNameArrayEnum = "Enum[]";
 
-        /** Type name: Object array. */
+        /// <summary> Type name: Object array. </summary>
         public const string TypeNameArrayObject = "Object[]";
 
-        /** Type name: Collection. */
+        /// <summary> Type name: Collection. </summary>
         public const string TypeNameCollection = "Collection";
 
-        /** Type name: Map. */
+        /// <summary> Type name: Map. </summary>
         public const string TypeNameMap = "Map";
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
index b3ed537..b80913f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
@@ -19,8 +19,10 @@ namespace Apache.Ignite.Core.Cache
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using System.Runtime.Serialization;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Exception thrown from non-transactional cache in case when update succeeded only partially.
@@ -109,6 +111,7 @@ namespace Apache.Ignite.Core.Cache
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             info.AddValue(KeyFailedKeys, _failedKeys);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CacheResult.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CacheResult.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CacheResult.cs
index 75208cd..b610298 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CacheResult.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CacheResult.cs
@@ -59,13 +59,25 @@ namespace Apache.Ignite.Core.Cache
             get { return _success; }
         }
 
-        /** <inehritdoc /> */
+        /// <summary>
+        /// Determines whether the specified <see cref="object" />, is equal to this instance.
+        /// </summary>
+        /// <param name="other">The <see cref="object" /> to compare with this instance.</param>
+        /// <returns>
+        ///   <c>true</c> if the specified <see cref="object" /> is equal to this instance; otherwise, <c>false</c>.
+        /// </returns>
         public bool Equals(CacheResult<T> other)
         {
             return EqualityComparer<T>.Default.Equals(_value, other._value) && _success == other._success;
         }
 
-        /** <inehritdoc /> */
+        /// <summary>
+        /// Determines whether the specified <see cref="object" />, is equal to this instance.
+        /// </summary>
+        /// <param name="obj">The <see cref="object" /> to compare with this instance.</param>
+        /// <returns>
+        ///   <c>true</c> if the specified <see cref="object" /> is equal to this instance; otherwise, <c>false</c>.
+        /// </returns>
         public override bool Equals(object obj)
         {
             if (ReferenceEquals(null, obj))
@@ -74,7 +86,12 @@ namespace Apache.Ignite.Core.Cache
             return obj is CacheResult<T> && Equals((CacheResult<T>) obj);
         }
 
-        /** <inehritdoc /> */
+        /// <summary>
+        /// Returns a hash code for this instance.
+        /// </summary>
+        /// <returns>
+        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. 
+        /// </returns>
         public override int GetHashCode()
         {
             unchecked
@@ -83,13 +100,27 @@ namespace Apache.Ignite.Core.Cache
             }
         }
 
-        /** <inehritdoc /> */
+        /// <summary>
+        /// Implements the operator ==.
+        /// </summary>
+        /// <param name="left">The left.</param>
+        /// <param name="right">The right.</param>
+        /// <returns>
+        /// The result of the operator.
+        /// </returns>
         public static bool operator ==(CacheResult<T> left, CacheResult<T> right)
         {
             return left.Equals(right);
         }
 
-        /** <inehritdoc /> */
+        /// <summary>
+        /// Implements the operator !=.
+        /// </summary>
+        /// <param name="left">The left.</param>
+        /// <param name="right">The right.</param>
+        /// <returns>
+        /// The result of the operator.
+        /// </returns>
         public static bool operator !=(CacheResult<T> left, CacheResult<T> right)
         {
             return !left.Equals(right);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventFilter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventFilter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventFilter.cs
index 98f5c5a..853619d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventFilter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventFilter.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.Core.Cache.Event
     /// <summary>
     /// Cache entry event filter.
     /// </summary>
+    // ReSharper disable TypeParameterCanBeVariant
     public interface ICacheEntryEventFilter<TK, TV>
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventListener.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventListener.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventListener.cs
index 76ae04c..f20c823 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventListener.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Event/ICacheEntryEventListener.cs
@@ -22,6 +22,7 @@ namespace Apache.Ignite.Core.Cache.Event
     /// <summary>
     /// Cache entry event listener.
     /// </summary>
+    // ReSharper disable TypeParameterCanBeVariant
     public interface ICacheEntryEventListener<TK, TV>
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
index dbf6c97..3bb136e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
@@ -47,8 +47,8 @@ namespace Apache.Ignite.Core.Cache.Query.Continuous
         /// <summary>
         /// Default time interval.
         /// </summary>
-        [SuppressMessage("ReSharper", "StaticMemberInGenericType")]
         [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+        [SuppressMessage("ReSharper", "StaticMemberInGenericType")]
         public static readonly TimeSpan DfltTimeInterval = new TimeSpan(0);
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
index 5bbfc1c..cf1f637 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
@@ -25,7 +25,7 @@ namespace Apache.Ignite.Core.Cache.Query
     /// </summary>
     public abstract class QueryBase
     {
-        /** Default page size. */
+        /// <summary> Default page size. </summary>
         public const int DfltPageSize = 1024;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
index c0d58ca..1753a8b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
@@ -24,7 +24,7 @@ namespace Apache.Ignite.Core.Cache.Query
     /// </summary>
     public class SqlFieldsQuery
     {
-        /** Default page size. */
+        /// <summary> Default page size. </summary>
         public const int DfltPageSize = 1024;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlQuery.cs
index 69dc7ee..0e3c887 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlQuery.cs
@@ -21,6 +21,7 @@ namespace Apache.Ignite.Core.Cache.Query
     using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Cache;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// SQL Query.
@@ -46,7 +47,7 @@ namespace Apache.Ignite.Core.Cache.Query
         /// <param name="local">Whether query should be executed locally.</param>
         /// <param name="args">Arguments.</param>
         public SqlQuery(Type queryType, string sql, bool local, params object[] args) 
-            : this(queryType.Name, sql, local, args)
+            : this(queryType == null ? null : queryType.Name, sql, local, args)
         {
             // No-op.
         }
@@ -71,6 +72,9 @@ namespace Apache.Ignite.Core.Cache.Query
         /// <param name="args">Arguments.</param>
         public SqlQuery(string queryType, string sql, bool local, params object[] args)
         {
+            IgniteArgumentCheck.NotNullOrEmpty("queryType", queryType);
+            IgniteArgumentCheck.NotNullOrEmpty("sql", sql);
+
             QueryType = queryType;
             Sql = sql;
             Local = local;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/TextQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/TextQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/TextQuery.cs
index 8c7880f..e77d6e3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/TextQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/TextQuery.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.Core.Cache.Query
     using System;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Cache;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Text query.
@@ -42,7 +43,8 @@ namespace Apache.Ignite.Core.Cache.Query
         /// <param name="queryType">Type.</param>
         /// <param name="text">Text.</param>
         /// <param name="local">Whether query should be executed locally.</param>
-        public TextQuery(Type queryType, string text, bool local) : this(queryType.Name, text, local)
+        public TextQuery(Type queryType, string text, bool local)
+            : this(queryType == null ? null : queryType.Name, text, local)
         {
             // No-op.
         }
@@ -65,6 +67,9 @@ namespace Apache.Ignite.Core.Cache.Query
         /// <param name="local">Whether query should be executed locally.</param>
         public TextQuery(string queryType, string text, bool local)
         {
+            IgniteArgumentCheck.NotNullOrEmpty("queryType", queryType);
+            IgniteArgumentCheck.NotNullOrEmpty("text", text);
+
             QueryType = queryType;
             Text = text;
             Local = local;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
index fe0aeaa..3f3b558 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
@@ -19,7 +19,9 @@ namespace Apache.Ignite.Core.Cache.Store
 {
     using System;
     using System.Collections;
+    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Cache storage convenience adapter. It provides default implementation for 
@@ -72,6 +74,7 @@ namespace Apache.Ignite.Core.Cache.Store
         /// Writes all.
         /// </summary>
         /// <param name="entries">The map.</param>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public virtual void WriteAll(IDictionary entries)
         {
             foreach (DictionaryEntry entry in entries)
@@ -95,6 +98,7 @@ namespace Apache.Ignite.Core.Cache.Store
         /// <param name="keys">a mutable collection of keys for entries to delete. Upon invocation,
         /// it contains the keys to delete for write-through. Upon return the collection must only contain
         /// the keys that were not successfully deleted.</param>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public virtual void DeleteAll(ICollection keys)
         {
             foreach (object key in keys)

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobAdapter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobAdapter.cs
index 2a0ed4e..c53279e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobAdapter.cs
@@ -88,7 +88,7 @@ namespace Apache.Ignite.Core.Compute
         public TArg GetArgument<TArg>(int idx)
         {
             if (_args == null || idx < 0 || idx >= _args.Length)
-                throw new IndexOutOfRangeException("Invalid argument index: " + idx);
+                throw new ArgumentOutOfRangeException("Invalid argument index: " + idx);
 
             return (TArg)_args[idx];
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobResultPolicy.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobResultPolicy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobResultPolicy.cs
index 9807c37..6283377 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobResultPolicy.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeJobResultPolicy.cs
@@ -17,8 +17,6 @@
 
 namespace Apache.Ignite.Core.Compute
 {
-    using System.Collections.Generic;
-
     /// <summary>
     /// This enumeration provides different types of actions following the last received job result. See 
     /// <see cref="IComputeTask{TA,T,TR}.OnResult"/>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
index db2ab51..f2d2e14 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
@@ -19,8 +19,10 @@ namespace Apache.Ignite.Core.Compute
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Convenience adapter for <see cref="IComputeTask{TArg,TJobRes,TTaskRes}"/> interface
@@ -42,6 +44,7 @@ namespace Apache.Ignite.Core.Compute
         /// <param name="res">Received remote Ignite executable result.</param>
         /// <param name="rcvd">All previously received results.</param>
         /// <returns>Result policy that dictates how to process further upcoming job results.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public virtual ComputeJobResultPolicy OnResult(IComputeJobResult<TJobRes> res,
             IList<IComputeJobResult<TJobRes>> rcvd)
         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
index 14651b1..bc152b5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
@@ -17,11 +17,12 @@
 
 namespace Apache.Ignite.Core.Compute
 {
-    using System;
     using System.Collections.Generic;
-    using System.Diagnostics;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
+    using Apache.Ignite.Core.Impl;
+    using Apache.Ignite.Core.Impl.Common;
     using Apache.Ignite.Core.Impl.Compute;
 
     /// <summary>
@@ -32,11 +33,6 @@ namespace Apache.Ignite.Core.Compute
     /// </summary>
     public abstract class ComputeTaskSplitAdapter<TArg, TJobRes, TTaskRes> : ComputeTaskAdapter<TArg, TJobRes, TTaskRes>
     {
-        /** Random generator */
-        [ThreadStatic]
-        // ReSharper disable once StaticMemberInGenericType
-        private static Random _rnd;
-
         /// <summary>
         /// This is a simplified version of <see cref="IComputeTask{A,T,R}.Map"/> method.
         /// <p/>
@@ -66,10 +62,9 @@ namespace Apache.Ignite.Core.Compute
         /// exception will be thrown.
         /// </returns>
         /// <exception cref="IgniteException">Split returned no jobs.</exception>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         override public IDictionary<IComputeJob<TJobRes>, IClusterNode> Map(IList<IClusterNode> subgrid, TArg arg)
         {
-            Debug.Assert(subgrid != null && subgrid.Count > 0);
-
             var jobs = Split(subgrid.Count, arg);
 
             if (jobs == null || jobs.Count == 0)
@@ -77,12 +72,11 @@ namespace Apache.Ignite.Core.Compute
 
             var map = new Dictionary<IComputeJob<TJobRes>, IClusterNode>(jobs.Count);
 
-            if (_rnd == null)
-                _rnd = new Random();
+            var rnd = IgniteUtils.ThreadLocalRandom;
 
             foreach (var job in jobs)
             {
-                int idx = _rnd.Next(subgrid.Count);
+                int idx = rnd.Next(subgrid.Count);
 
                 IClusterNode node = subgrid[idx];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamTransformer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamTransformer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamTransformer.cs
index d50e9b1..1735c3b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamTransformer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamTransformer.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Datastream
 {
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Impl.Binary;
@@ -50,6 +51,7 @@ namespace Apache.Ignite.Core.Datastream
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public void Receive(ICache<TK, TV> cache, ICollection<ICacheEntry<TK, TV>> entries)
         {
             var keys = new List<TK>(entries.Count);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamVisitor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamVisitor.cs
index 5d155d7..071f7a3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamVisitor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Datastream/StreamVisitor.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Datastream
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Impl.Common;
 
@@ -46,6 +47,7 @@ namespace Apache.Ignite.Core.Datastream
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public void Receive(ICache<TK, TV> cache, ICollection<ICacheEntry<TK, TV>> entries)
         {
             foreach (var entry in entries)

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheEvent.cs
index 2c3230d..4c75e0a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheEvent.cs
@@ -166,9 +166,11 @@ namespace Apache.Ignite.Core.Events
         /// Gets task name if cache event was caused by an operation initiated within task execution. 
         /// </summary>
         public string TaskName { get { return _taskName; } }
-        
-        /** <inheritDoc /> */
-	    public override string ToShortString()
+
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
+        public override string ToShortString()
 	    {
             return string.Format(CultureInfo.InvariantCulture, 
                 "{0}: IsNear={1}, Key={2}, HasNewValue={3}, HasOldValue={4}, NodeId={5}", Name, 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
index fe35793..e13a889 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
@@ -88,7 +88,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public string TaskName { get { return _taskName; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
 	        return string.Format(CultureInfo.InvariantCulture,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryReadEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryReadEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryReadEvent.cs
index 3e02d2f..3a01395 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryReadEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryReadEvent.cs
@@ -124,8 +124,10 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public object Row { get { return _row; } }
 
-        /** <inheritDoc /> */
-	    public override string ToShortString()
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
+        public override string ToShortString()
 	    {
 	        return string.Format(CultureInfo.InvariantCulture,
 	            "{0}: QueryType={1}, CacheName={2}, ClassName={3}, Clause={4}, SubjectId={5}, " +

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
index 9a648b5..31e448f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
@@ -88,7 +88,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public long DiscoveryTimestamp { get { return _discoveryTimestamp; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
 	        return string.Format(CultureInfo.InvariantCulture,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
index 1527341..5c85003 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
@@ -42,7 +42,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public string Key { get { return _key; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
             return string.Format(CultureInfo.InvariantCulture, "{0}: Key={1}", Name, Key);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
index c4d7b8e..5c163a2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
@@ -71,7 +71,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public ICollection<IClusterNode> TopologyNodes { get { return _topologyNodes; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
             return string.Format(CultureInfo.InvariantCulture, 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
index 4334158..962d577 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
@@ -19,11 +19,13 @@ namespace Apache.Ignite.Core.Events
 {
     using System;
     using System.Diagnostics;
+    using System.Diagnostics.CodeAnalysis;
     using System.Globalization;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Impl.Binary;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Base event implementation.
@@ -74,55 +76,82 @@ namespace Apache.Ignite.Core.Events
             _timestamp = timestamp.Value;
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets globally unique ID of this event.
+        /// </summary>
         public IgniteGuid Id
         {
             get { return _id; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets locally unique ID that is atomically incremented for each event. Unlike global <see cref="Id" />
+        /// this local ID can be used for ordering events on this node.
+        /// <para />
+        /// Note that for performance considerations Ignite doesn't order events globally.
+        /// </summary>
         public long LocalOrder
         {
             get { return _localOrder; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Node where event occurred and was recorded.
+        /// </summary>
         public IClusterNode Node
         {
             get { return _node; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets optional message for this event.
+        /// </summary>
         public string Message
         {
             get { return _message; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets type of this event. All system event types are defined in <see cref="EventType" />
+        /// </summary>
         public int Type
         {
             get { return _type; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets name of this event.
+        /// </summary>
         public string Name
         {
             get { return _name; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets event timestamp. Timestamp is local to the node on which this event was produced.
+        /// Note that more than one event can be generated with the same timestamp.
+        /// For ordering purposes use <see cref="LocalOrder" /> instead.
+        /// </summary>
         public DateTime Timestamp
         {
             get { return _timestamp; }
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
         public virtual string ToShortString()
         {
             return ToString();
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Determines whether the specified object is equal to this instance.
+        /// </summary>
+        /// <param name="other">The object to compare with this instance.</param>
+        /// <returns>
+        ///   <c>true</c> if the specified object is equal to this instance; otherwise, <c>false</c>.
+        /// </returns>
         public bool Equals(EventBase other)
         {
             if (ReferenceEquals(null, other)) return false;
@@ -131,7 +160,13 @@ namespace Apache.Ignite.Core.Events
             return _id.Equals(other._id);
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Determines whether the specified object is equal to this instance.
+        /// </summary>
+        /// <param name="obj">The object to compare with this instance.</param>
+        /// <returns>
+        ///   <c>true</c> if the specified object is equal to this instance; otherwise, <c>false</c>.
+        /// </returns>
         public override bool Equals(object obj)
         {
             if (ReferenceEquals(null, obj)) return false;
@@ -141,13 +176,23 @@ namespace Apache.Ignite.Core.Events
             return Equals((EventBase) obj);
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Returns a hash code for this instance.
+        /// </summary>
+        /// <returns>
+        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. 
+        /// </returns>
         public override int GetHashCode()
         {
             return _id.GetHashCode();
         }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Returns a <see cref="string" /> that represents this instance.
+        /// </summary>
+        /// <returns>
+        /// A <see cref="string" /> that represents this instance.
+        /// </returns>
         public override string ToString()
         {
             return string.Format(CultureInfo.InvariantCulture, 
@@ -159,6 +204,7 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         /// <param name="reader">Reader.</param>
         /// <returns>Node or null.</returns>
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         protected static IClusterNode ReadNode(IBinaryRawReader reader)
         {
             return ((BinaryReader)reader).Marshaller.Ignite.GetNode(reader.ReadGuid());

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index 7a3fafc..3a27ad1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -148,8 +148,7 @@ namespace Apache.Ignite.Core
 
                 var gridName = cfgEx != null ? cfgEx.GridName : null;
 
-                var cfgPath = Environment.GetEnvironmentVariable(EnvIgniteSpringConfigUrlPrefix) +
-                    (cfg.SpringConfigUrl ?? DefaultCfg);
+                var cfgPath = Environment.GetEnvironmentVariable(EnvIgniteSpringConfigUrlPrefix) + cfg.SpringConfigUrl;
 
                 // 3. Create startup object which will guide us through the rest of the process.
                 _startup = new Startup(cfg, cbs);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Binary.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Binary.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Binary.cs
index 7062606..9b43564 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Binary.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Binary.cs
@@ -23,7 +23,6 @@ namespace Apache.Ignite.Core.Impl.Binary
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Impl.Binary.IO;
-    using Apache.Ignite.Core.Impl.Binary.Metadata;
     using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
@@ -49,25 +48,26 @@ namespace Apache.Ignite.Core.Impl.Binary
             if (obj is IBinaryObject)
                 return (T)obj;
 
-            IBinaryStream stream = new BinaryHeapStream(1024);
-
-            // Serialize.
-            BinaryWriter writer = _marsh.StartMarshal(stream);
-
-            try
+            using (var stream = new BinaryHeapStream(1024))
             {
-                writer.Write(obj);
+                // Serialize.
+                BinaryWriter writer = _marsh.StartMarshal(stream);
+
+                try
+                {
+                    writer.Write(obj);
+                }
+                finally
+                {
+                    // Save metadata.
+                    _marsh.FinishMarshal(writer);
+                }
+
+                // Deserialize.
+                stream.Seek(0, SeekOrigin.Begin);
+
+                return _marsh.Unmarshal<T>(stream, BinaryMode.ForceBinary);
             }
-            finally
-            {
-                // Save metadata.
-                _marsh.FinishMarshal(writer);
-            }
-
-            // Deserialize.
-            stream.Seek(0, SeekOrigin.Begin);
-
-            return _marsh.Unmarshal<T>(stream, BinaryMode.ForceBinary);
         }
 
         /** <inheritDoc /> */
@@ -191,16 +191,17 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <returns>Empty binary object.</returns>
         private BinaryObject BinaryFromDescriptor(IBinaryTypeDescriptor desc)
         {
-            var len = BinaryObjectHeader.Size;
+            const int len = BinaryObjectHeader.Size;
 
             var hdr = new BinaryObjectHeader(desc.TypeId, 0, len, 0, len,
                 desc.UserType ? BinaryObjectHeader.Flag.UserType : BinaryObjectHeader.Flag.None);
 
-            var stream = new BinaryHeapStream(len);
-
-            BinaryObjectHeader.Write(hdr, stream, 0);
+            using (var stream = new BinaryHeapStream(len))
+            {
+                BinaryObjectHeader.Write(hdr, stream, 0);
 
-            return new BinaryObject(_marsh, stream.InternalArray, 0, hdr);
+                return new BinaryObject(_marsh, stream.InternalArray, 0, hdr);
+            }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs
index 3d2b34d..ac86770 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs
@@ -64,7 +64,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         private readonly BinaryObjectSchema _schema = new BinaryObjectSchema();
 
         /** Enum flag. */
-        private bool _isEnum;
+        private readonly bool _isEnum;
 
         /// <summary>
         /// Constructor.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs
index 16f95a1..513333b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs
@@ -110,11 +110,12 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <returns>Field value.</returns>
         public T GetField<T>(int pos, BinaryObjectBuilder builder)
         {
-            IBinaryStream stream = new BinaryHeapStream(_data);
-
-            stream.Seek(pos + _offset, SeekOrigin.Begin);
+            using (IBinaryStream stream = new BinaryHeapStream(_data))
+            {
+                stream.Seek(pos + _offset, SeekOrigin.Begin);
 
-            return _marsh.Unmarshal<T>(stream, BinaryMode.ForceBinary, builder);
+                return _marsh.Unmarshal<T>(stream, BinaryMode.ForceBinary, builder);
+            }
         }
 
         /** <inheritdoc /> */
@@ -150,13 +151,16 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             if (_deserialized == null)
             {
-                IBinaryStream stream = new BinaryHeapStream(_data);
+                T res;
 
-                stream.Seek(_offset, SeekOrigin.Begin);
+                using (IBinaryStream stream = new BinaryHeapStream(_data))
+                {
+                    stream.Seek(_offset, SeekOrigin.Begin);
 
-                T res = _marsh.Unmarshal<T>(stream, mode);
+                    res = _marsh.Unmarshal<T>(stream, mode);
+                }
 
-                IBinaryTypeDescriptor desc = _marsh.GetDescriptor(true, _header.TypeId);
+                var desc = _marsh.GetDescriptor(true, _header.TypeId);
 
                 if (!desc.KeepDeserialized)
                     return res;
@@ -208,11 +212,12 @@ namespace Apache.Ignite.Core.Impl.Binary
             if (_fields != null) 
                 return;
 
-            var stream = new BinaryHeapStream(_data);
-
-            var hdr = BinaryObjectHeader.Read(stream, _offset);
+            using (var stream = new BinaryHeapStream(_data))
+            {
+                var hdr = BinaryObjectHeader.Read(stream, _offset);
 
-            _fields = hdr.ReadSchemaAsDictionary(stream, _offset) ?? EmptyFields;
+                _fields = hdr.ReadSchemaAsDictionary(stream, _offset) ?? EmptyFields;
+            }
         }
 
         /** <inheritdoc /> */
@@ -262,15 +267,16 @@ namespace Apache.Ignite.Core.Impl.Binary
 
                     // 4. Check if objects have the same raw data.
                     // ReSharper disable ImpureMethodCallOnReadonlyValueField (method is not impure)
-                    var stream = new BinaryHeapStream(_data);
-                    var rawOffset = _header.GetRawOffset(stream, _offset);
+                    using (var stream = new BinaryHeapStream(_data))
+                    using (var thatStream = new BinaryHeapStream(that._data))
+                    {
+                        var rawOffset = _header.GetRawOffset(stream, _offset);
+                        var thatRawOffset = that._header.GetRawOffset(thatStream, that._offset);
 
-                    var thatStream = new BinaryHeapStream(that._data);
-                    var thatRawOffset = that._header.GetRawOffset(thatStream, that._offset);
+                        return BinaryUtils.CompareArrays(_data, _offset + rawOffset, _header.Length - rawOffset,
+                            that._data, that._offset + thatRawOffset, that._header.Length - thatRawOffset);
+                    }
                     // ReSharper restore ImpureMethodCallOnReadonlyValueField
-
-                    return BinaryUtils.CompareArrays(_data, _offset + rawOffset, _header.Length - rawOffset, 
-                        that._data, that._offset + thatRawOffset, that._header.Length - thatRawOffset);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs
index f41514f..0f1c0bd 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs
@@ -352,38 +352,35 @@ namespace Apache.Ignite.Core.Impl.Binary
         /** <inheritDoc /> */
         public IBinaryObject Build()
         {
-            BinaryHeapStream inStream = new BinaryHeapStream(_obj.Data);
-
-            inStream.Seek(_obj.Offset, SeekOrigin.Begin);
-
             // Assume that resulting length will be no less than header + [fields_cnt] * 12;
             int estimatedCapacity = BinaryObjectHeader.Size + (_vals == null ? 0 : _vals.Count*12);
 
-            BinaryHeapStream outStream = new BinaryHeapStream(estimatedCapacity);
-
-            BinaryWriter writer = _binary.Marshaller.StartMarshal(outStream);
+            using (var outStream = new BinaryHeapStream(estimatedCapacity))
+            {
+                BinaryWriter writer = _binary.Marshaller.StartMarshal(outStream);
 
-            writer.SetBuilder(this);
+                writer.SetBuilder(this);
 
-            // All related builders will work in this context with this writer.
-            _parent._ctx = new Context(writer);
+                // All related builders will work in this context with this writer.
+                _parent._ctx = new Context(writer);
             
-            try
-            {
-                // Write.
-                writer.Write(this);
+                try
+                {
+                    // Write.
+                    writer.Write(this);
                 
-                // Process metadata.
-                _binary.Marshaller.FinishMarshal(writer);
+                    // Process metadata.
+                    _binary.Marshaller.FinishMarshal(writer);
 
-                // Create binary object once metadata is processed.
-                return new BinaryObject(_binary.Marshaller, outStream.InternalArray, 0, 
-                    BinaryObjectHeader.Read(outStream, 0));
-            }
-            finally
-            {
-                // Cleanup.
-                _parent._ctx.Closed = true;
+                    // Create binary object once metadata is processed.
+                    return new BinaryObject(_binary.Marshaller, outStream.InternalArray, 0, 
+                        BinaryObjectHeader.Read(outStream, 0));
+                }
+                finally
+                {
+                    // Cleanup.
+                    _parent._ctx.Closed = true;
+                }
             }
         }
 
@@ -783,12 +780,13 @@ namespace Apache.Ignite.Core.Impl.Binary
         internal void ProcessBinary(IBinaryStream outStream, BinaryObject port)
         {
             // Special case: writing binary object with correct inversions.
-            BinaryHeapStream inStream = new BinaryHeapStream(port.Data);
-
-            inStream.Seek(port.Offset, SeekOrigin.Begin);
+            using (var inStream = new BinaryHeapStream(port.Data))
+            {
+                inStream.Seek(port.Offset, SeekOrigin.Begin);
 
-            // Use fresh context to ensure correct binary inversion.
-            Mutate0(new Context(), inStream, outStream, false, 0, EmptyVals);
+                // Use fresh context to ensure correct binary inversion.
+                Mutate0(new Context(), inStream, outStream, false, 0, EmptyVals);
+            }
         }
 
         /// <summary>
@@ -798,18 +796,19 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <param name="builder">Builder.</param>
         internal void ProcessBuilder(IBinaryStream outStream, BinaryObjectBuilder builder)
         {
-            BinaryHeapStream inStream = new BinaryHeapStream(builder._obj.Data);
-
-            inStream.Seek(builder._obj.Offset, SeekOrigin.Begin);
+            using (var inStream = new BinaryHeapStream(builder._obj.Data))
+            {
+                inStream.Seek(builder._obj.Offset, SeekOrigin.Begin);
 
-            // Builder parent context might be null only in one case: if we never met this group of
-            // builders before. In this case we set context to their parent and track it. Context
-            // cleanup will be performed at the very end of build process.
-            if (builder._parent._ctx == null || builder._parent._ctx.Closed)
-                builder._parent._ctx = new Context(_parent._ctx);
+                // Builder parent context might be null only in one case: if we never met this group of
+                // builders before. In this case we set context to their parent and track it. Context
+                // cleanup will be performed at the very end of build process.
+                if (builder._parent._ctx == null || builder._parent._ctx.Closed)
+                    builder._parent._ctx = new Context(_parent._ctx);
 
-            builder.Mutate(inStream, outStream as BinaryHeapStream, builder._desc,
+                builder.Mutate(inStream, (BinaryHeapStream) outStream, builder._desc,
                     builder._hashCode, builder._vals);
+            }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReader.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReader.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReader.cs
index 105589a..1c5c719 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReader.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReader.cs
@@ -538,6 +538,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             T res;
 
+            // ReSharper disable once CompareNonConstrainedGenericWithNull
             if (!TryDeserialize(out res) && default(T) != null)
                 throw new BinaryObjectException(string.Format("Invalid data on deserialization. " +
                     "Expected: '{0}' But was: null", typeof (T)));

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReflectiveSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReflectiveSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReflectiveSerializer.cs
index 0804c25..ceffef5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReflectiveSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReflectiveSerializer.cs
@@ -42,7 +42,7 @@ namespace Apache.Ignite.Core.Impl.Binary
     internal class BinaryReflectiveSerializer : IBinarySerializer
     {
         /** Cached binding flags. */
-        private static readonly BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public |
+        private const BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public | 
             BindingFlags.NonPublic | BindingFlags.DeclaredOnly;
 
         /** Cached type descriptors. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
index 7596992..36e324d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
@@ -419,7 +419,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             ctx.Stream.WriteByte(BinaryUtils.TypeArrayByte);
 
-            BinaryUtils.WriteByteArray((byte[])(Array)obj, ctx.Stream);
+            BinaryUtils.WriteByteArray((byte[]) obj, ctx.Stream);
         }
 
         /// <summary>
@@ -443,7 +443,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             ctx.Stream.WriteByte(BinaryUtils.TypeArrayShort);
 
-            BinaryUtils.WriteShortArray((short[])(Array)obj, ctx.Stream);
+            BinaryUtils.WriteShortArray((short[]) obj, ctx.Stream);
         }
 
         /// <summary>
@@ -479,7 +479,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             ctx.Stream.WriteByte(BinaryUtils.TypeArrayInt);
 
-            BinaryUtils.WriteIntArray((int[])(Array)obj, ctx.Stream);
+            BinaryUtils.WriteIntArray((int[]) obj, ctx.Stream);
         }
 
         /// <summary>
@@ -503,7 +503,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             ctx.Stream.WriteByte(BinaryUtils.TypeArrayLong);
 
-            BinaryUtils.WriteLongArray((long[])(Array)obj, ctx.Stream);
+            BinaryUtils.WriteLongArray((long[]) obj, ctx.Stream);
         }
 
         /// <summary>
@@ -799,6 +799,7 @@ namespace Apache.Ignite.Core.Impl.Binary
             }
 
             /** <inheritdoc /> */
+            [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
             T2 IBinarySystemReader<T2>.Read(BinaryReader ctx)
             {
                 return _readDelegate2(ctx.Stream);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
index 1c85e31..06dec2c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
@@ -227,15 +227,14 @@ namespace Apache.Ignite.Core.Impl.Binary
         private static readonly long JavaDateTicks = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).Ticks;
         
         /** Bindig flags for static search. */
-        private static BindingFlags _bindFlagsStatic = 
-            BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
+        private const BindingFlags BindFlagsStatic = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
 
         /** Default poratble marshaller. */
         private static readonly Marshaller Marsh = new Marshaller(null);
 
         /** Method: ReadArray. */
         public static readonly MethodInfo MtdhReadArray =
-            typeof(BinaryUtils).GetMethod("ReadArray", _bindFlagsStatic);
+            typeof(BinaryUtils).GetMethod("ReadArray", BindFlagsStatic);
 
         /** Cached UTF8 encoding. */
         private static readonly Encoding Utf8 = Encoding.UTF8;
@@ -1125,7 +1124,7 @@ namespace Apache.Ignite.Core.Impl.Binary
                 res = factory.Invoke(len);
 
             if (adder == null)
-                adder = (col, elem) => { ((ArrayList) col).Add(elem); };
+                adder = (col, elem) => ((ArrayList) col).Add(elem);
 
             for (int i = 0; i < len; i++)
                 adder.Invoke(res, ctx.Deserialize<object>());

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
index 189cd50..a7ce544 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
@@ -803,6 +803,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <param name="val">Enum value.</param>
         public void WriteEnum<T>(T val)
         {
+            // ReSharper disable once CompareNonConstrainedGenericWithNull
             if (val == null)
                 WriteNullField();
             else
@@ -879,6 +880,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             WriteFieldId(fieldName, BinaryUtils.TypeObject);
 
+            // ReSharper disable once CompareNonConstrainedGenericWithNull
             if (val == null)
                 WriteNullField();
             else
@@ -1051,6 +1053,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         public void Write<T>(T obj)
         {
             // Handle special case for null.
+            // ReSharper disable once CompareNonConstrainedGenericWithNull
             if (obj == null)
             {
                 _stream.WriteByte(BinaryUtils.HdrNull);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Io/BinaryHeapStream.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Io/BinaryHeapStream.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Io/BinaryHeapStream.cs
index 2265abc..1bf4d21 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Io/BinaryHeapStream.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Io/BinaryHeapStream.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
 {
     using System;
     using System.Diagnostics;
+    using System.Diagnostics.CodeAnalysis;
     using System.IO;
     using System.Text;
 
@@ -69,6 +70,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteByteArray(byte[] val)
         {
             int pos0 = EnsureWriteCapacityAndShift(val.Length);
@@ -91,6 +93,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteBoolArray(bool[] val)
         {
             int pos0 = EnsureWriteCapacityAndShift(val.Length);
@@ -135,6 +138,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteShortArray(short[] val)
         {
             int cnt = val.Length << 1;
@@ -161,6 +165,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteCharArray(char[] val)
         {
             int cnt = val.Length << 1;
@@ -220,6 +225,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteIntArray(int[] val)
         {
             int cnt = val.Length << 2;
@@ -246,6 +252,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteFloatArray(float[] val)
         {
             int cnt = val.Length << 2;
@@ -294,6 +301,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteLongArray(long[] val)
         {
             int cnt = val.Length << 3;
@@ -320,6 +328,7 @@ namespace Apache.Ignite.Core.Impl.Binary.IO
         }
 
         /** <inheritdoc /> */
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public override void WriteDoubleArray(double[] val)
         {
             int cnt = val.Length << 3;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
index 457830f..4274744 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
@@ -112,11 +112,12 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <returns>Serialized data as byte array.</returns>
         public byte[] Marshal<T>(T val)
         {
-            BinaryHeapStream stream = new BinaryHeapStream(128);
-
-            Marshal(val, stream);
+            using (var stream = new BinaryHeapStream(128))
+            {
+                Marshal(val, stream);
 
-            return stream.GetArrayCopy();
+                return stream.GetArrayCopy();
+            }
         }
 
         /// <summary>
@@ -170,7 +171,10 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// </returns>
         public T Unmarshal<T>(byte[] data, bool keepBinary)
         {
-            return Unmarshal<T>(new BinaryHeapStream(data), keepBinary);
+            using (var stream = new BinaryHeapStream(data))
+            {
+                return Unmarshal<T>(stream, keepBinary);
+            }
         }
 
         /// <summary>
@@ -183,7 +187,10 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// </returns>
         public T Unmarshal<T>(byte[] data, BinaryMode mode = BinaryMode.Deserialize)
         {
-            return Unmarshal<T>(new BinaryHeapStream(data), mode);
+            using (var stream = new BinaryHeapStream(data))
+            {
+                return Unmarshal<T>(stream, mode);
+            }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs
index 476e651..28dfb1a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs
@@ -57,6 +57,8 @@ namespace Apache.Ignite.Core.Impl.Binary.Metadata
         /// <summary>
         /// Initializes the <see cref="BinaryType"/> class.
         /// </summary>
+        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
+            Justification = "Readability.")]
         static BinaryType()
         {
             TypeNames[BinaryUtils.TypeBool] = BinaryTypeNames.TypeNameBool;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
index 2da854f..08b44df 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
@@ -54,7 +54,13 @@ namespace Apache.Ignite.Core.Impl.Binary
 
             var writer0 = (BinaryWriter)writer.GetRawWriter();
 
-            writer0.WithDetach(w => new BinaryFormatter().Serialize(new BinaryStreamAdapter(w.Stream), Item));
+            writer0.WithDetach(w =>
+            {
+                using (var streamAdapter = new BinaryStreamAdapter(w.Stream))
+                {
+                    new BinaryFormatter().Serialize(streamAdapter, Item);
+                }
+            });
         }
 
         /// <summary>
@@ -67,7 +73,10 @@ namespace Apache.Ignite.Core.Impl.Binary
 
             var reader0 = (BinaryReader) reader.GetRawReader();
 
-            _item = new BinaryFormatter().Deserialize(new BinaryStreamAdapter(reader0.Stream), null);
+            using (var streamAdapter = new BinaryStreamAdapter(reader0.Stream))
+            {
+                _item = new BinaryFormatter().Deserialize(streamAdapter, null);
+            }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/a34d7058/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Structure/BinaryStructure.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Structure/BinaryStructure.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Structure/BinaryStructure.cs
index 3c97877..92c841c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Structure/BinaryStructure.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Structure/BinaryStructure.cs
@@ -86,7 +86,8 @@ namespace Apache.Ignite.Core.Impl.Binary.Structure
                 if (entry.IsExpected(fieldName, fieldType))
                     // Entry matches our expectations, return.
                     return entry.Id;
-                else if (entry.IsJumpTable)
+
+                if (entry.IsJumpTable)
                 {
                     // Entry is a pointer to a jump table.
                     Debug.Assert(entry.Id < _jumps.Length);


[05/49] ignite git commit: reverted latest commit

Posted by nt...@apache.org.
reverted latest commit


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

Branch: refs/heads/ignite-2435
Commit: 795a2455f39f3bbfc4f2d9f6b0fce990fc20b78f
Parents: 31eb38d
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jan 27 13:25:08 2016 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jan 27 13:25:08 2016 +0300

----------------------------------------------------------------------
 examples/pom.xml                                               | 2 +-
 examples/schema-import/pom.xml                                 | 2 +-
 modules/aop/pom.xml                                            | 2 +-
 modules/apache-license-gen/pom.xml                             | 2 +-
 modules/aws/pom.xml                                            | 2 +-
 modules/benchmarks/pom.xml                                     | 5 ++---
 modules/camel/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/modules/uri-dependency/pom.xml             | 2 +-
 modules/extdata/uri/pom.xml                                    | 2 +-
 modules/flume/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/jms11/pom.xml                                          | 2 +-
 modules/jta/pom.xml                                            | 2 +-
 modules/kafka/pom.xml                                          | 2 +-
 modules/log4j/pom.xml                                          | 2 +-
 modules/log4j2/pom.xml                                         | 2 +-
 modules/mesos/pom.xml                                          | 2 +-
 modules/mqtt/pom.xml                                           | 2 +-
 modules/osgi-karaf/pom.xml                                     | 2 +-
 modules/osgi-paxlogging/pom.xml                                | 2 +-
 modules/osgi/pom.xml                                           | 2 +-
 modules/platforms/cpp/common/configure.ac                      | 2 +-
 modules/platforms/cpp/core-test/configure.ac                   | 2 +-
 modules/platforms/cpp/core/configure.ac                        | 2 +-
 modules/platforms/cpp/examples/configure.ac                    | 2 +-
 modules/platforms/cpp/ignite/configure.ac                      | 2 +-
 .../dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs | 6 +++---
 .../Properties/AssemblyInfo.cs                                 | 6 +++---
 .../dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs | 6 +++---
 .../dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs       | 6 +++---
 .../platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs  | 6 +++---
 .../examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs | 6 +++---
 .../Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs       | 6 +++---
 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/storm/pom.xml                                          | 6 ++----
 modules/tools/pom.xml                                          | 2 +-
 modules/twitter/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 +-
 modules/yarn/pom.xml                                           | 2 +-
 modules/zookeeper/pom.xml                                      | 2 +-
 pom.xml                                                        | 2 +-
 66 files changed, 82 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 41ad2b8..d8a38d8 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/examples/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/examples/schema-import/pom.xml b/examples/schema-import/pom.xml
index 175ae1d..62bb773 100644
--- a/examples/schema-import/pom.xml
+++ b/examples/schema-import/pom.xml
@@ -35,7 +35,7 @@
     </properties>
 
     <artifactId>ignite-schema-import-demo</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 5b16aa2..e34c6a5 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/apache-license-gen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/pom.xml b/modules/apache-license-gen/pom.xml
index e31d434..99490cf 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,7 +31,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>ignite-apache-license-gen</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index efd3b36..9fcdd6f 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index 1c4ee58..67e4727 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-benchmarks</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>
@@ -103,8 +103,7 @@
                         <configuration>
                             <finalName>${uberjar.name}</finalName>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>org.openjdk.jmh.Main</mainClass>
                                 </transformer>
                             </transformers>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/camel/pom.xml
----------------------------------------------------------------------
diff --git a/modules/camel/pom.xml b/modules/camel/pom.xml
index ca8cb29..df9a3d5 100644
--- a/modules/camel/pom.xml
+++ b/modules/camel/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-camel</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 1b06685..73a2161 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index b4a84c3..11b9a14 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
     </parent>
 
     <artifactId>ignite-cloud</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index e5b1d05..e88a797 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index b07a754..3c16366 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <repositories>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/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 05d5253..fb57498 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.5.1.final-SNAPSHOT
+ignite.version=1.6.0-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index c682da5..4f79bee 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/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 91718cf..7df32f2 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -27,7 +27,7 @@
     <artifactId>ignite-extdata-uri-dep</artifactId>
     <packaging>jar</packaging>
 
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <modelVersion>4.0.0</modelVersion>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 7442aad..3d460ce 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -32,7 +32,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/flume/pom.xml
----------------------------------------------------------------------
diff --git a/modules/flume/pom.xml b/modules/flume/pom.xml
index 63ba1eb..91a4841 100644
--- a/modules/flume/pom.xml
+++ b/modules/flume/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-flume</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index ad25b33..b543083 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-gce</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index 6ccef90..d68f68a 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index a31df33..27466f4 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index b20bcb5..50b7082 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index e681cdf..22a52b2 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index e7285d2..f518a4c 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/jms11/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jms11/pom.xml b/modules/jms11/pom.xml
index fd0bbca..65cc94c 100644
--- a/modules/jms11/pom.xml
+++ b/modules/jms11/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jms11</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 586f16c..9418c9c 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index f18e038..e00b190 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-kafka</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 75fbbae..de422d6 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/log4j2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index e677e86..0de9801 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j2</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 8d96496..fa38265 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mesos</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/mqtt/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mqtt/pom.xml b/modules/mqtt/pom.xml
index 09319b8..23f204c 100644
--- a/modules/mqtt/pom.xml
+++ b/modules/mqtt/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mqtt</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/osgi-karaf/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-karaf/pom.xml b/modules/osgi-karaf/pom.xml
index da24d87..f12ca45 100644
--- a/modules/osgi-karaf/pom.xml
+++ b/modules/osgi-karaf/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi-karaf</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/osgi-paxlogging/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-paxlogging/pom.xml b/modules/osgi-paxlogging/pom.xml
index cbd7f5a..32fb9c6 100644
--- a/modules/osgi-paxlogging/pom.xml
+++ b/modules/osgi-paxlogging/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi-paxlogging</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi/pom.xml b/modules/osgi/pom.xml
index 1353707..f238a14 100644
--- a/modules/osgi/pom.xml
+++ b/modules/osgi/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-osgi</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/cpp/common/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/configure.ac b/modules/platforms/cpp/common/configure.ac
index 87d5fbc..b85fa3a 100644
--- a/modules/platforms/cpp/common/configure.ac
+++ b/modules/platforms/cpp/common/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite JNI bridge for C++], [1.5.1.7927], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
+AC_INIT([Apache Ignite JNI bridge for C++], [1.6.0.8653], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/cpp/core-test/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/configure.ac b/modules/platforms/cpp/core-test/configure.ac
index e07e478..c83bc62 100644
--- a/modules/platforms/cpp/core-test/configure.ac
+++ b/modules/platforms/cpp/core-test/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Test], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Test], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/cpp/core/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/configure.ac b/modules/platforms/cpp/core/configure.ac
index ae157eb..344aeb5 100644
--- a/modules/platforms/cpp/core/configure.ac
+++ b/modules/platforms/cpp/core/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
index b19a650..f5cf075 100644
--- a/modules/platforms/cpp/examples/configure.ac
+++ b/modules/platforms/cpp/examples/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Ingnite C++ examples],[1.5.1.7927],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_INIT([Ingnite C++ examples],[1.6.0.8653],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/cpp/ignite/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/configure.ac b/modules/platforms/cpp/ignite/configure.ac
index d0bb018..9ffbe51 100644
--- a/modules/platforms/cpp/ignite/configure.ac
+++ b/modules/platforms/cpp/ignite/configure.ac
@@ -19,7 +19,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Runner], [1.5.1.7927], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Runner], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
 AC_CONFIG_SRCDIR(src)
 
 AC_CANONICAL_SYSTEM

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
index 382329a..e60e4a3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("8fae8395-7e91-411a-a78f-44d6d3fed0fc")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
index e0a1ef1..d6e2175 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
@@ -45,6 +45,6 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
index 6ead979..d27ffc8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("de8dd5cc-7c7f-4a09-80d5-7086d9416a7b")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
index 0b6f277..71ee88d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
@@ -33,9 +33,9 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("97db45a8-f922-456a-a819-7b3c6e5e03ba")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]
 
 [assembly: CLSCompliant(true)]
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
index 57c1fcc..2fce9ea 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("0f9702ec-da7d-4ce5-b4b7-73310c885355")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
index 79908a1..e84c8e1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
 
 [assembly: Guid("41a0cb95-3435-4c78-b867-900b28e2c9ee")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
index 41808b0..008fa09 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Reflection;
 
 [assembly: Guid("ce65ec7c-d3cf-41ad-8f45-f90d5af68d77")]
 
-[assembly: AssemblyVersion("1.5.1.7927")]
-[assembly: AssemblyFileVersion("1.5.1.7927")]
-[assembly: AssemblyInformationalVersion("1.5.1.final")]
+[assembly: AssemblyVersion("1.6.0.8653")]
+[assembly: AssemblyFileVersion("1.6.0.8653")]
+[assembly: AssemblyInformationalVersion("1.6.0")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 2810a78..a0a5471 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/scalar-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml
index 6b47f62..e7a241e 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 9d04bb2..91a1152 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 506a800..43d48ac 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 48369e3..7156e32 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index a7c1ffe..4182f24 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index 5fdeb0a..9ba5fdd 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/spark/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml
index 8dd6257..effcf1e 100644
--- a/modules/spark/pom.xml
+++ b/modules/spark/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spark</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 18db32c..65ea6d0 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index fdf0ee7..bb08220 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/storm/pom.xml
----------------------------------------------------------------------
diff --git a/modules/storm/pom.xml b/modules/storm/pom.xml
index 0cd1fcb..1c180b8 100644
--- a/modules/storm/pom.xml
+++ b/modules/storm/pom.xml
@@ -20,9 +20,7 @@
 <!--
     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>
 
     <parent>
@@ -33,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-storm</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 3363623..a3ed0f3 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/twitter/pom.xml
----------------------------------------------------------------------
diff --git a/modules/twitter/pom.xml b/modules/twitter/pom.xml
index 654b897..f041bdb 100644
--- a/modules/twitter/pom.xml
+++ b/modules/twitter/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-twitter</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 75a8fd7..143e7a5 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/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 d9934b9..e8ae547 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 2644da7..0b628c8 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index fdc1b2b..61bd4ac 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.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 214f1ce..360bdfc 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 22d6ff7..52418d9 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index 564fd11..efd365f 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yarn</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/modules/zookeeper/pom.xml
----------------------------------------------------------------------
diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml
index 75cf61e..e296b55 100644
--- a/modules/zookeeper/pom.xml
+++ b/modules/zookeeper/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-zookeeper</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <url>http://ignite.apache.org</url>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/ignite/blob/795a2455/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2dd9698..4f797e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>apache-ignite</artifactId>
-    <version>1.5.1.final-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>


[11/49] ignite git commit: Do not show 'you should implement Externalizable' warning

Posted by nt...@apache.org.
Do not show 'you should implement Externalizable' warning


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

Branch: refs/heads/ignite-2435
Commit: 457e8c11c813f208bc7e007aa1159dd04e68d0e8
Parents: a4cf78a
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Wed Jan 27 19:04:48 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Wed Jan 27 19:04:48 2016 -0800

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  78 +----------
 .../processors/cache/GridCacheUtils.java        |  36 +----
 .../cache/GridCacheUtilsSelfTest.java           | 136 +------------------
 3 files changed, 11 insertions(+), 239 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/457e8c11/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 2582e6c..3081cfb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -216,9 +216,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     /** */
     protected boolean keyCheck = !Boolean.getBoolean(IGNITE_CACHE_KEY_VALIDATION_DISABLED);
 
-    /** */
-    private boolean valCheck = true;
-
     /** Last asynchronous future. */
     protected ThreadLocal<FutureHolder> lastFut = new ThreadLocal<FutureHolder>() {
         @Override protected FutureHolder initialValue() {
@@ -1926,8 +1923,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         V prevVal = syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAsync(ctx, key, val, true, filter).get().value();
@@ -1981,8 +1976,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, true, filter)
@@ -2020,8 +2013,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAsync(ctx, key, val, false, filter).get().success();
@@ -2341,8 +2332,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, false, filter).chain(
@@ -2368,8 +2357,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAsync(ctx, key, val, true, ctx.noValArray()).get().value();
@@ -2392,8 +2379,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, true, ctx.noValArray())
@@ -2422,8 +2407,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAsync(ctx, key, val, false, ctx.noValArray()).get().success();
@@ -2451,8 +2434,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, false, ctx.noValArray()).chain(
@@ -2477,8 +2458,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAsync(ctx, key, val, true, ctx.hasValArray()).get().value();
@@ -2501,8 +2480,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, true, ctx.hasValArray()).chain(
@@ -2527,8 +2504,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAsync(ctx, key, val, false, ctx.hasValArray()).get().success();
@@ -2547,8 +2522,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         return asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAsync(ctx, key, val, false, ctx.hasValArray()).chain(
@@ -2568,10 +2541,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(oldVal);
-
-        validateCacheValue(newVal);
-
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
@@ -2599,10 +2568,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(oldVal);
-
-        validateCacheValue(newVal);
-
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 // Register before hiding in the filter.
@@ -2642,8 +2607,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKeys(m.keySet());
 
-        validateCacheValues(m.values());
-
         syncOp(new SyncInOp(m.size() == 1) {
             @Override public void inOp(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 tx.putAllAsync(ctx, m, false, CU.empty0()).get();
@@ -2666,8 +2629,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKeys(m.keySet());
 
-        validateCacheValues(m.values());
-
         return asyncOp(new AsyncInOp(m.keySet()) {
             @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, m, false, CU.empty0()).chain(RET2NULL);
@@ -3067,8 +3028,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         boolean rmv = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
@@ -3104,8 +3063,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        validateCacheValue(val);
-
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 // Register before hiding in the filter.
@@ -4639,37 +4596,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     }
 
     /**
-     * Validates that given cache value implements {@link Externalizable}.
-     *
-     * @param val Cache value.
-     */
-    private void validateCacheValue(Object val) {
-        if (valCheck) {
-            CU.validateCacheValue(log, val);
-
-            valCheck = false;
-        }
-    }
-
-    /**
-     * Validates that given cache values implement {@link Externalizable}.
-     *
-     * @param vals Cache values.
-     */
-    private void validateCacheValues(Iterable<?> vals) {
-        if (valCheck) {
-            for (Object val : vals) {
-                if (val == null)
-                    continue;
-
-                CU.validateCacheValue(log, val);
-            }
-
-            valCheck = false;
-        }
-    }
-
-    /**
      * Validates that given cache key has overridden equals and hashCode methods and
      * implements {@link Externalizable}.
      *
@@ -4678,7 +4604,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      */
     protected void validateCacheKey(Object key) {
         if (keyCheck) {
-            CU.validateCacheKey(log, key);
+            CU.validateCacheKey(key);
 
             keyCheck = false;
         }
@@ -4700,7 +4626,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                 if (key == null || key instanceof GridCacheInternal)
                     continue;
 
-                CU.validateCacheKey(log, key);
+                CU.validateCacheKey(key);
 
                 keyCheck = false;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/457e8c11/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 51f6dcd..8723827 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -82,7 +82,6 @@ import org.apache.ignite.internal.util.typedef.P2;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.internal.util.typedef.internal.LT;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.lang.IgniteClosure;
@@ -1243,32 +1242,15 @@ public class GridCacheUtils {
     }
 
     /**
-     * Validates that cache value object implements {@link Externalizable}.
+     * Validates that cache key object has overridden equals and hashCode methods.
      *
-     * @param log Logger used to log warning message.
-     * @param val Value.
-     */
-    public static void validateCacheValue(IgniteLogger log, @Nullable Object val) {
-        if (val == null)
-            return;
-
-        validateExternalizable(log, val);
-    }
-
-    /**
-     * Validates that cache key object has overridden equals and hashCode methods and
-     * implements {@link Externalizable}.
-     *
-     * @param log Logger used to log warning message.
      * @param key Key.
      * @throws IllegalArgumentException If equals or hashCode is not implemented.
      */
-    public static void validateCacheKey(IgniteLogger log, @Nullable Object key) {
+    public static void validateCacheKey(@Nullable Object key) {
         if (key == null)
             return;
 
-        validateExternalizable(log, key);
-
         if (!U.overridesEqualsAndHashCode(key))
             throw new IllegalArgumentException("Cache key must override hashCode() and equals() methods: " +
                 key.getClass().getName());
@@ -1355,20 +1337,6 @@ public class GridCacheUtils {
             return 1;
     }
 
-    /**
-     * Validates that cache key or cache value implements {@link Externalizable}
-     *
-     * @param log Logger used to log warning message.
-     * @param obj Cache key or cache value.
-     */
-    private static void validateExternalizable(IgniteLogger log, Object obj) {
-        Class<?> cls = obj.getClass();
-
-        if (!cls.isArray() && !U.isJdk(cls) && !(obj instanceof Externalizable) && !(obj instanceof GridCacheInternal))
-            LT.warn(log, null, "For best performance you should implement " +
-                "java.io.Externalizable for all cache keys and values: " + cls.getName());
-    }
-
 //    /**
 //     * @param cfg Grid configuration.
 //     * @param cacheName Cache name.

http://git-wip-us.apache.org/repos/asf/ignite/blob/457e8c11/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
index b601fe2..d5888e7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
@@ -17,14 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
 import java.util.concurrent.Callable;
-import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.testframework.GridStringLogger;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
@@ -32,10 +26,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
  * Grid cache utils test.
  */
 public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static final String EXTERNALIZABLE_WARNING = "For best performance you should implement " +
-        "java.io.Externalizable";
-
     /**
      * Does not override equals and hashCode.
      */
@@ -92,38 +82,6 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Overrides equals and hashCode and implements {@link Externalizable}.
-     */
-    private static class ExternalizableEqualsAndHashCode implements Externalizable {
-        /**
-         * Constructor required by {@link Externalizable}.
-         */
-        public ExternalizableEqualsAndHashCode() {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return super.hashCode();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object obj) {
-            return super.equals(obj);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void writeExternal(ObjectOutput out) throws IOException {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-            // No-op.
-        }
-    }
-
-    /**
      * Extends class which overrides equals and hashCode.
      */
     private static class ExtendsClassWithEqualsAndHashCode extends EqualsAndHashCode {
@@ -145,59 +103,19 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Does not implement {@link Externalizable}.
-     */
-    private static class NoImplExternalizable {
-    }
-
-    /**
-     * Implements {@link Externalizable}.
-     */
-    private static class ImplExternalizable implements Externalizable  {
-        /**
-         * Constructor required by {@link Externalizable}.
-         */
-        public ImplExternalizable() {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void writeExternal(ObjectOutput out) throws IOException {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-            // No-op.
-        }
-    }
-
-    /**
-     * Extends class which implements {@link Externalizable}.
-     */
-    private static class ExtendsImplExternalizable extends ImplExternalizable {
-        /**
-         * Constructor required by {@link Externalizable}.
-         */
-        public ExtendsImplExternalizable() {
-            // No-op.
-        }
-    }
-
-    /**
      */
     public void testCacheKeyValidation() {
-        CU.validateCacheKey(log, "key");
+        CU.validateCacheKey("key");
 
-        CU.validateCacheKey(log, 1);
+        CU.validateCacheKey(1);
 
-        CU.validateCacheKey(log, 1L);
+        CU.validateCacheKey(1L);
 
-        CU.validateCacheKey(log, 1.0);
+        CU.validateCacheKey(1.0);
 
-        CU.validateCacheKey(log, new ExtendsClassWithEqualsAndHashCode());
+        CU.validateCacheKey(new ExtendsClassWithEqualsAndHashCode());
 
-        CU.validateCacheKey(log, new ExtendsClassWithEqualsAndHashCode2());
+        CU.validateCacheKey(new ExtendsClassWithEqualsAndHashCode2());
 
         assertThrowsForInvalidKey(new NoEqualsAndHashCode());
 
@@ -206,46 +124,6 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
         assertThrowsForInvalidKey(new NoHashCode());
 
         assertThrowsForInvalidKey(new WrongEquals());
-
-        IgniteLogger log = new GridStringLogger(false);
-
-        CU.validateCacheKey(log, new ExternalizableEqualsAndHashCode());
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheKey(log, "key");
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheKey(log, new EqualsAndHashCode());
-
-        assertTrue(log.toString().contains(EXTERNALIZABLE_WARNING));
-    }
-
-    /**
-     */
-    public void testCacheValueValidation() {
-        IgniteLogger log = new GridStringLogger(false);
-
-        CU.validateCacheValue(log, new ImplExternalizable());
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheValue(log, new ExtendsImplExternalizable());
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheValue(log, "val");
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheValue(log, new byte[10]);
-
-        assertFalse(log.toString().contains(EXTERNALIZABLE_WARNING));
-
-        CU.validateCacheValue(log, new NoImplExternalizable());
-
-        assertTrue(log.toString().contains(EXTERNALIZABLE_WARNING));
     }
 
     /**
@@ -254,7 +132,7 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
     private void assertThrowsForInvalidKey(final Object key) {
         GridTestUtils.assertThrows(log, new Callable<Void>() {
             @Override public Void call() throws Exception {
-                CU.validateCacheKey(log, key);
+                CU.validateCacheKey(key);
 
                 return null;
             }