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

[01/50] [abbrv] incubator-ignite git commit: #IGNITE-YARN

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-901 3518ba859 -> f44924a48


#IGNITE-YARN


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

Branch: refs/heads/ignite-901
Commit: b5691911dc545db3264afcf23153e2f9ec914724
Parents: 50cfa27
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Tue Jun 2 21:17:35 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Tue Jun 2 21:17:35 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 120 ++++++++++---------
 .../apache/ignite/yarn/IgniteYarnClient.java    | 116 +++++++++++++++++-
 .../ignite/yarn/IgniteSchedulerSelfTest.java    |   2 +
 3 files changed, 179 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5691911/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 f52a1de..9ab70d4 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
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.yarn;
 
+import com.google.common.collect.Lists;
 import org.apache.hadoop.conf.*;
 import org.apache.hadoop.yarn.api.*;
 import org.apache.hadoop.yarn.api.protocolrecords.*;
@@ -32,56 +33,87 @@ import java.util.*;
  * TODO
  */
 public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
-    /** {@inheritDoc} */
-    @Override public void onContainersCompleted(List<ContainerStatus> statuses) {
-
+    Configuration configuration;
+    NMClient nmClient;
+    int numContainersToWaitFor = 5;
+
+    public ApplicationMaster() {
+        configuration = new YarnConfiguration();
+        nmClient = NMClient.createNMClient();
+        nmClient.init(configuration);
+        nmClient.start();
     }
 
-    /** {@inheritDoc} */
-    @Override public void onContainersAllocated(List<Container> containers) {
+    public void onContainersAllocated(List<Container> containers) {
+        for (Container container : containers) {
+            try {
+                // Launch container by create ContainerLaunchContext
+                // bin/hadoop fs -rm /user/ntikhonov/*.jar && bin/hadoop fs -copyFromLocal ./ignite-yarn.jar /user/ntikhonov
+                ContainerLaunchContext ctx =
+                        Records.newRecord(ContainerLaunchContext.class);
+                ctx.setCommands(
+                        Lists.newArrayList(
+                                "ls " +
+                                " 1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" +
+                                " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr"
+                        ));
+                System.out.println("[AM] Launching container " + container.getId());
+                nmClient.startContainer(container, ctx);
+            } catch (Exception ex) {
+                System.err.println("[AM] Error launching container " + container.getId() + " " + ex);
+            }
+        }
+    }
 
+    public void onContainersCompleted(List<ContainerStatus> statuses) {
+        for (ContainerStatus status : statuses) {
+            System.out.println("[AM] Completed container " + status.getContainerId());
+            synchronized (this) {
+                numContainersToWaitFor--;
+            }
+        }
     }
 
-    /** {@inheritDoc} */
-    @Override public void onShutdownRequest() {
+    public void onNodesUpdated(List<NodeReport> updated) {
+    }
 
+    public void onReboot() {
     }
 
-    /** {@inheritDoc} */
-    @Override public void onNodesUpdated(List<NodeReport> updatedNodes) {
+    public void onShutdownRequest() {
+    }
 
+    public void onError(Throwable t) {
     }
 
-    /** {@inheritDoc} */
-    @Override public float getProgress() {
+    public float getProgress() {
         return 0;
     }
 
-    /** {@inheritDoc} */
-    @Override public void onError(Throwable e) {
+    public boolean doneWithContainers() {
+        return numContainersToWaitFor == 0;
+    }
 
+    public Configuration getConfiguration() {
+        return configuration;
     }
 
-    /**
-     * @param args Arguments.
-     */
     public static void main(String[] args) throws Exception {
-        final String command = args[0];
-        final int n = Integer.valueOf(args[1]);
+        ApplicationMaster master = new ApplicationMaster();
+        master.runMainLoop();
 
-        // Initialize clients to ResourceManager and NodeManagers
-        Configuration conf = new YarnConfiguration();
+    }
 
-        AMRMClient<AMRMClient.ContainerRequest> rmClient = AMRMClient.createAMRMClient();
-        rmClient.init(conf);
-        rmClient.start();
+    public void runMainLoop() throws Exception {
 
-        NMClient nmClient = NMClient.createNMClient();
-        nmClient.init(conf);
-        nmClient.start();
+        AMRMClientAsync<AMRMClient.ContainerRequest> rmClient = AMRMClientAsync.createAMRMClientAsync(100, this);
+        rmClient.init(getConfiguration());
+        rmClient.start();
 
         // Register with ResourceManager
+        System.out.println("[AM] registerApplicationMaster 0");
         rmClient.registerApplicationMaster("", 0, "");
+        System.out.println("[AM] registerApplicationMaster 1");
 
         // Priority for worker containers - priorities are intra-application
         Priority priority = Records.newRecord(Priority.class);
@@ -93,41 +125,21 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         capability.setVirtualCores(1);
 
         // Make container requests to ResourceManager
-        for (int i = 0; i < n; ++i) {
-            AMRMClient.ContainerRequest containerAsk =
-                new AMRMClient.ContainerRequest(capability, null, null, priority);
-
+        for (int i = 0; i < numContainersToWaitFor; ++i) {
+            AMRMClient.ContainerRequest containerAsk = new AMRMClient.ContainerRequest(capability, null, null, priority);
+            System.out.println("[AM] Making res-req " + i);
             rmClient.addContainerRequest(containerAsk);
         }
 
-        // Obtain allocated containers, launch and check for responses
-        int responseId = 0;
-        int completedContainers = 0;
-        while (completedContainers < n) {
-            AllocateResponse response = rmClient.allocate(responseId++);
-            for (Container container : response.getAllocatedContainers()) {
-                // Launch container by create ContainerLaunchContext
-                ContainerLaunchContext ctx =
-                    Records.newRecord(ContainerLaunchContext.class);
-
-                ctx.setCommands(
-                    Collections.singletonList(
-                        command +
-                            " 1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" +
-                            " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr"
-                    ));
-
-                nmClient.startContainer(container, ctx);
-            }
-            for (ContainerStatus status : response.getCompletedContainersStatuses()) {
-                ++completedContainers;
-                System.out.println("Completed container " + status.getContainerId());
-            }
+        System.out.println("[AM] waiting for containers to finish");
+        while (!doneWithContainers()) {
             Thread.sleep(100);
         }
 
+        System.out.println("[AM] unregisterApplicationMaster 0");
         // Un-register with ResourceManager
         rmClient.unregisterApplicationMaster(
-            FinalApplicationStatus.SUCCEEDED, "", "");
+                FinalApplicationStatus.SUCCEEDED, "", "");
+        System.out.println("[AM] unregisterApplicationMaster 1");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5691911/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 7cef50d..e020ef4 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -17,11 +17,24 @@
 
 package org.apache.ignite.yarn;
 
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
 import org.apache.hadoop.yarn.conf.*;
+import org.apache.hadoop.yarn.util.Apps;
+import org.apache.hadoop.yarn.util.ConverterUtils;
+import org.apache.hadoop.yarn.util.Records;
 
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.logging.*;
 
+import static org.apache.hadoop.yarn.api.ApplicationConstants.*;
+
 /**
  * Ignite yarn client.
  */
@@ -35,16 +48,109 @@ public class IgniteYarnClient {
      * @param args Args.
      */
     public static void main(String[] args) throws Exception {
-        ClusterProperties clusterProps = ClusterProperties.from(args.length >= 1 ? args[0] : null);
-
-        // Create yarnClient
         YarnConfiguration conf = new YarnConfiguration();
-
         YarnClient yarnClient = YarnClient.createYarnClient();
-
         yarnClient.init(conf);
         yarnClient.start();
 
+        // Create application via yarnClient
         YarnClientApplication app = yarnClient.createApplication();
+
+        // Set up the container launch context for the application master
+        ContainerLaunchContext amContainer = Records.newRecord(ContainerLaunchContext.class);
+
+        amContainer.setCommands(
+                Collections.singletonList(
+                        " $JAVA_HOME/bin/java -Xmx256M org.apache.ignite.yarn.ApplicationMaster" +
+                        " 1>" + LOG_DIR_EXPANSION_VAR + "/stdout" +
+                        " 2>" + LOG_DIR_EXPANSION_VAR + "/stderr"
+                )
+        );
+
+        // Setup jar for ApplicationMaster
+        final LocalResource appMasterJar = Records.newRecord(LocalResource.class);
+        setupAppMasterJar(new Path("/user/ntikhonov/ignite-yarn.jar"), appMasterJar, conf);
+
+        final LocalResource igniteZip = Records.newRecord(LocalResource.class);
+        setupAppMasterJar(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6.zip"), igniteZip, conf);
+
+        FileSystem fileSystem = FileSystem.get(conf);
+
+        Path path = fileSystem.makeQualified(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6/bin/ignite.sh"));
+
+        System.out.println("Path: " + path);
+        System.out.println("Path URI: " + path.toUri().toString());
+
+        amContainer.setLocalResources(new HashMap<String, LocalResource>(){{
+            put("ignite-yarn.jar", appMasterJar);
+            put("ignite", igniteZip);
+        }});
+
+        // Setup CLASSPATH for ApplicationMaster
+        Map<String, String> appMasterEnv = new HashMap<String, String>();
+        setupAppMasterEnv(appMasterEnv, conf);
+        amContainer.setEnvironment(appMasterEnv);
+
+        // Set up resource type requirements for ApplicationMaster
+        Resource capability = Records.newRecord(Resource.class);
+        capability.setMemory(256);
+        capability.setVirtualCores(1);
+
+        // Finally, set-up ApplicationSubmissionContext for the application
+        ApplicationSubmissionContext appContext =
+                app.getApplicationSubmissionContext();
+        appContext.setApplicationName("simple-yarn-app"); // application name
+        appContext.setAMContainerSpec(amContainer);
+        appContext.setResource(capability);
+        appContext.setQueue("default"); // queue
+
+        // Submit application
+        ApplicationId appId = appContext.getApplicationId();
+        System.out.println("Submitting application " + appId);
+        yarnClient.submitApplication(appContext);
+
+        ApplicationReport appReport = yarnClient.getApplicationReport(appId);
+        YarnApplicationState appState = appReport.getYarnApplicationState();
+        while (appState != YarnApplicationState.FINISHED &&
+                appState != YarnApplicationState.KILLED &&
+                appState != YarnApplicationState.FAILED) {
+            Thread.sleep(100);
+            appReport = yarnClient.getApplicationReport(appId);
+            appState = appReport.getYarnApplicationState();
+        }
+
+        System.out.println(
+                "Application " + appId + " finished with" +
+                        " state " + appState +
+                        " at " + appReport.getFinishTime());
+    }
+
+    private static void setupAppMasterJar(Path jarPath, LocalResource appMasterJar, YarnConfiguration conf)
+        throws Exception {
+        FileSystem fileSystem = FileSystem.get(conf);
+        jarPath = fileSystem.makeQualified(jarPath);
+
+        FileStatus jarStat = fileSystem.getFileStatus(jarPath);
+
+        appMasterJar.setResource(ConverterUtils.getYarnUrlFromPath(jarPath));
+        appMasterJar.setSize(jarStat.getLen());
+        appMasterJar.setTimestamp(jarStat.getModificationTime());
+        appMasterJar.setType(LocalResourceType.ARCHIVE);
+        appMasterJar.setVisibility(LocalResourceVisibility.APPLICATION);
+
+        System.out.println("Path :" + jarPath);
+    }
+
+    private static void setupAppMasterEnv(Map<String, String> appMasterEnv, YarnConfiguration conf) {
+        for (String c : conf.getStrings(
+                YarnConfiguration.YARN_APPLICATION_CLASSPATH,
+                YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH))
+            Apps.addToEnvironment(appMasterEnv, Environment.CLASSPATH.name(),
+                    c.trim(), File.pathSeparator);
+
+        Apps.addToEnvironment(appMasterEnv,
+                Environment.CLASSPATH.name(),
+                Environment.PWD.$() + File.separator + "*",
+                File.pathSeparator);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5691911/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
index 1a03743..04d3492 100644
--- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
+++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
@@ -23,5 +23,7 @@ import junit.framework.*;
  * Scheduler tests.
  */
 public class IgniteSchedulerSelfTest extends TestCase {
+    public void testName() throws Exception {
 
+    }
 }


[31/50] [abbrv] incubator-ignite git commit: #ignite-gg-10526: fix consistentId.

Posted by sb...@apache.org.
#ignite-gg-10526: fix consistentId.


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

Branch: refs/heads/ignite-901
Commit: 3dcf89167d2c0a9b53baddf533653ad5bb8bd5a5
Parents: 9dcca80
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jul 10 10:42:17 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jul 10 10:42:17 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/IgniteUtils.java    | 6 +-----
 .../ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java  | 8 ++++++--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcf8916/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 46a23d6..f457d6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -8048,13 +8048,9 @@ public abstract class IgniteUtils {
     public static String consistentId(Collection<String> addrs, int port) {
         assert !F.isEmpty(addrs);
 
-        List<String> sortedAddrs = new ArrayList<>(addrs);
-
-        Collections.sort(sortedAddrs);
-
         StringBuilder sb = new StringBuilder();
 
-        for (String addr : sortedAddrs)
+        for (String addr : addrs)
             sb.append(addr).append(',');
 
         sb.delete(sb.length() - 1, sb.length());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcf8916/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index 4b4df45..22f56c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -143,13 +143,17 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements Cluste
         assert ver != null;
 
         this.id = id;
-        this.addrs = addrs;
+
+        List<String> sortedAddrs = new ArrayList<>(addrs);
+        Collections.sort(sortedAddrs);
+
+        this.addrs = sortedAddrs;
         this.hostNames = hostNames;
         this.discPort = discPort;
         this.metricsProvider = metricsProvider;
         this.ver = ver;
 
-        consistentId = U.consistentId(addrs, discPort);
+        consistentId = U.consistentId(sortedAddrs, discPort);
 
         metrics = metricsProvider.metrics();
         cacheMetrics = metricsProvider.cacheMetrics();


[24/50] [abbrv] incubator-ignite git commit: minor fix

Posted by sb...@apache.org.
minor fix


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

Branch: refs/heads/ignite-901
Commit: 3dcda269644f05d07468a9d8a4d3534ec9804f13
Parents: 62835dd
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Tue Jul 7 20:57:58 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Tue Jul 7 20:57:58 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         | 79 ++++++++++++++++++++
 assembly/LICENSE_HADOOP                         | 32 ++++++++
 assembly/dependencies-fabric.xml                |  1 +
 .../src/main/resources/META-INF/licenses.txt.vm |  3 +-
 modules/spark/licenses/scala-bsd-license.txt    | 18 -----
 5 files changed, 114 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcda269/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
index 7649b39..794d721 100644
--- a/assembly/LICENSE_FABRIC
+++ b/assembly/LICENSE_FABRIC
@@ -236,3 +236,82 @@ This eBook is for the use of anyone anywhere at no cost and with
 almost no restrictions whatsoever.  You may copy it, give it away or
 re-use it under the terms of the Project Gutenberg License included
 with this eBook or online at www.gutenberg.org
+
+==============================================================================
+For JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
+==============================================================================
+This product bundles JSR107 API and SPI which is available under a:
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. For details, see https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt.
+
+==============================================================================
+For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
+==============================================================================
+This product bundles JSch which is available under a:
+Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
+
+==============================================================================
+For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
+==============================================================================
+This product bundles JLine which is available under a:
+The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
+
+==============================================================================
+For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.11.2
+==============================================================================
+This product bundles Scala Library which is available under a:
+BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
+
+==============================================================================
+For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.3.175
+==============================================================================
+This product bundles H2 Database Engine which is available under a:
+The H2 License, Version 1.0. For details, see http://h2database.com/html/license.html.
+
+==============================================================================
+For JTidy (http://jtidy.sourceforge.net) net.sf.jtidy:jtidy:jar:r938
+==============================================================================
+This product bundles JTidy which is available under a:
+Java HTML Tidy License. For details, see http://jtidy.svn.sourceforge.net/viewvc/jtidy/trunk/jtidy/LICENSE.txt?revision=95.
+
+==============================================================================
+For tomcat-servlet-api (http://tomcat.apache.org/) org.apache.tomcat:tomcat-servlet-api:jar:8.0.23
+==============================================================================
+This product bundles tomcat-servlet-api which is available under a:
+Apache License, Version 2.0 and Common Development And Distribution License (CDDL) Version 1.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt and http://www.opensource.org/licenses/cddl1.txt.
+
+==============================================================================
+For AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
+==============================================================================
+This product bundles AOP alliance which is available under a:
+Public Domain.
+
+==============================================================================
+For AspectJ (http://www.aspectj.org) org.aspectj:*:jar:1.7.2
+==============================================================================
+This product bundles AspectJ which is available under a:
+Eclipse Public License - v 1.0. For details, see http://www.eclipse.org/legal/epl-v10.html.
+
+==============================================================================
+For Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
+==============================================================================
+This product bundles Java Transaction API which is available under a:
+No licenses.
+
+==============================================================================
+For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:4.2
+==============================================================================
+This product bundles ASM All which is available under a:
+BSD. For details, see http://asm.objectweb.org/license.html.
+
+==============================================================================
+For Jetty (http://www.eclipse.org/jetty) org.eclipse.jetty:*:jar:9.2.11.v20150529
+==============================================================================
+This product bundles Jetty which is available under a:
+Apache Software License - Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.
+Eclipse Public License - Version 1.0. For details, see http://www.eclipse.org/org/documents/epl-v10.php.
+
+==============================================================================
+For SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
+==============================================================================
+This product bundles SLF4J API Module which is available under a:
+MIT License. For details, see http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcda269/assembly/LICENSE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_HADOOP b/assembly/LICENSE_HADOOP
index 7649b39..f6ed34c 100644
--- a/assembly/LICENSE_HADOOP
+++ b/assembly/LICENSE_HADOOP
@@ -236,3 +236,35 @@ This eBook is for the use of anyone anywhere at no cost and with
 almost no restrictions whatsoever.  You may copy it, give it away or
 re-use it under the terms of the Project Gutenberg License included
 with this eBook or online at www.gutenberg.org
+
+==============================================================================
+For JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
+==============================================================================
+This product bundles JSR107 API and SPI which is available under a:
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. For details, see https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt.
+
+==============================================================================
+For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
+==============================================================================
+This product bundles JSch which is available under a:
+Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
+
+==============================================================================
+For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
+==============================================================================
+This product bundles JLine which is available under a:
+The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
+
+==============================================================================
+For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.11.2
+==============================================================================
+This product bundles Scala Library which is available under a:
+BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
+
+==============================================================================
+For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:4.2
+==============================================================================
+This product bundles ASM All which is available under a:
+BSD. For details, see http://asm.objectweb.org/license.html.
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcda269/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
index 93f96f1..f69ffde 100644
--- a/assembly/dependencies-fabric.xml
+++ b/assembly/dependencies-fabric.xml
@@ -128,6 +128,7 @@
                 <exclude>org.apache.ignite:ignite-hadoop</exclude>
                 <exclude>org.apache.ignite:ignite-schema-import</exclude>
                 <exclude>org.apache.ignite:ignite-codegen</exclude>
+                <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
             </excludes>
             <sources>
                 <includeModuleDirectory>true</includeModuleDirectory>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcda269/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
index cb756c1..f02d9bc 100644
--- a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
+++ b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
@@ -34,7 +34,8 @@ This product bundles $project.name which is available under a:
 $license.name.replaceAll("[ ]{2,}"," ").replaceAll("\n",""). #if ($license.url)For details, see $license.url.replaceAll("[ ]{2,}"," ").replaceAll("\n","").#end
 
 #end
-#if ($project.licenses.size() == 0)    No licenses.#end
+#if ($project.licenses.size() == 0)No licenses.
+#end
 
 #end
 #end

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcda269/modules/spark/licenses/scala-bsd-license.txt
----------------------------------------------------------------------
diff --git a/modules/spark/licenses/scala-bsd-license.txt b/modules/spark/licenses/scala-bsd-license.txt
deleted file mode 100644
index b2be111..0000000
--- a/modules/spark/licenses/scala-bsd-license.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright (c) 2002-2014 EPFL
-Copyright (c) 2011-2014 Typesafe, Inc.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
-other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
-derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
\ No newline at end of file


[12/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: 167f1afa273f3863b358c3fda6601eeefaed9183
Parents: 808089e
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Thu Jun 11 16:15:11 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Thu Jun 11 16:15:11 2015 +0300

----------------------------------------------------------------------
 .../yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/167f1afa/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index 1ac2974..253752d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -90,10 +90,9 @@ public class IgniteProvider {
         if (latestVersion != null && newVersion.equals(latestVersion)) {
             if (hdfs)
                 return new Path(formatPath(props.igniteReleasesDir(), latestVersion));
-            else {
+            else
                 return IgniteYarnUtils.copyLocalToHdfs(fs, formatPath(props.igniteLocalWorkDir(), latestVersion),
                     formatPath(props.igniteReleasesDir(), latestVersion));
-            }
         }
         else {
             latestVersion = newVersion;


[03/50] [abbrv] incubator-ignite git commit: #YARN WIP

Posted by sb...@apache.org.
#YARN WIP


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

Branch: refs/heads/ignite-901
Commit: 85f4a8915fec6e9332a492728c4a37e639916f3f
Parents: 81cde9b
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Fri Jun 5 18:32:28 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Fri Jun 5 18:32:28 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 204 +++++++----
 .../apache/ignite/yarn/ClusterProperties.java   | 196 ++++------
 .../org/apache/ignite/yarn/IgniteContainer.java |  74 ++++
 .../org/apache/ignite/yarn/IgniteProvider.java  | 362 +++++++++++++++++++
 .../java/org/apache/ignite/yarn/IgniteTask.java |  86 -----
 .../apache/ignite/yarn/IgniteYarnClient.java    | 128 ++++---
 .../ignite/yarn/utils/IgniteYarnUtils.java      |  83 +++++
 .../main/resources/ignite-default-config.xml    |  33 ++
 8 files changed, 838 insertions(+), 328 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/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 532830c..95197b7 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
@@ -17,86 +17,130 @@
 
 package org.apache.ignite.yarn;
 
-import com.google.common.collect.Lists;
-import org.apache.hadoop.conf.*;
-import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.yarn.api.*;
-import org.apache.hadoop.yarn.api.protocolrecords.*;
+import org.apache.commons.io.*;
+import org.apache.hadoop.fs.*;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
 import org.apache.hadoop.yarn.client.api.async.*;
 import org.apache.hadoop.yarn.conf.*;
 import org.apache.hadoop.yarn.util.*;
+import org.apache.ignite.yarn.utils.*;
 
+import java.io.*;
 import java.util.*;
+import java.util.concurrent.*;
 
 /**
  * TODO
  */
 public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
-    YarnConfiguration configuration;
-    NMClient nmClient;
-    int numContainersToWaitFor = 1;
+    /** Default port range. */
+    public static final String DEFAULT_PORT = ":47500..47510";
 
-    public ApplicationMaster() {
-        configuration = new YarnConfiguration();
+    /** Delimiter char. */
+    public static final String DELIM = ",";
+
+    /** */
+    private YarnConfiguration conf;
+
+    /** */
+    private ClusterProperties props;
+
+    /** */
+    private NMClient nmClient;
+
+    /** */
+    private Path ignitePath;
+
+    /** */
+    private Path cfgPath;
+
+    /** */
+    private FileSystem fs;
+
+    /** */
+    private Map<String, IgniteContainer> containers = new HashMap<>();
+
+    /**
+     * Constructor.
+     */
+    public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
+        this.conf = new YarnConfiguration();
+        this.props = props;
+        this.fs = FileSystem.get(conf);
+        this.ignitePath = new Path(ignitePath);
 
         nmClient = NMClient.createNMClient();
-        nmClient.init(configuration);
+
+        nmClient.init(conf);
         nmClient.start();
     }
 
     /** {@inheritDoc} */
-    public void onContainersAllocated(List<Container> containers) {
-        for (Container container : containers) {
+    public synchronized void onContainersAllocated(List<Container> conts) {
+        for (Container container : conts) {
             try {
-                // Launch container by create ContainerLaunchContext
                 ContainerLaunchContext ctx = Records.newRecord(ContainerLaunchContext.class);
 
-                final LocalResource igniteZip = Records.newRecord(LocalResource.class);
-                setupAppMasterJar(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6.zip"), igniteZip,
-                    configuration);
+                Map<String, String> env = new HashMap<>(System.getenv());
+
+                env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(container.getNodeId().getHost()));
+
+                ctx.setEnvironment(env);
+
+                Map<String, LocalResource> resources = new HashMap<>();
+
+                resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
+                resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
+
+                ctx.setLocalResources(resources);
 
-                ctx.setLocalResources(Collections.singletonMap("ignite", igniteZip));
                 ctx.setCommands(
-                        Lists.newArrayList(
-                                "$LOCAL_DIRS/ignite/*/bin/ignite.sh" +
-                                " 1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" +
-                                " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr"
-                        ));
+                    Collections.singletonList(
+                        "./ignite/*/bin/ignite.sh "
+                        + "./ignite-config.xml"
+                        + " -J-Xmx" + container.getResource().getMemory() + "m"
+                        + " -J-Xms" + container.getResource().getMemory() + "m"
+                        + IgniteYarnUtils.YARN_LOG_OUT
+                    ));
+
                 System.out.println("[AM] Launching container " + container.getId());
+
                 nmClient.startContainer(container, ctx);
-            } catch (Exception ex) {
+
+                containers.put(container.getNodeId().getHost(),
+                    new IgniteContainer(container.getNodeId().getHost(), container.getResource().getVirtualCores(),
+                        container.getResource().getMemory()));
+            }
+            catch (Exception ex) {
                 System.err.println("[AM] Error launching container " + container.getId() + " " + ex);
             }
         }
     }
 
-    /** {@inheritDoc} */
-    private static void setupAppMasterJar(Path jarPath, LocalResource appMasterJar, YarnConfiguration conf)
-        throws Exception {
-        FileSystem fileSystem = FileSystem.get(conf);
-        jarPath = fileSystem.makeQualified(jarPath);
+    /**
+     * @return Address running nodes.
+     */
+    private String getAddress(String address) {
+        if (containers.isEmpty()) {
+            if (address != null && !address.isEmpty())
+                return address + DEFAULT_PORT;
+
+            return "";
+        }
 
-        FileStatus jarStat = fileSystem.getFileStatus(jarPath);
+        StringBuilder sb = new StringBuilder();
 
-        appMasterJar.setResource(ConverterUtils.getYarnUrlFromPath(jarPath));
-        appMasterJar.setSize(jarStat.getLen());
-        appMasterJar.setTimestamp(jarStat.getModificationTime());
-        appMasterJar.setType(LocalResourceType.ARCHIVE);
-        appMasterJar.setVisibility(LocalResourceVisibility.APPLICATION);
+        for (IgniteContainer cont : containers.values())
+            sb.append(cont.host()).append(DEFAULT_PORT).append(DELIM);
 
-        System.out.println("Path :" + jarPath);
+        return sb.substring(0, sb.length() - 1);
     }
 
     /** {@inheritDoc} */
-    public void onContainersCompleted(List<ContainerStatus> statuses) {
+    public synchronized void onContainersCompleted(List<ContainerStatus> statuses) {
         for (ContainerStatus status : statuses) {
-            System.out.println("[AM] Completed container " + status.getContainerId());
             synchronized (this) {
-                numContainersToWaitFor--;
             }
         }
     }
@@ -111,6 +155,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
     /** {@inheritDoc} */
     public void onError(Throwable t) {
+        nmClient.stop();
     }
 
     /** {@inheritDoc} */
@@ -118,28 +163,35 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         return 50;
     }
 
-    public boolean doneWithContainers() {
-        return numContainersToWaitFor == 0;
-    }
+    /**
+     * @param args Args.
+     * @throws Exception If failed.
+     */
+    public static void main(String[] args) throws Exception {
+        ClusterProperties props = ClusterProperties.from(null);
 
-    public Configuration getConfiguration() {
-        return configuration;
-    }
+        ApplicationMaster master = new ApplicationMaster(args[0], props);
 
-    public static void main(String[] args) throws Exception {
-        ApplicationMaster master = new ApplicationMaster();
-        master.runMainLoop();
+        master.init();
+
+        master.run();
     }
 
-    public void runMainLoop() throws Exception {
+    /**
+     * Runs application master.
+     *
+     * @throws Exception If failed.
+     */
+    public void run() throws Exception {
+        // Create asyn application master.
+        AMRMClientAsync<AMRMClient.ContainerRequest> rmClient = AMRMClientAsync.createAMRMClientAsync(300, this);
 
-        AMRMClientAsync<AMRMClient.ContainerRequest> rmClient = AMRMClientAsync.createAMRMClientAsync(100, this);
-        rmClient.init(getConfiguration());
+        rmClient.init(conf);
         rmClient.start();
 
         // Register with ResourceManager
-        System.out.println("[AM] registerApplicationMaster 0");
         rmClient.registerApplicationMaster("", 0, "");
+
         System.out.println("[AM] registerApplicationMaster 1");
 
         // Priority for worker containers - priorities are intra-application
@@ -148,27 +200,51 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
         // Resource requirements for worker containers
         Resource capability = Records.newRecord(Resource.class);
-        capability.setMemory(128);
-        capability.setVirtualCores(1);
+        capability.setMemory(1024);
+        capability.setVirtualCores(2);
 
         // Make container requests to ResourceManager
-        for (int i = 0; i < numContainersToWaitFor; ++i) {
-            AMRMClient.ContainerRequest containerAsk = new AMRMClient.ContainerRequest(capability, null, null, priority);
+        for (int i = 0; i < 1; ++i) {
+            AMRMClient.ContainerRequest containerAsk =
+                new AMRMClient.ContainerRequest(capability, null, null, priority);
+
             System.out.println("[AM] Making res-req " + i);
+
             rmClient.addContainerRequest(containerAsk);
         }
 
         System.out.println("[AM] waiting for containers to finish");
-        while (!doneWithContainers()) {
-            Thread.sleep(100);
-        }
-
 
+        TimeUnit.MINUTES.sleep(10);
 
         System.out.println("[AM] unregisterApplicationMaster 0");
+
         // Un-register with ResourceManager
-        rmClient.unregisterApplicationMaster(
-                FinalApplicationStatus.SUCCEEDED, "", "");
+        rmClient.unregisterApplicationMaster(FinalApplicationStatus.SUCCEEDED, "", "");
+
         System.out.println("[AM] unregisterApplicationMaster 1");
     }
+
+    /**
+     * @throws IOException
+     */
+    public void init() throws IOException {
+        if (props.igniteConfigUrl() == null || props.igniteConfigUrl().isEmpty()) {
+            InputStream input = Thread.currentThread().getContextClassLoader()
+                .getResourceAsStream(IgniteYarnUtils.DEFAULT_IGNITE_CONFIG);
+
+            cfgPath = new Path(props.igniteWorkDir() + File.separator + IgniteYarnUtils.DEFAULT_IGNITE_CONFIG);
+
+            // Create file. Override by default.
+            FSDataOutputStream outputStream = fs.create(cfgPath, true);
+
+            IOUtils.copy(input, outputStream);
+
+            IOUtils.closeQuietly(input);
+
+            IOUtils.closeQuietly(outputStream);
+        }
+        else
+            cfgPath = new Path(props.igniteConfigUrl());
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/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 0c6c26d..adddd51 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
@@ -18,7 +18,6 @@
 package org.apache.ignite.yarn;
 
 import java.io.*;
-import java.net.*;
 import java.util.*;
 import java.util.logging.*;
 import java.util.regex.*;
@@ -30,17 +29,11 @@ public class ClusterProperties {
     /** */
     private static final Logger log = Logger.getLogger(ClusterProperties.class.getSimpleName());
 
-    /** Unlimited. */
-    public static final double UNLIMITED = Double.MAX_VALUE;
-
     /** */
-    public static final String MESOS_MASTER_URL = "MESOS_MASTER_URL";
+    public static final String EMPTY_STRING = "";
 
-    /** */
-    public static final String DEFAULT_MESOS_MASTER_URL = "zk://localhost:2181/mesos";
-
-    /** Mesos master url. */
-    private String mesosUrl = DEFAULT_MESOS_MASTER_URL;
+    /** Unlimited. */
+    public static final double UNLIMITED = Double.MAX_VALUE;
 
     /** */
     public static final String IGNITE_CLUSTER_NAME = "IGNITE_CLUSTER_NAME";
@@ -52,21 +45,6 @@ public class ClusterProperties {
     private String clusterName = DEFAULT_CLUSTER_NAME;
 
     /** */
-    public static final String IGNITE_HTTP_SERVER_HOST = "IGNITE_HTTP_SERVER_HOST";
-
-    /** Http server host. */
-    private String httpServerHost = null;
-
-    /** */
-    public static final String IGNITE_HTTP_SERVER_PORT = "IGNITE_HTTP_SERVER_PORT";
-
-    /** */
-    public static final String DEFAULT_HTTP_SERVER_PORT = "48610";
-
-    /** Http server host. */
-    private int httpServerPort = Integer.valueOf(DEFAULT_HTTP_SERVER_PORT);
-
-    /** */
     public static final String IGNITE_TOTAL_CPU = "IGNITE_TOTAL_CPU";
 
     /** CPU limit. */
@@ -91,18 +69,6 @@ public class ClusterProperties {
     private double memPerNode = UNLIMITED;
 
     /** */
-    public static final String IGNITE_TOTAL_DISK_SPACE = "IGNITE_TOTAL_DISK_SPACE";
-
-    /** Disk space limit. */
-    private double disk = UNLIMITED;
-
-    /** */
-    public static final String IGNITE_DISK_SPACE_PER_NODE = "IGNITE_DISK_SPACE_PER_NODE";
-
-    /** Disk space limit. */
-    private double diskPerNode = UNLIMITED;
-
-    /** */
     public static final String IGNITE_NODE_COUNT = "IGNITE_NODE_COUNT";
 
     /** Node count limit. */
@@ -136,19 +102,31 @@ public class ClusterProperties {
     private String igniteVer = DEFAULT_IGNITE_VERSION;
 
     /** */
-    public static final String IGNITE_PACKAGE_URL = "IGNITE_PACKAGE_URL";
+    public static final String IGNITE_WORKING_DIR = "IGNITE_WORKING_DIR";
+
+    /** */
+    public static final String DEFAULT_IGNITE_WORK_DIR = "/ignite/workdir/";
 
-    /** Ignite package url. */
-    private String ignitePackageUrl = null;
+    /** Ignite work directory. */
+    private String igniteWorkDir = DEFAULT_IGNITE_WORK_DIR;
 
     /** */
-    public static final String IGNITE_WORK_DIR = "IGNITE_WORK_DIR";
+    public static final String IGNITE_LOCAL_WORK_DIR = "IGNITE_LOCAL_WORK_DIR";
 
     /** */
-    public static final String DEFAULT_IGNITE_WORK_DIR = "ignite-releases/";
+    public static final String DEFAULT_IGNITE_LOCAL_WORK_DIR = "./ignite-releases/";
 
-    /** Ignite version. */
-    private String igniteWorkDir = DEFAULT_IGNITE_WORK_DIR;
+    /** Ignite local work directory. */
+    private String igniteLocalWorkDir = DEFAULT_IGNITE_LOCAL_WORK_DIR;
+
+    /** */
+    public static final String IGNITE_RELEASES_DIR = "IGNITE_RELEASES_DIR";
+
+    /** */
+    public static final String DEFAULT_IGNITE_RELEASES_DIR = "/ignite/releases/";
+
+    /** Ignite local work directory. */
+    private String igniteReleasesDir = DEFAULT_IGNITE_RELEASES_DIR;
 
     /** */
     public static final String IGNITE_USERS_LIBS = "IGNITE_USERS_LIBS";
@@ -253,20 +231,6 @@ public class ClusterProperties {
     }
 
     /**
-     * @return disk limit.
-     */
-    public double disk() {
-        return disk;
-    }
-
-    /**
-     * @return disk limit per node.
-     */
-    public double diskPerNode() {
-        return diskPerNode;
-    }
-
-    /**
      * @return instance count limit.
      */
     public double instances() {
@@ -329,45 +293,31 @@ public class ClusterProperties {
     }
 
     /**
-     * @return User's libs.
+     * @return Local working directory.
      */
-    public String userLibs() {
-        return userLibs;
+    public String igniteLocalWorkDir() {
+        return igniteLocalWorkDir;
     }
 
     /**
-     * @return Ignite configuration.
+     * @return Ignite releases dir.
      */
-    public String igniteCfg() {
-        return igniteCfg;
+    public String igniteReleasesDir() {
+        return igniteReleasesDir;
     }
 
     /**
-     * @return Master url.
-     */
-    public String masterUrl() {
-        return mesosUrl;
-    }
-
-    /**
-     * @return Http server host.
-     */
-    public String httpServerHost() {
-        return httpServerHost;
-    }
-
-    /**
-     * @return Http server port.
+     * @return User's libs.
      */
-    public int httpServerPort() {
-        return httpServerPort;
+    public String userLibs() {
+        return userLibs;
     }
 
     /**
-     * @return Url to ignite package.
+     * @return Ignite configuration.
      */
-    public String ignitePackageUrl() {
-        return ignitePackageUrl;
+    public String igniteCfg() {
+        return igniteCfg;
     }
 
     /**
@@ -407,36 +357,21 @@ public class ClusterProperties {
 
             ClusterProperties prop = new ClusterProperties();
 
-            prop.mesosUrl = getStringProperty(MESOS_MASTER_URL, props, DEFAULT_MESOS_MASTER_URL);
-
-            prop.httpServerHost = getStringProperty(IGNITE_HTTP_SERVER_HOST, props, getNonLoopbackAddress());
-
-            String port = System.getProperty("PORT0");
-
-            if (port != null && !port.isEmpty())
-                prop.httpServerPort = Integer.valueOf(port);
-            else
-                prop.httpServerPort = Integer.valueOf(getStringProperty(IGNITE_HTTP_SERVER_PORT, props,
-                    DEFAULT_HTTP_SERVER_PORT));
-
             prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, props, DEFAULT_CLUSTER_NAME);
 
             prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null);
-            prop.ignitePackageUrl = getStringProperty(IGNITE_PACKAGE_URL, props, null);
             prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null);
 
             prop.cpu = getDoubleProperty(IGNITE_TOTAL_CPU, props, UNLIMITED);
             prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, UNLIMITED);
             prop.mem = getDoubleProperty(IGNITE_TOTAL_MEMORY, props, UNLIMITED);
             prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, UNLIMITED);
-            prop.disk = getDoubleProperty(IGNITE_TOTAL_DISK_SPACE, props, UNLIMITED);
-            prop.diskPerNode = getDoubleProperty(IGNITE_DISK_SPACE_PER_NODE, props, 1024.0);
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, UNLIMITED);
             prop.minCpu = getDoubleProperty(IGNITE_MIN_CPU_PER_NODE, props, DEFAULT_RESOURCE_MIN_CPU);
             prop.minMemory = getDoubleProperty(IGNITE_MIN_MEMORY_PER_NODE, props, DEFAULT_RESOURCE_MIN_MEM);
 
             prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
-            prop.igniteWorkDir = getStringProperty(IGNITE_WORK_DIR, props, DEFAULT_IGNITE_WORK_DIR);
+            prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
             prop.igniteCfg = getStringProperty(IGNITE_CONFIG_XML, props, null);
             prop.userLibs = getStringProperty(IGNITE_USERS_LIBS, props, null);
 
@@ -459,6 +394,38 @@ public class ClusterProperties {
     }
 
     /**
+     * Convert to properties to map.
+     *
+     * @return Key-value map.
+     */
+    public Map<String, String> toEnvs() {
+        Map<String, String> envs = new HashMap<>();
+
+        envs.put(IGNITE_CLUSTER_NAME, toEnvVal(clusterName));
+
+        envs.put(IGNITE_USERS_LIBS_URL, toEnvVal(userLibsUrl));
+        envs.put(IGNITE_CONFIG_XML_URL, toEnvVal(igniteCfgUrl));
+
+        envs.put(IGNITE_TOTAL_CPU, toEnvVal(cpu));
+        envs.put(IGNITE_RUN_CPU_PER_NODE, toEnvVal(cpuPerNode));
+        envs.put(IGNITE_TOTAL_MEMORY, toEnvVal(mem));
+        envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
+        envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
+        envs.put(IGNITE_MIN_CPU_PER_NODE, toEnvVal(minCpu));
+        envs.put(IGNITE_MIN_MEMORY_PER_NODE, toEnvVal(minMemory));
+
+        envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
+        envs.put(IGNITE_WORKING_DIR, toEnvVal(igniteWorkDir));
+        envs.put(IGNITE_CONFIG_XML, toEnvVal(igniteCfg));
+        envs.put(IGNITE_USERS_LIBS, toEnvVal(userLibs));
+
+        if (hostnameConstraint != null)
+            envs.put(IGNITE_HOSTNAME_CONSTRAINT, toEnvVal(hostnameConstraint.pattern()));
+
+        return envs;
+    }
+
+    /**
      * @param name Property name.
      * @param fileProps Property file.
      * @return Property value.
@@ -472,7 +439,7 @@ public class ClusterProperties {
         if (property == null)
             property = System.getenv(name);
 
-        return property == null ? defaultVal : Double.valueOf(property);
+        return property == null || property.isEmpty() ? defaultVal : Double.valueOf(property);
     }
 
     /**
@@ -489,31 +456,14 @@ public class ClusterProperties {
         if (property == null)
             property = System.getenv(name);
 
-        return property == null ? defaultVal : property;
+        return property == null || property.isEmpty() ? defaultVal : property;
     }
 
     /**
-     * Finds a local, non-loopback, IPv4 address
-     *
-     * @return The first non-loopback IPv4 address found, or <code>null</code> if no such addresses found
-     * @throws SocketException If there was a problem querying the network interfaces
+     * @param val Value.
+     * @return If val is null {@link EMPTY_STRING} else to string.
      */
-    public static String getNonLoopbackAddress() throws SocketException {
-        Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();
-
-        while (ifaces.hasMoreElements()) {
-            NetworkInterface iface = ifaces.nextElement();
-
-            Enumeration<InetAddress> addresses = iface.getInetAddresses();
-
-            while (addresses.hasMoreElements()) {
-                InetAddress addr = addresses.nextElement();
-
-                if (addr instanceof Inet4Address && !addr.isLoopbackAddress())
-                    return addr.getHostAddress();
-            }
-        }
-
-        throw new RuntimeException("Failed. Couldn't find non-loopback address");
+    private String toEnvVal(Object val) {
+        return val == null ? EMPTY_STRING : val.toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
new file mode 100644
index 0000000..4e3c285
--- /dev/null
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -0,0 +1,74 @@
+/*
+ * 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.yarn;
+
+/**
+ * Information about launched task.
+ */
+public class IgniteContainer {
+    /** */
+    public final String host;
+
+    /** */
+    public final double cpuCores;
+
+    /** */
+    public final double mem;
+
+    /**
+     * Ignite launched task.
+     *
+     * @param host Host.
+     * @param cpuCores Cpu cores count.
+     * @param mem Memory
+     */
+    public IgniteContainer(String host, double cpuCores, double mem) {
+        this.host = host;
+        this.cpuCores = cpuCores;
+        this.mem = mem;
+    }
+
+    /**
+     * @return Host.
+     */
+    public String host() {
+        return host;
+    }
+
+    /**
+     * @return Cores count.
+     */
+    public double cpuCores() {
+        return cpuCores;
+    }
+
+    /**
+     * @return Memory.
+     */
+    public double mem() {
+        return mem;
+    }
+
+    @Override
+    public String toString() {
+        return "IgniteTask " +
+            "host: [" + host + ']' +
+            ", cpuCores: [" + cpuCores + "]" +
+            ", mem: [" + mem + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
new file mode 100644
index 0000000..c6e07cb
--- /dev/null
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -0,0 +1,362 @@
+/*
+ * 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.yarn;
+
+import org.apache.hadoop.fs.*;
+import org.apache.ignite.yarn.utils.IgniteYarnUtils;
+
+import java.io.*;
+import java.net.*;
+import java.nio.channels.*;
+import java.util.*;
+
+/**
+ * Class downloads and stores Ignite.
+ */
+public class IgniteProvider {
+    /** */
+    public static final String DOWNLOAD_LINK = "http://tiny.cc/updater/download_community.php";
+
+    /** */
+    public static final String DIRECT_DOWNLOAD_LINK = "http://www.gridgain.com/media/gridgain-community-fabric-";
+
+    /** */
+    private ClusterProperties props;
+
+    /** */
+    private String latestVersion = null;
+
+    /** */
+    private boolean hdfs = false;
+
+    /** */
+    private FileSystem fs;
+
+    /**
+     * @param props Cluster properties.
+     * @param fs Hadoop file system.
+     */
+    public IgniteProvider(ClusterProperties props, FileSystem fs) {
+        this.props = props;
+        this.fs = fs;
+    }
+
+    /**
+     * @return Latest ignite version.
+     */
+    public Path getIgnite() throws Exception {
+        File folder = checkDownloadFolder();
+
+        if (latestVersion == null) {
+            List<String> localFiles = findIgnites(folder);
+            List<String> hdfsFiles = findIgnites(fs, props.igniteReleasesDir());
+
+            String localLatestVersion = findLatestVersion(localFiles);
+            String hdfsLatestVersion = findLatestVersion(hdfsFiles);
+
+            if (localLatestVersion != null && hdfsLatestVersion != null) {
+                if (VersionComparator.INSTANCE.compare(hdfsLatestVersion, localLatestVersion) >= 0) {
+                    latestVersion = hdfsLatestVersion;
+
+                    hdfs = true;
+                }
+            }
+            else if (localLatestVersion != null)
+                latestVersion = localLatestVersion;
+            else if (hdfsLatestVersion != null) {
+                latestVersion = hdfsLatestVersion;
+
+                hdfs = true;
+            }
+        }
+
+        String newVersion = updateIgnite(latestVersion);
+
+        if (latestVersion != null && newVersion.equals(latestVersion)) {
+            if (hdfs)
+                return new Path(formatPath(props.igniteReleasesDir(), latestVersion));
+            else {
+                return IgniteYarnUtils.copyLocalToHdfs(fs, formatPath(props.igniteLocalWorkDir(), latestVersion),
+                    formatPath(props.igniteReleasesDir(), latestVersion));
+            }
+        }
+        else {
+            latestVersion = newVersion;
+
+            return IgniteYarnUtils.copyLocalToHdfs(fs, formatPath(props.igniteLocalWorkDir(), latestVersion),
+                formatPath(props.igniteReleasesDir(), latestVersion));
+        }
+    }
+
+    /**
+     * @param folder Folder.
+     * @return Ignite archives.
+     */
+    private List<String> findIgnites(File folder) {
+        String[] files = folder.list();
+
+        List<String> ignites = new ArrayList<>();
+
+        if (files != null) {
+            for (String fileName : files) {
+                if (fileName.contains("gridgain-community-fabric-") && fileName.endsWith(".zip"))
+                    ignites.add(fileName);
+            }
+        }
+
+        return ignites;
+    }
+
+    /**
+     * @param files Files.
+     * @return latest ignite version.
+     */
+    private String findLatestVersion(List<String> files) {
+        String latestVersion = null;
+
+        if (!files.isEmpty()) {
+            if (files.size() == 1)
+                latestVersion = parseVersion(files.get(0));
+            else
+                latestVersion = parseVersion(Collections.max(files, VersionComparator.INSTANCE));
+        }
+
+        return latestVersion;
+    }
+
+    /**
+     * @param fs File system,
+     * @param folder Folder.
+     * @return Ignite archives.
+     */
+    private List<String> findIgnites(FileSystem fs, String folder) {
+        FileStatus[] fileStatuses = null;
+
+        try {
+            fileStatuses = fs.listStatus(new Path(folder));
+        }
+        catch (FileNotFoundException e) {
+            // Ignore. Folder doesn't exist.
+        }
+        catch (Exception e) {
+            throw new RuntimeException("Couldnt get list files from hdfs.", e);
+        }
+
+        List<String> ignites = new ArrayList<>();
+
+        if (fileStatuses != null) {
+            for (FileStatus file : fileStatuses) {
+                String fileName = file.getPath().getName();
+
+                if (fileName.contains("gridgain-community-fabric-") && fileName.endsWith(".zip"))
+                    ignites.add(fileName);
+            }
+        }
+
+        return ignites;
+    }
+
+    /**
+     * @param version Ignite version.
+     * @return Ignite.
+     */
+    public Path getIgnite(String version) throws Exception {
+        File folder = checkDownloadFolder();
+
+        // Check to hdfs contains required ignite version.
+        List<String> hdfsFiles = findIgnites(fs, props.igniteReleasesDir());
+
+        if (hdfsFiles != null && !hdfsFiles.isEmpty()) {
+            for (String fileName : hdfsFiles) {
+                if (fileName.equals("gridgain-community-fabric-" + version + ".zip"))
+                    return new Path(formatPath(props.igniteReleasesDir(), version));
+            }
+        }
+
+        // Check local fs.
+        List<String> localFiles = findIgnites(folder);
+
+        if (localFiles != null) {
+            for (String fileName : localFiles) {
+                if (fileName.equals("gridgain-community-fabric-" + version + ".zip")) {
+                    Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
+
+                    fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
+
+                    return dst;
+                }
+            }
+        }
+
+        // Download ignite.
+        downloadIgnite(version);
+
+        Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
+
+        fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
+
+        return dst;
+    }
+
+
+    /**
+     * @param folder folder
+     * @param version version
+     * @return Path
+     */
+    private static String formatPath(String folder, String version) {
+        return folder + File.separator + "gridgain-community-fabric-" + version + ".zip";
+    }
+
+    /**
+     * @param currentVersion The current latest version.
+     * @return Current version if the current version is latest; new ignite version otherwise.
+     */
+    private String updateIgnite(String currentVersion) {
+        try {
+            URL url;
+
+            if (currentVersion == null)
+                url = new URL(DOWNLOAD_LINK);
+            else
+                url = new URL(DOWNLOAD_LINK + "?version=" + currentVersion);
+
+            HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+
+            int code = conn.getResponseCode();
+
+            if (code == 200) {
+                String redirectUrl = conn.getURL().toString();
+
+                checkDownloadFolder();
+
+                FileOutputStream outFile = new FileOutputStream(props.igniteLocalWorkDir() + File.separator
+                    + fileName(redirectUrl));
+
+                outFile.getChannel().transferFrom(Channels.newChannel(conn.getInputStream()), 0, Long.MAX_VALUE);
+
+                outFile.close();
+
+                return parseVersion(redirectUrl);
+            }
+            else if (code == 304)
+                // This version is latest.
+                return currentVersion;
+            else
+                throw new RuntimeException("Got unexpected response code. Response code: " + code);
+        }
+        catch (IOException e) {
+            throw new RuntimeException("Failed update ignite.", e);
+        }
+    }
+
+    /**
+     * @param version The current latest version.
+     * @return Ignite archive.
+     */
+    private String downloadIgnite(String version) {
+        try {
+            URL url = new URL(DIRECT_DOWNLOAD_LINK + version + ".zip");
+
+            HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+
+            int code = conn.getResponseCode();
+
+            if (code == 200) {
+                checkDownloadFolder();
+
+                String fileName = fileName(url.toString());
+
+                FileOutputStream outFile = new FileOutputStream(props.igniteLocalWorkDir() + File.separator + fileName);
+
+                outFile.getChannel().transferFrom(Channels.newChannel(conn.getInputStream()), 0, Long.MAX_VALUE);
+
+                outFile.close();
+
+                return fileName;
+            }
+            else
+                throw new RuntimeException("Got unexpected response code. Response code: " + code);
+        }
+        catch (IOException e) {
+            throw new RuntimeException("Failed update ignite.", e);
+        }
+    }
+
+    /**
+     * @return Download folder.
+     */
+    private File checkDownloadFolder() {
+        File file = new File(props.igniteLocalWorkDir());
+
+        if (!file.exists())
+            file.mkdirs();
+
+        return file;
+    }
+
+    /**
+     * @param url URL.
+     * @return Ignite version.
+     */
+    private static String parseVersion(String url) {
+        String[] split = url.split("-");
+
+        return split[split.length - 1].replaceAll(".zip", "");
+    }
+
+    /**
+     * @param url URL.
+     * @return File name.
+     */
+    private static String fileName(String url) {
+        String[] split = url.split("/");
+
+        return split[split.length - 1];
+    }
+
+    /**
+     * Ignite version comparator.
+     */
+    public static final class VersionComparator implements Comparator<String> {
+        /** */
+        public static final VersionComparator INSTANCE = new VersionComparator();
+
+        /** */
+        private VersionComparator() {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public int compare(String f1, String f2) {
+            if (f1.equals(f2))
+                return 0;
+
+            String[] ver1 = parseVersion(f1).split("\\.");
+            String[] ver2 = parseVersion(f2).split("\\.");
+
+            if (Integer.valueOf(ver1[0]) >= Integer.valueOf(ver2[0])
+                && Integer.valueOf(ver1[1]) >= Integer.valueOf(ver2[1])
+                && Integer.valueOf(ver1[2]) >= Integer.valueOf(ver2[2]))
+
+                return 1;
+            else
+                return -1;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteTask.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteTask.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteTask.java
deleted file mode 100644
index 60275fd..0000000
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteTask.java
+++ /dev/null
@@ -1,86 +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.yarn;
-
-/**
- * Information about launched task.
- */
-public class IgniteTask {
-    /** */
-    public final String host;
-
-    /** */
-    public final double cpuCores;
-
-    /** */
-    public final double mem;
-
-    /** */
-    public final double disk;
-
-    /**
-     * Ignite launched task.
-     *
-     * @param host Host.
-     * @param cpuCores Cpu cores count.
-     * @param mem Memory.
-     * @param disk Disk.
-     */
-    public IgniteTask(String host, double cpuCores, double mem, double disk) {
-        this.host = host;
-        this.cpuCores = cpuCores;
-        this.mem = mem;
-        this.disk = disk;
-    }
-
-    /**
-     * @return Host.
-     */
-    public String host() {
-        return host;
-    }
-
-    /**
-     * @return Cores count.
-     */
-    public double cpuCores() {
-        return cpuCores;
-    }
-
-    /**
-     * @return Memory.
-     */
-    public double mem() {
-        return mem;
-    }
-
-    /**
-     * @return Disk.
-     */
-    public double disk() {
-        return disk;
-    }
-
-    @Override
-    public String toString() {
-        return "IgniteTask " +
-            "host: [" + host + ']' +
-            ", cpuCores: [" + cpuCores + "]" +
-            ", mem: [" + mem + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 092aaa9..0ab9e91 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -17,20 +17,15 @@
 
 package org.apache.ignite.yarn;
 
-import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.*;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
 import org.apache.hadoop.yarn.conf.*;
-import org.apache.hadoop.yarn.util.Apps;
-import org.apache.hadoop.yarn.util.ConverterUtils;
-import org.apache.hadoop.yarn.util.Records;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import org.apache.hadoop.yarn.util.*;
+import org.apache.ignite.yarn.utils.*;
+
+import java.io.*;
+import java.util.*;
 import java.util.logging.*;
 
 import static org.apache.hadoop.yarn.api.ApplicationConstants.*;
@@ -43,11 +38,18 @@ public class IgniteYarnClient {
     public static final Logger log = Logger.getLogger(IgniteYarnClient.class.getSimpleName());
 
     /**
-     * Main methods has only one optional parameter - path to properties files.
+     * Main methods has only one optional parameter - path to properties file.
      *
      * @param args Args.
      */
     public static void main(String[] args) throws Exception {
+        checkArguments(args);
+
+        // Set path to app master jar.
+        String pathAppMasterJar = args[0];
+
+        ClusterProperties props = ClusterProperties.from(args.length == 2 ? args[1] : null);
+
         YarnConfiguration conf = new YarnConfiguration();
         YarnClient yarnClient = YarnClient.createYarnClient();
         yarnClient.init(conf);
@@ -56,45 +58,48 @@ public class IgniteYarnClient {
         // Create application via yarnClient
         YarnClientApplication app = yarnClient.createApplication();
 
+        FileSystem fs = FileSystem.get(conf);
+
+        // Load ignite and jar
+        Path ignite = getIgnite(props, fs);
+
+        Path appJar = IgniteYarnUtils.copyLocalToHdfs(fs, pathAppMasterJar,
+            props.igniteWorkDir() + File.separator + IgniteYarnUtils.JAR_NAME);
+
         // Set up the container launch context for the application master
         ContainerLaunchContext amContainer = Records.newRecord(ContainerLaunchContext.class);
 
+        System.out.println(Environment.JAVA_HOME.$() + "/bin/java -Xmx512m " + ApplicationMaster.class.getName()
+            + IgniteYarnUtils.SPACE + ignite.toUri());
+
         amContainer.setCommands(
-                Collections.singletonList(
-                        " $JAVA_HOME/bin/java -Xmx256M org.apache.ignite.yarn.ApplicationMaster" +
-                        " 1>" + LOG_DIR_EXPANSION_VAR + "/stdout" +
-                        " 2>" + LOG_DIR_EXPANSION_VAR + "/stderr"
-                )
+            Collections.singletonList(
+                Environment.JAVA_HOME.$() + "/bin/java -Xmx512m " + ApplicationMaster.class.getName()
+                + IgniteYarnUtils.SPACE + ignite.toUri()
+                + IgniteYarnUtils.YARN_LOG_OUT
+            )
         );
 
         // Setup jar for ApplicationMaster
-        final LocalResource appMasterJar = Records.newRecord(LocalResource.class);
-        setupAppMasterJar(new Path("/user/ntikhonov/ignite-yarn.jar"), appMasterJar, conf);
-
-        final LocalResource igniteZip = Records.newRecord(LocalResource.class);
-        setupAppMasterJar(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6.zip"), igniteZip, conf);
-
-        amContainer.setLocalResources(new HashMap<String, LocalResource>() {{
-            put("ignite-yarn.jar", appMasterJar);
-            put("gridgain-community-fabric-1.0.6.zip", igniteZip);
-        }});
-
+        LocalResource appMasterJar = IgniteYarnUtils.setupFile(appJar, fs, LocalResourceType.FILE);
 
+        amContainer.setLocalResources(Collections.singletonMap(IgniteYarnUtils.JAR_NAME, appMasterJar));
 
         // Setup CLASSPATH for ApplicationMaster
-        Map<String, String> appMasterEnv = new HashMap<>();
+        Map<String, String> appMasterEnv = props.toEnvs();
+
         setupAppMasterEnv(appMasterEnv, conf);
+
         amContainer.setEnvironment(appMasterEnv);
 
         // Set up resource type requirements for ApplicationMaster
         Resource capability = Records.newRecord(Resource.class);
-        capability.setMemory(256);
+        capability.setMemory(512);
         capability.setVirtualCores(1);
 
         // Finally, set-up ApplicationSubmissionContext for the application
-        ApplicationSubmissionContext appContext =
-                app.getApplicationSubmissionContext();
-        appContext.setApplicationName("simple-yarn-app"); // application name
+        ApplicationSubmissionContext appContext = app.getApplicationSubmissionContext();
+        appContext.setApplicationName("ignition"); // application name
         appContext.setAMContainerSpec(amContainer);
         appContext.setResource(capability);
         appContext.setQueue("default"); // queue
@@ -106,44 +111,57 @@ public class IgniteYarnClient {
 
         ApplicationReport appReport = yarnClient.getApplicationReport(appId);
         YarnApplicationState appState = appReport.getYarnApplicationState();
+
         while (appState != YarnApplicationState.FINISHED &&
                 appState != YarnApplicationState.KILLED &&
                 appState != YarnApplicationState.FAILED) {
             Thread.sleep(100);
+
             appReport = yarnClient.getApplicationReport(appId);
+
             appState = appReport.getYarnApplicationState();
         }
 
-        System.out.println(
-                "Application " + appId + " finished with" +
-                        " state " + appState +
-                        " at " + appReport.getFinishTime());
-    }
+        yarnClient.killApplication(appId);
 
-    private static void setupAppMasterJar(Path jarPath, LocalResource appMasterJar, YarnConfiguration conf)
-        throws Exception {
-        FileSystem fileSystem = FileSystem.get(conf);
-        jarPath = fileSystem.makeQualified(jarPath);
+        System.out.println("Application " + appId + " finished with state " + appState + " at "
+            + appReport.getFinishTime());
+    }
 
-        FileStatus jarStat = fileSystem.getFileStatus(jarPath);
+    /**
+     * Check input arguments.
+     *
+     * @param args Arguments.
+     */
+    private static void checkArguments(String[] args) {
+        if (args.length < 1)
+            throw new IllegalArgumentException();
+    }
 
-        appMasterJar.setResource(ConverterUtils.getYarnUrlFromPath(jarPath));
-        appMasterJar.setSize(jarStat.getLen());
-        appMasterJar.setTimestamp(jarStat.getModificationTime());
-        appMasterJar.setType(LocalResourceType.ARCHIVE);
-        appMasterJar.setVisibility(LocalResourceVisibility.APPLICATION);
+    /**
+     * @param props Properties.
+     * @param fileSystem Hdfs file system.
+     * @return Hdfs path to ignite node.
+     * @throws Exception
+     */
+    private static Path getIgnite(ClusterProperties props, FileSystem fileSystem) throws Exception {
+        IgniteProvider provider = new IgniteProvider(props, fileSystem);
 
-        System.out.println("Path :" + jarPath);
+        return provider.getIgnite();
     }
 
-    private static void setupAppMasterEnv(Map<String, String> appMasterEnv, YarnConfiguration conf) {
-        for (String c : conf.getStrings(
-                YarnConfiguration.YARN_APPLICATION_CLASSPATH,
-                YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH))
-            Apps.addToEnvironment(appMasterEnv, Environment.CLASSPATH.name(),
+    /**
+     *
+     * @param envs Environment variables.
+     * @param conf Yarn configuration.
+     */
+    private static void setupAppMasterEnv(Map<String, String> envs, YarnConfiguration conf) {
+        for (String c : conf.getStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH,
+            YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH))
+            Apps.addToEnvironment(envs, Environment.CLASSPATH.name(),
                     c.trim(), File.pathSeparator);
 
-        Apps.addToEnvironment(appMasterEnv,
+        Apps.addToEnvironment(envs,
                 Environment.CLASSPATH.name(),
                 Environment.PWD.$() + File.separator + "*",
                 File.pathSeparator);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
new file mode 100644
index 0000000..1e6c414
--- /dev/null
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
@@ -0,0 +1,83 @@
+/*
+ * 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.yarn.utils;
+
+import org.apache.hadoop.fs.*;
+import org.apache.hadoop.yarn.api.records.*;
+import org.apache.hadoop.yarn.util.*;
+
+import java.io.IOException;
+
+import static org.apache.hadoop.yarn.api.ApplicationConstants.*;
+
+/**
+ *
+ */
+public class IgniteYarnUtils {
+    /** */
+    public static final String DEFAULT_IGNITE_CONFIG = "ignite-default-config.xml";
+
+    /** */
+    public static final String SPACE = " ";
+
+    /** */
+    public static final String JAR_NAME = "ignite-yarn.jar";
+
+    /** */
+    public static final String YARN_LOG_OUT =
+        " 1>" + LOG_DIR_EXPANSION_VAR + "/stdout" +
+        " 2>" + LOG_DIR_EXPANSION_VAR + "/stderr";
+
+    /**
+     * @param file Path.
+     * @param fs File system.
+     * @param type Local resource type.
+     * @throws Exception If failed.
+     */
+    public static LocalResource setupFile(Path file, FileSystem fs, LocalResourceType type)
+        throws Exception {
+        LocalResource resource = Records.newRecord(LocalResource.class);
+
+        file = fs.makeQualified(file);
+
+        FileStatus stat = fs.getFileStatus(file);
+
+        resource.setResource(ConverterUtils.getYarnUrlFromPath(file));
+        resource.setSize(stat.getLen());
+        resource.setTimestamp(stat.getModificationTime());
+        resource.setType(type);
+        resource.setVisibility(LocalResourceVisibility.APPLICATION);
+
+        return resource;
+    }
+
+    /**
+     * @param fs File system.
+     * @param src Source path.
+     * @param dst Destination path.
+     * @return Path to file to hdfs file system.
+     */
+    public static Path copyLocalToHdfs(FileSystem fs, String src, String dst) throws Exception {
+        Path dstPath = new Path(dst);
+
+        // Local file isn't removed, dst file override.
+        fs.copyFromLocalFile(false, true, new Path(src), dstPath);
+
+        return dstPath;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/85f4a891/modules/yarn/src/main/resources/ignite-default-config.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/resources/ignite-default-config.xml b/modules/yarn/src/main/resources/ignite-default-config.xml
new file mode 100644
index 0000000..96bb669
--- /dev/null
+++ b/modules/yarn/src/main/resources/ignite-default-config.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"/>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>


[09/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: 8879c2a812eb05dd9500dc25be6a07bee2bfa983
Parents: 78ab7aa
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Wed Jun 10 17:40:06 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Wed Jun 10 17:40:06 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java  | 2 +-
 modules/yarn/src/main/resources/ignite-default-config.xml        | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8879c2a8/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 a784340..bdc6f9a 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
@@ -189,7 +189,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         for (ContainerStatus status : statuses) {
             containers.remove(status.getContainerId());
 
-            log.log(Level.INFO, "Container stopped. Container id: {0}. State: {1}.",
+            log.log(Level.INFO, "Container completed. Container id: {0}. State: {1}.",
                 new Object[]{status.getContainerId(), status.getState()});
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8879c2a8/modules/yarn/src/main/resources/ignite-default-config.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/resources/ignite-default-config.xml b/modules/yarn/src/main/resources/ignite-default-config.xml
index 96bb669..2f26398 100644
--- a/modules/yarn/src/main/resources/ignite-default-config.xml
+++ b/modules/yarn/src/main/resources/ignite-default-config.xml
@@ -25,8 +25,10 @@
         <property name="discoverySpi">
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"/>
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"/>
                 </property>
+
+                <property name="joinTimeout" value="60000"/>
             </bean>
         </property>
     </bean>


[27/50] [abbrv] incubator-ignite git commit: review YARN

Posted by sb...@apache.org.
review YARN


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

Branch: refs/heads/ignite-901
Commit: f6279767ad499ca2540f493b93427f44c98d699d
Parents: c392cdc
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jul 9 16:22:31 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jul 9 16:22:31 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt                                               | 1 +
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java | 4 +---
 .../src/main/java/org/apache/ignite/yarn/IgniteContainer.java   | 5 +----
 3 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 0e22f1f..f68a339 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -5,6 +5,7 @@ Apache Ignite In-Memory Data Fabric 1.3
 ---------------------------------------
 
 * Added auto-retries for cache operations in recoverable cases.
+* Added integration with Apache YARN.
 * Fixed several issues with JTA integration.
 * Fixed several issues with Hibernate L2 cache.
 * Fixed issue with GAR files in source release.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/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 f57df92..9169178 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
@@ -74,7 +74,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
-     * Constructor.
+     * @param
      */
     public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
         this.conf = new YarnConfiguration();
@@ -145,8 +145,6 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     }
 
     /**
-     * Checks that container
-     *
      * @param cont Container.
      * @return {@code True} if
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
index a8b0342..313e9e1 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -81,9 +81,6 @@ public class IgniteContainer {
      * {@inheritDoc}
      */
     @Override public String toString() {
-        return "IgniteTask " +
-            "host: [" + nodeId.getHost() + ']' +
-            ", cpuCores: [" + cpuCores + "]" +
-            ", mem: [" + mem + "]";
+        return "IgniteTask [host=" + nodeId.getHost() + ", cpuCores=" + cpuCores + ", mem=" + mem + ']';
     }
 }


[35/50] [abbrv] incubator-ignite git commit: IGNITE-1097 review (cherry picked from commit 07a98df)

Posted by sb...@apache.org.
IGNITE-1097 review
(cherry picked from commit 07a98df)


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

Branch: refs/heads/ignite-901
Commit: e11f46b8e9e1aa8634eeb85122a331958561c90b
Parents: 76515ae
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jul 9 17:47:26 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:48:22 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/future/GridFutureChainListener.java   | 4 ----
 .../processors/cache/GridCacheAbstractFullApiSelfTest.java     | 6 +++---
 2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e11f46b8/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
index d98538e..43ffa61 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.util.future;
 
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 
 /**
@@ -57,9 +56,6 @@ public class GridFutureChainListener<T, R> implements IgniteInClosure<IgniteInte
             fut.onDone(e.unwrap());
         }
         catch (RuntimeException | Error e) {
-            U.warn(null, "Failed to notify chained future (is grid stopped?) [doneCb=" + doneCb +
-                ", err=" + e.getMessage() + ']');
-
             fut.onDone(e);
 
             throw e;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e11f46b8/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 3f9c365..0a8f87c 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
@@ -69,7 +69,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                 throw new RuntimeException("Failed!");
             }
         };
-    
+
     /** Increment processor for invoke operations. */
     public static final EntryProcessor<String, Integer, String> INCR_PROCESSOR = new EntryProcessor<String, Integer, String>() {
         @Override public String process(MutableEntry<String, Integer> e, Object... args) {
@@ -5005,7 +5005,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      */
     public void testTransformException() throws Exception {
         final IgniteCache<String, Integer> cache = jcache().withAsync();
-        
+
         cache.invoke("key2", ERR_PROCESSOR);
 
         assertThrows(log, new Callable<Object>() {
@@ -5023,7 +5023,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             }
         }, EntryProcessorException.class, null);
     }
-    
+
     /**
      * Sets given value, returns old value.
      */


[26/50] [abbrv] incubator-ignite git commit: Fixed notes

Posted by sb...@apache.org.
Fixed notes


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

Branch: refs/heads/ignite-901
Commit: c392cdc9adb759cb73bbfc7f01e3d4be3cc65ea6
Parents: 3a2376c
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 16:01:30 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 16:01:30 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 10 +++-
 .../apache/ignite/yarn/ClusterProperties.java   | 48 ++++++++++++++++++++
 .../apache/ignite/yarn/IgniteYarnClient.java    |  7 ++-
 3 files changed, 63 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/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 739a71a..f57df92 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
@@ -93,6 +93,9 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
                     env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
 
+                    if (props.jvmOpts() != null && !props.jvmOpts().isEmpty())
+                        env.put("JVM_OPTS", props.jvmOpts());
+
                     ctx.setEnvironment(env);
 
                     Map<String, LocalResource> resources = new HashMap<>();
@@ -100,6 +103,10 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                     resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
                     resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
 
+                    if (props.licencePath() != null)
+                        resources.put("gridgain-license.xml",
+                            IgniteYarnUtils.setupFile(new Path(props.licencePath()), fs, LocalResourceType.FILE));
+
                     if (props.userLibs() != null)
                         resources.put("libs", IgniteYarnUtils.setupFile(new Path(props.userLibs()), fs,
                             LocalResourceType.FILE));
@@ -108,7 +115,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
                     ctx.setCommands(
                         Collections.singletonList(
-                            "cp -r ./libs/* ./ignite/*/libs/ || true && "
+                            (props.licencePath() != null ? "cp gridgain-license.xml ./ignite/*/ || true && " : "")
+                            + "cp -r ./libs/* ./ignite/*/libs/ || true && "
                             + "./ignite/*/bin/ignite.sh "
                             + "./ignite-config.xml"
                             + " -J-Xmx" + c.getResource().getMemory() + "m"

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/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 d1a6390..a2d88c0 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
@@ -87,6 +87,24 @@ public class ClusterProperties {
     private String igniteWorkDir = DEFAULT_IGNITE_WORK_DIR;
 
     /** */
+    public static final String IGNITE_PATH = "IGNITE_PATH";
+
+    /** Ignite path. */
+    private String ignitePath = null;
+
+    /** */
+    public static final String LICENCE_PATH = "LICENCE_PATH";
+
+    /** Licence path. */
+    private String licencePath = null;
+
+    /** */
+    public static final String IGNITE_JVM_OPTS = "IGNITE_JVM_OPTS";
+
+    /** JVM opts. */
+    private String jvmOpts = null;
+
+    /** */
     public static final String IGNITE_LOCAL_WORK_DIR = "IGNITE_LOCAL_WORK_DIR";
 
     /** */
@@ -231,6 +249,27 @@ public class ClusterProperties {
     }
 
     /**
+     * @return Licence path.
+     */
+    public String licencePath() {
+        return licencePath;
+    }
+
+    /**
+     * @return Licence path.
+     */
+    public String ignitePath() {
+        return ignitePath;
+    }
+
+    /**
+     * @return Licence path.
+     */
+    public String jvmOpts() {
+        return jvmOpts;
+    }
+
+    /**
      * @return Host name constraint.
      */
     public Pattern hostnameConstraint() {
@@ -260,6 +299,9 @@ public class ClusterProperties {
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
 
             prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
+            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);
@@ -297,6 +339,9 @@ public class ClusterProperties {
         prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, DEFAULT_IGNITE_NODE_COUNT);
 
         prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
+        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);
@@ -332,6 +377,9 @@ public class ClusterProperties {
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
         envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
+        envs.put(IGNITE_PATH, toEnvVal(ignitePath));
+        envs.put(LICENCE_PATH, toEnvVal(licencePath));
+        envs.put(IGNITE_JVM_OPTS, toEnvVal(jvmOpts));
         envs.put(IGNITE_WORKING_DIR, toEnvVal(igniteWorkDir));
         envs.put(IGNITE_LOCAL_WORK_DIR, toEnvVal(igniteLocalWorkDir));
         envs.put(IGNITE_RELEASES_DIR, toEnvVal(igniteReleasesDir));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 764e717..299f028 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -61,8 +61,13 @@ public class IgniteYarnClient {
 
         FileSystem fs = FileSystem.get(conf);
 
+        Path ignite;
+
         // Load ignite and jar
-        Path ignite = getIgnite(props, fs);
+        if (props.ignitePath() == null)
+            ignite = getIgnite(props, fs);
+        else
+            ignite = new Path(props.ignitePath());
 
         Path appJar = IgniteYarnUtils.copyLocalToHdfs(fs, pathAppMasterJar,
             props.igniteWorkDir() + File.separator + IgniteYarnUtils.JAR_NAME);


[33/50] [abbrv] incubator-ignite git commit: # IGNITE-1097 Wrap RuntimeException to GridClosureException. (cherry picked from commit 6831b30)

Posted by sb...@apache.org.
# IGNITE-1097 Wrap RuntimeException to GridClosureException.
(cherry picked from commit 6831b30)


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

Branch: refs/heads/ignite-901
Commit: 208417597717fce72714bf778296f838074fa4bb
Parents: 98c57e0
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:25:42 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:45 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 29 ++++++++++++++++----
 1 file changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20841759/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 b31b2e8..00fc0f9 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
@@ -28,6 +28,7 @@ import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -884,7 +885,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
                     IgniteInternalFuture<Void> fut0 = fut.chain(new CX1<IgniteInternalFuture<Boolean>, Void>() {
                         @Override public Void applyx(IgniteInternalFuture<Boolean> fut) throws IgniteCheckedException {
-                            fut.get();
+                            try {
+                                fut.get();
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
 
                             return null;
                         }
@@ -1238,9 +1244,14 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
                         @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
                             throws IgniteCheckedException {
-                            EntryProcessorResult<T> res = fut.get();
-
-                            return res != null ? res.get() : null;
+                            try {
+                                EntryProcessorResult<T> res = fut.get();
+
+                                return res != null ? res.get() : null;
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
                         }
                     });
 
@@ -1276,9 +1287,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
                         @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
                             throws IgniteCheckedException {
-                            EntryProcessorResult<T> res = fut.get();
 
-                            return res != null ? res.get() : null;
+                            try {
+                                EntryProcessorResult<T> res = fut.get();
+
+                                return res != null ? res.get() : null;
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
                         }
                     });
 


[39/50] [abbrv] incubator-ignite git commit: # merge from master

Posted by sb...@apache.org.
# merge from master


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

Branch: refs/heads/ignite-901
Commit: 5f28cce34c6d0329e0a2ea46d6ea8b4aaf23eb0a
Parents: b19f5c4 6386794
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jul 10 15:56:18 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jul 10 15:56:18 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/datastreamer/DataStreamProcessor.java     | 3 +++
 .../java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[47/50] [abbrv] incubator-ignite git commit: release notes + minor

Posted by sb...@apache.org.
release notes + minor


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

Branch: refs/heads/ignite-901
Commit: 10c8a71b9aba311eb96367a6836e2e1420cf640d
Parents: d5ed494
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 14 16:41:27 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 14 16:41:27 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/plugin/security/SecuritySubjectType.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/10c8a71b/modules/core/src/main/java/org/apache/ignite/plugin/security/SecuritySubjectType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/security/SecuritySubjectType.java b/modules/core/src/main/java/org/apache/ignite/plugin/security/SecuritySubjectType.java
index 2170807..f625a3a 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/security/SecuritySubjectType.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/security/SecuritySubjectType.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.plugin.security;
 
+import org.apache.ignite.cluster.*;
 import org.jetbrains.annotations.*;
 
 /**
@@ -24,7 +25,7 @@ import org.jetbrains.annotations.*;
  */
 public enum SecuritySubjectType {
     /**
-     * Subject type for a remote {@link org.apache.ignite.cluster.ClusterNode}.
+     * Subject type for a remote {@link ClusterNode}.
      */
     REMOTE_NODE,
 


[21/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1067

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1067

Conflicts:
	modules/rest-http/pom.xml
	modules/web/pom.xml


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

Branch: refs/heads/ignite-901
Commit: deb0ab38842bc5c65156d534770cb4df08e4c2e9
Parents: 3066b4a b8a4b5a
Author: Anton <av...@gridgain.com>
Authored: Tue Jul 7 13:49:38 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Tue Jul 7 13:49:38 2015 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                  |   8 +-
 bin/ignite.sh                                   |   6 +-
 bin/include/parseargs.bat                       |   1 +
 bin/include/parseargs.sh                        |   3 +
 modules/core/pom.xml                            |   4 +-
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../internal/interop/InteropIgnition.java       |  31 +-
 .../processors/cache/CacheOperationContext.java |  44 ++-
 .../processors/cache/GridCacheAdapter.java      |  91 +++--
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++-----
 .../processors/cache/GridCacheUtils.java        |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |  36 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 ++++++++-
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +-
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +-
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../startup/cmdline/CommandLineStartup.java     |   3 +-
 .../startup/cmdline/CommandLineTransformer.java |   9 +
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 ++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 ++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../GridCachePartitionedFailoverSelfTest.java   |   5 +
 ...acheAtomicReplicatedNodeRestartSelfTest.java |  10 +
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../TcpDiscoveryNodeConsistentIdSelfTest.java   |  80 ++++
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |   2 +
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 modules/kafka/pom.xml                           | 116 ++++++
 .../ignite/stream/kafka/KafkaStreamer.java      | 220 +++++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |  37 ++
 .../stream/kafka/KafkaEmbeddedBroker.java       | 378 +++++++++++++++++++
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 227 +++++++++++
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 +++
 modules/mesos/pom.xml                           |   1 -
 modules/rest-http/pom.xml                       |  12 +-
 .../scalar-2.10/licenses/scala-bsd-license.txt  |  18 -
 modules/scalar/licenses/scala-bsd-license.txt   |  18 -
 .../licenses/cron4j-lgpl-2.1-license.txt        | 174 ---------
 modules/slf4j/licenses/sl4j-mit-license.txt     |  21 --
 .../spark-2.10/licenses/scala-bsd-license.txt   |  18 -
 .../util/spring/IgniteSpringHelperImpl.java     |  72 +++-
 .../IgniteExcludeInConfigurationTest.java       |  78 ++++
 .../org/apache/ignite/spring/sprint-exclude.xml |  57 +++
 .../testsuites/IgniteSpringTestSuite.java       |   2 +
 modules/ssh/licenses/jcraft-revised-bsd.txt     |  28 --
 modules/tools/licenses/jodd-revised-bsd.txt     |  21 --
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 ---
 modules/urideploy/pom.xml                       |   8 +-
 .../licenses/jline-bsd-license.txt              |  18 -
 .../licenses/scala-bsd-license.txt              |  18 -
 .../ignite/visor/commands/VisorConsole.scala    |   3 +-
 .../visor/commands/open/VisorOpenCommand.scala  | 319 ++++++++++++++++
 .../scala/org/apache/ignite/visor/visor.scala   | 230 +----------
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |   2 +
 .../commands/kill/VisorKillCommandSpec.scala    |   1 +
 .../commands/start/VisorStartCommandSpec.scala  |   1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |   1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |   1 +
 .../licenses/slf4j-mit-license.txt              |  21 --
 .../web/licenses/tomcat-servlet-api-cddl.txt    | 240 ------------
 modules/web/pom.xml                             |   4 +-
 parent/pom.xml                                  |   1 +
 pom.xml                                         |   1 +
 80 files changed, 2569 insertions(+), 1156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/rest-http/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/scalar-2.10/licenses/scala-bsd-license.txt
----------------------------------------------------------------------
diff --cc modules/scalar-2.10/licenses/scala-bsd-license.txt
index b2be111,b2be111..0000000
deleted file mode 100644,100644
--- a/modules/scalar-2.10/licenses/scala-bsd-license.txt
+++ /dev/null
@@@ -1,18 -1,18 +1,0 @@@
--Copyright (c) 2002-2014 EPFL
--Copyright (c) 2011-2014 Typesafe, Inc.
--
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
--other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
--derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/scalar/licenses/scala-bsd-license.txt
----------------------------------------------------------------------
diff --cc modules/scalar/licenses/scala-bsd-license.txt
index b2be111,b2be111..0000000
deleted file mode 100644,100644
--- a/modules/scalar/licenses/scala-bsd-license.txt
+++ /dev/null
@@@ -1,18 -1,18 +1,0 @@@
--Copyright (c) 2002-2014 EPFL
--Copyright (c) 2011-2014 Typesafe, Inc.
--
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
--other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
--derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/schedule/licenses/cron4j-lgpl-2.1-license.txt
----------------------------------------------------------------------
diff --cc modules/schedule/licenses/cron4j-lgpl-2.1-license.txt
index abbd747,abbd747..0000000
deleted file mode 100644,100644
--- a/modules/schedule/licenses/cron4j-lgpl-2.1-license.txt
+++ /dev/null
@@@ -1,174 -1,174 +1,0 @@@
--GNU LESSER GENERAL PUBLIC LICENSE
--
--Version 2.1, February 1999
--
--Copyright (C) 1991, 1999 Free Software Foundation, Inc.
--51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
--Everyone is permitted to copy and distribute verbatim copies
--of this license document, but changing it is not allowed.
--
--[This is the first released version of the Lesser GPL.  It also counts
-- as the successor of the GNU Library Public License, version 2, hence
-- the version number 2.1.]
--Preamble
--
--The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
--
--This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
--
--When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
--
--To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
--
--For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
--
--We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
--
--To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
--
--Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
--
--Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
--
--When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
--
--We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
--
--For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
--
--In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
--
--Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
--
--The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
--
--TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
--
--0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
--
--A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
--
--The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
--
--"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
--
--Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
--
--1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
--
--You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
--
--2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
--
--a) The modified work must itself be a software library.
--b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
--c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
--d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
--(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
--
--These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
--
--Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
--
--In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
--
--3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
--
--Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
--
--This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
--
--4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
--
--If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
--
--5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
--
--However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
--
--When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
--
--If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
--
--Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
--
--6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
--
--You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
--
--a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
--b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
--c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
--d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
--e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
--For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
--
--It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
--
--7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
--
--a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
--b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
--8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
--
--9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
--
--10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
--
--11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
--
--If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
--
--It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
--
--This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
--
--12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
--
--13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
--
--Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
--
--14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
--
--NO WARRANTY
--
--15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
--
--16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
--
--END OF TERMS AND CONDITIONS
--
--How to Apply These Terms to Your New Libraries
--
--If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
--
--To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
--
--one line to give the library's name and an idea of what it does.
--Copyright (C) year  name of author
--
--This library is free software; you can redistribute it and/or
--modify it under the terms of the GNU Lesser General Public
--License as published by the Free Software Foundation; either
--version 2.1 of the License, or (at your option) any later version.
--
--This library is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--Lesser General Public License for more details.
--
--You should have received a copy of the GNU Lesser General Public
--License along with this library; if not, write to the Free Software
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
--Also add information on how to contact you by electronic and paper mail.
--
--You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
--
--Yoyodyne, Inc., hereby disclaims all copyright interest in
--the library `Frob' (a library for tweaking knobs) written
--by James Random Hacker.
--
--signature of Ty Coon, 1 April 1990
--Ty Coon, President of Vice
--That's all there is to it!

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/slf4j/licenses/sl4j-mit-license.txt
----------------------------------------------------------------------
diff --cc modules/slf4j/licenses/sl4j-mit-license.txt
index bc7fd29,bc7fd29..0000000
deleted file mode 100644,100644
--- a/modules/slf4j/licenses/sl4j-mit-license.txt
+++ /dev/null
@@@ -1,21 -1,21 +1,0 @@@
--Copyright (c) 2004-2013 QOS.ch
--All rights reserved.
--
--Permission is hereby granted, free  of charge, to any person obtaining
--a  copy  of this  software  and  associated  documentation files  (the
--"Software"), to  deal in  the Software without  restriction, including
--without limitation  the rights to  use, copy, modify,  merge, publish,
--distribute,  sublicense, and/or sell  copies of  the Software,  and to
--permit persons to whom the Software  is furnished to do so, subject to
--the following conditions:
--
--The  above  copyright  notice  and  this permission  notice  shall  be
--included in all copies or substantial portions of the Software.
--
--THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
--EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
--MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
--NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
--WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/spark-2.10/licenses/scala-bsd-license.txt
----------------------------------------------------------------------
diff --cc modules/spark-2.10/licenses/scala-bsd-license.txt
index b2be111,b2be111..0000000
deleted file mode 100644,100644
--- a/modules/spark-2.10/licenses/scala-bsd-license.txt
+++ /dev/null
@@@ -1,18 -1,18 +1,0 @@@
--Copyright (c) 2002-2014 EPFL
--Copyright (c) 2011-2014 Typesafe, Inc.
--
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
--other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
--derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/ssh/licenses/jcraft-revised-bsd.txt
----------------------------------------------------------------------
diff --cc modules/ssh/licenses/jcraft-revised-bsd.txt
index 3748f98,3748f98..0000000
deleted file mode 100644,100644
--- a/modules/ssh/licenses/jcraft-revised-bsd.txt
+++ /dev/null
@@@ -1,28 -1,28 +1,0 @@@
--3-clause BSD license
--------------------------------------------------------------------------------
--Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are met:
--
--  1. Redistributions of source code must retain the above copyright notice,
--     this list of conditions and the following disclaimer.
--
--  2. Redistributions in binary form must reproduce the above copyright
--     notice, this list of conditions and the following disclaimer in
--     the documentation and/or other materials provided with the distribution.
--
--  3. The names of the authors may not be used to endorse or promote products
--     derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
--INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
--FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
--INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
--INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
--OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
--EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/tools/licenses/jodd-revised-bsd.txt
----------------------------------------------------------------------
diff --cc modules/tools/licenses/jodd-revised-bsd.txt
index 129f3f0,129f3f0..0000000
deleted file mode 100644,100644
--- a/modules/tools/licenses/jodd-revised-bsd.txt
+++ /dev/null
@@@ -1,21 -1,21 +1,0 @@@
--Jodd software is released under Revised BSD License.
--
--Copyright (c) 2003-2014, Jodd Team All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation
--and/or other materials provided with the distribution.
--
--Neither the name of the Jodd nor the names of its contributors may be used to endorse or promote products derived from this software without specific
--prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/urideploy/licenses/jtidy-mit-license.txt
----------------------------------------------------------------------
diff --cc modules/urideploy/licenses/jtidy-mit-license.txt
index 3f5714a,3f5714a..0000000
deleted file mode 100644,100644
--- a/modules/urideploy/licenses/jtidy-mit-license.txt
+++ /dev/null
@@@ -1,50 -1,50 +1,0 @@@
--Java HTML Tidy - JTidy
--HTML parser and pretty printer
--
--Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
--Institute of Technology, Institut National de Recherche en
--Informatique et en Automatique, Keio University). All Rights
--Reserved.
--
--Contributing Author(s):
--
--   Dave Raggett <ds...@w3.org>
--   Andy Quick <ac...@sympatico.ca> (translation to Java)
--   Gary L Peskin <ga...@firstech.com> (Java development)
--   Sami Lempinen <sa...@lempinen.net> (release management)
--   Fabrizio Giustina <fgiust at users.sourceforge.net>
--
--The contributing author(s) would like to thank all those who
--helped with testing, bug fixes, and patience.  This wouldn't
--have been possible without all of you.
--
--COPYRIGHT NOTICE:
--
--This software and documentation is provided "as is," and
--the copyright holders and contributing author(s) make no
--representations or warranties, express or implied, including
--but not limited to, warranties of merchantability or fitness
--for any particular purpose or that the use of the software or
--documentation will not infringe any third party patents,
--copyrights, trademarks or other rights.
--
--The copyright holders and contributing author(s) will not be
--liable for any direct, indirect, special or consequential damages
--arising out of any use of the software or documentation, even if
--advised of the possibility of such damage.
--
--Permission is hereby granted to use, copy, modify, and distribute
--this source code, or portions hereof, documentation and executables,
--for any purpose, without fee, subject to the following restrictions:
--
--1. The origin of this source code must not be misrepresented.
--2. Altered versions must be plainly marked as such and must
--   not be misrepresented as being the original source.
--3. This Copyright notice may not be removed or altered from any
--   source or altered source distribution.
--
--The copyright holders and contributing author(s) specifically
--permit, without fee, and encourage the use of this source code
--as a component for supporting the Hypertext Markup Language in
--commercial products. If you use this source code in a product,
--acknowledgment is not required but would be appreciated.

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/visor-console/licenses/jline-bsd-license.txt
----------------------------------------------------------------------
diff --cc modules/visor-console/licenses/jline-bsd-license.txt
index b2be111,b2be111..0000000
deleted file mode 100644,100644
--- a/modules/visor-console/licenses/jline-bsd-license.txt
+++ /dev/null
@@@ -1,18 -1,18 +1,0 @@@
--Copyright (c) 2002-2014 EPFL
--Copyright (c) 2011-2014 Typesafe, Inc.
--
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
--other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
--derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/visor-console/licenses/scala-bsd-license.txt
----------------------------------------------------------------------
diff --cc modules/visor-console/licenses/scala-bsd-license.txt
index b2be111,b2be111..0000000
deleted file mode 100644,100644
--- a/modules/visor-console/licenses/scala-bsd-license.txt
+++ /dev/null
@@@ -1,18 -1,18 +1,0 @@@
--Copyright (c) 2002-2014 EPFL
--Copyright (c) 2011-2014 Typesafe, Inc.
--
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
--Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
--other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products
--derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
--BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
--GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/visor-plugins/licenses/slf4j-mit-license.txt
----------------------------------------------------------------------
diff --cc modules/visor-plugins/licenses/slf4j-mit-license.txt
index e945392,e945392..0000000
deleted file mode 100644,100644
--- a/modules/visor-plugins/licenses/slf4j-mit-license.txt
+++ /dev/null
@@@ -1,21 -1,21 +1,0 @@@
--Copyright (c) 2004-2013 QOS.ch
-- All rights reserved.
--
-- Permission is hereby granted, free  of charge, to any person obtaining
-- a  copy  of this  software  and  associated  documentation files  (the
-- "Software"), to  deal in  the Software without  restriction, including
-- without limitation  the rights to  use, copy, modify,  merge, publish,
-- distribute,  sublicense, and/or sell  copies of  the Software,  and to
-- permit persons to whom the Software  is furnished to do so, subject to
-- the following conditions:
-- 
-- The  above  copyright  notice  and  this permission  notice  shall  be
-- included in all copies or substantial portions of the Software.
-- 
-- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/modules/web/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/parent/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deb0ab38/pom.xml
----------------------------------------------------------------------


[38/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1.3' into ignite-1.3

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.3' into ignite-1.3

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java


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

Branch: refs/heads/ignite-901
Commit: b19f5c45fe179d12024fc12f4f2b9823ea04ebe0
Parents: a233fa0 e11f46b
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jul 10 10:49:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jul 10 10:49:53 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheFutureImpl.java |  6 +++
 .../processors/cache/IgniteCacheProxy.java      | 55 ++++++--------------
 .../util/future/GridFutureChainListener.java    |  4 --
 .../internal/util/future/IgniteFutureImpl.java  | 12 +++--
 .../cache/GridCacheAbstractFullApiSelfTest.java | 32 ++++++++++++
 5 files changed, 63 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


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


[25/50] [abbrv] incubator-ignite git commit: Merge branch 'master' into yarn

Posted by sb...@apache.org.
Merge branch 'master' into yarn

Conflicts:
	pom.xml


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

Branch: refs/heads/ignite-901
Commit: 3a2376cbb0129a879690615bb774eb54977fc472
Parents: b02b8dd 546d595
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 14:56:01 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 14:56:01 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   63 +-
 RELEASE_NOTES.txt                               |   24 +
 assembly/dependencies-fabric.xml                |    2 +
 assembly/dependencies-visor-console.xml         |    3 +
 bin/ignite.bat                                  |    8 +-
 bin/ignite.sh                                   |    6 +-
 bin/include/parseargs.bat                       |    1 +
 bin/include/parseargs.sh                        |    3 +
 dev-tools/slurp.sh                              |    2 +-
 examples/config/example-cache.xml               |    2 +
 examples/pom.xml                                |   36 +-
 .../hibernate/CacheHibernatePersonStore.java    |  202 +-
 .../hibernate/CacheHibernateStoreExample.java   |   17 +
 .../store/jdbc/CacheJdbcPersonStore.java        |  180 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   13 +
 .../store/spring/CacheSpringPersonStore.java    |  128 +
 .../store/spring/CacheSpringStoreExample.java   |  143 +
 .../datagrid/store/spring/package-info.java     |   22 +
 .../client/memcache/MemcacheRestExample.java    |   32 +-
 idea/ignite_codeStyle.xml                       |  147 +
 modules/aop/pom.xml                             |    2 +-
 modules/aws/pom.xml                             |    2 +-
 .../s3/S3CheckpointManagerSelfTest.java         |    2 +-
 .../checkpoint/s3/S3CheckpointSpiSelfTest.java  |    4 +-
 .../s3/S3CheckpointSpiStartStopSelfTest.java    |    2 +-
 .../s3/S3SessionCheckpointSelfTest.java         |    2 +-
 .../s3/TcpDiscoveryS3IpFinderSelfTest.java      |    2 +-
 modules/clients/pom.xml                         |    2 +-
 .../ClientAbstractConnectivitySelfTest.java     |    4 +-
 .../client/router/TcpSslRouterSelfTest.java     |    5 +
 .../client/suite/IgniteClientTestSuite.java     |    3 +-
 modules/cloud/pom.xml                           |    2 +-
 .../cloud/TcpDiscoveryCloudIpFinder.java        |   25 +-
 .../TcpDiscoveryCloudIpFinderSelfTest.java      |    3 +-
 modules/codegen/pom.xml                         |    2 +-
 modules/core/pom.xml                            |    7 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    2 +-
 .../java/org/apache/ignite/IgniteCache.java     |   46 +-
 .../apache/ignite/IgniteSystemProperties.java   |    9 +
 .../main/java/org/apache/ignite/Ignition.java   |   18 +-
 .../org/apache/ignite/cache/CacheMetrics.java   |  187 +-
 .../ignite/cache/eviction/EvictableEntry.java   |    7 +
 .../ignite/cache/eviction/EvictionPolicy.java   |    2 +
 .../cache/eviction/fifo/FifoEvictionPolicy.java |  112 +-
 .../eviction/fifo/FifoEvictionPolicyMBean.java  |   22 +
 .../cache/eviction/lru/LruEvictionPolicy.java   |  130 +-
 .../eviction/lru/LruEvictionPolicyMBean.java    |   38 +
 .../eviction/random/RandomEvictionPolicy.java   |   10 +-
 .../eviction/sorted/SortedEvictionPolicy.java   |  146 +-
 .../sorted/SortedEvictionPolicyMBean.java       |   22 +
 .../apache/ignite/cache/query/QueryMetrics.java |    6 +-
 .../apache/ignite/cache/query/ScanQuery.java    |   48 +-
 .../apache/ignite/cache/store/CacheStore.java   |    2 +
 .../ignite/cache/store/CacheStoreSession.java   |   22 +
 .../cache/store/CacheStoreSessionListener.java  |  133 +
 .../cache/store/jdbc/CacheJdbcBlobStore.java    |   22 +-
 .../store/jdbc/CacheJdbcBlobStoreFactory.java   |  290 +
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |    6 +-
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   |  148 +
 .../jdbc/CacheJdbcStoreSessionListener.java     |  141 +
 .../org/apache/ignite/cluster/ClusterGroup.java |   18 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   26 +-
 .../configuration/CacheConfiguration.java       |  177 +-
 .../configuration/IgniteConfiguration.java      |   48 +-
 .../configuration/IgniteReflectionFactory.java  |   81 +-
 .../configuration/NearCacheConfiguration.java   |   10 +-
 .../configuration/TransactionConfiguration.java |   23 +
 .../org/apache/ignite/igfs/IgfsUserContext.java |  119 +
 .../igfs/secondary/IgfsSecondaryFileSystem.java |    7 +
 .../ignite/internal/ClusterMetricsSnapshot.java |   14 +
 .../internal/GridEventConsumeHandler.java       |  100 +-
 .../ignite/internal/GridKernalContext.java      |    5 +
 .../ignite/internal/GridKernalContextImpl.java  |   13 +-
 .../ignite/internal/GridPluginContext.java      |    6 +
 .../apache/ignite/internal/IgniteKernal.java    |   96 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    5 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   30 +-
 .../internal/MarshallerContextAdapter.java      |   82 +-
 .../ignite/internal/MarshallerContextImpl.java  |   38 +-
 .../client/GridClientConfiguration.java         |    2 +-
 .../GridClientOptimizedMarshaller.java          |   26 +
 .../impl/GridTcpRouterNioListenerAdapter.java   |    2 +-
 .../internal/cluster/ClusterGroupAdapter.java   |   50 +-
 .../cluster/IgniteClusterAsyncImpl.java         |   12 +-
 .../internal/events/DiscoveryCustomEvent.java   |   18 +-
 .../internal/igfs/common/IgfsMarshaller.java    |   35 +-
 .../igfs/common/IgfsPathControlRequest.java     |   22 +
 .../internal/interop/InteropBootstrap.java      |    3 +-
 .../internal/interop/InteropIgnition.java       |   93 +-
 .../internal/interop/InteropProcessor.java      |   15 +
 .../internal/managers/GridManagerAdapter.java   |   76 +-
 .../checkpoint/GridCheckpointManager.java       |   52 +-
 .../managers/communication/GridIoManager.java   |  294 +-
 .../managers/communication/GridIoMessage.java   |   15 +-
 .../managers/communication/GridIoPolicy.java    |   32 +-
 .../managers/discovery/CustomEventListener.java |   31 +
 .../discovery/CustomMessageWrapper.java         |   63 +
 .../discovery/DiscoveryCustomMessage.java       |   54 +
 .../discovery/GridDiscoveryManager.java         |  345 +-
 .../eventstorage/GridEventStorageManager.java   |    2 +-
 .../managers/indexing/GridIndexingManager.java  |    4 -
 .../affinity/AffinityTopologyVersion.java       |    7 -
 .../affinity/GridAffinityAssignment.java        |   12 +
 .../affinity/GridAffinityAssignmentCache.java   |   40 +-
 .../affinity/GridAffinityProcessor.java         |   23 +-
 .../cache/CacheEvictableEntryImpl.java          |   31 +
 .../processors/cache/CacheMetricsImpl.java      |  367 +-
 .../cache/CacheMetricsMXBeanImpl.java           |  100 +
 .../processors/cache/CacheMetricsSnapshot.java  |  380 +-
 .../processors/cache/CacheObjectImpl.java       |    1 -
 .../processors/cache/CacheOperationContext.java |   44 +-
 .../internal/processors/cache/CacheType.java    |    8 +-
 .../cache/DynamicCacheChangeBatch.java          |   29 +-
 .../cache/DynamicCacheDescriptor.java           |   19 +
 .../processors/cache/GridCacheAdapter.java      |  156 +-
 .../cache/GridCacheAffinityManager.java         |   14 +
 .../processors/cache/GridCacheAtomicFuture.java |   12 +-
 .../processors/cache/GridCacheAttributes.java   |    3 +
 .../cache/GridCacheConcurrentMap.java           |   21 +-
 .../processors/cache/GridCacheContext.java      |   36 +-
 .../cache/GridCacheDeploymentManager.java       |   10 +-
 .../processors/cache/GridCacheEntryEx.java      |    6 +
 .../processors/cache/GridCacheGateway.java      |    2 +-
 .../processors/cache/GridCacheIoManager.java    |   90 +-
 .../processors/cache/GridCacheMapEntry.java     |   69 +-
 .../processors/cache/GridCacheMessage.java      |   51 -
 .../processors/cache/GridCacheMvccManager.java  |   40 +-
 .../GridCachePartitionExchangeManager.java      |  174 +-
 .../processors/cache/GridCachePreloader.java    |    6 +-
 .../cache/GridCachePreloaderAdapter.java        |   11 +-
 .../processors/cache/GridCacheProcessor.java    |  334 +-
 .../processors/cache/GridCacheProxyImpl.java    |   36 +-
 .../cache/GridCacheSharedContext.java           |   61 +-
 .../processors/cache/GridCacheSwapManager.java  |  394 +-
 .../processors/cache/GridCacheTtlManager.java   |    9 +-
 .../processors/cache/GridCacheUtils.java        |  337 +-
 .../processors/cache/IgniteCacheFutureImpl.java |   42 +
 .../processors/cache/IgniteCacheProxy.java      |   84 +-
 .../processors/cache/IgniteInternalCache.java   |   43 +-
 .../processors/cache/KeyCacheObjectImpl.java    |   11 +-
 .../processors/cache/QueryCursorImpl.java       |   23 +-
 .../cache/affinity/GridCacheAffinityImpl.java   |   10 +-
 .../CacheDataStructuresManager.java             |    2 +-
 .../distributed/GridCacheTxRecoveryRequest.java |   26 +-
 .../GridCacheTxRecoveryResponse.java            |   14 +-
 .../distributed/GridDistributedBaseMessage.java |   77 +-
 .../distributed/GridDistributedCacheEntry.java  |    7 -
 .../distributed/GridDistributedLockRequest.java |   54 +-
 .../GridDistributedLockResponse.java            |   14 +-
 .../GridDistributedTxFinishRequest.java         |   57 +-
 .../distributed/GridDistributedTxMapping.java   |   17 +
 .../GridDistributedTxPrepareRequest.java        |   71 +-
 .../GridDistributedTxPrepareResponse.java       |   64 +-
 .../GridDistributedTxRemoteAdapter.java         |    3 +-
 .../GridDistributedUnlockRequest.java           |    6 +-
 .../dht/GridClientPartitionTopology.java        |   10 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |    4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   27 +-
 .../distributed/dht/GridDhtCacheEntry.java      |    6 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   11 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   66 +-
 .../distributed/dht/GridDhtLockFuture.java      |   12 +-
 .../distributed/dht/GridDhtLockRequest.java     |   72 +-
 .../distributed/dht/GridDhtLockResponse.java    |   18 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   42 +-
 .../dht/GridDhtPartitionsReservation.java       |  292 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |  224 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   41 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |    3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   11 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |    3 +-
 .../dht/GridDhtTxPrepareRequest.java            |   54 +-
 .../dht/GridDhtTxPrepareResponse.java           |   22 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |    5 +-
 .../distributed/dht/GridDhtUnlockRequest.java   |    6 +-
 .../dht/GridPartitionedGetFuture.java           |   13 +-
 .../cache/distributed/dht/GridReservable.java   |   35 +
 .../dht/atomic/GridDhtAtomicCache.java          |   64 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |   23 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  251 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  112 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   12 +-
 .../colocated/GridDhtColocatedLockFuture.java   |  213 +-
 .../dht/preloader/GridDhtForceKeysFuture.java   |   44 +-
 .../preloader/GridDhtPartitionDemandPool.java   |   26 +-
 .../dht/preloader/GridDhtPartitionMap.java      |   28 +-
 .../preloader/GridDhtPartitionSupplyPool.java   |   29 +-
 .../GridDhtPartitionsExchangeFuture.java        |  521 +-
 .../preloader/GridDhtPartitionsFullMessage.java |    4 +-
 .../GridDhtPartitionsSingleMessage.java         |   33 +-
 .../dht/preloader/GridDhtPreloader.java         |   41 +-
 .../preloader/GridDhtPreloaderAssignments.java  |    3 +-
 .../distributed/near/GridNearAtomicCache.java   |    5 +
 .../distributed/near/GridNearCacheAdapter.java  |    2 +-
 .../distributed/near/GridNearGetFuture.java     |    6 +-
 .../distributed/near/GridNearLockFuture.java    |  271 +-
 .../distributed/near/GridNearLockRequest.java   |   42 +-
 .../distributed/near/GridNearLockResponse.java  |   30 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |   83 +-
 .../GridNearPessimisticTxPrepareFuture.java     |    5 +-
 .../near/GridNearTransactionalCache.java        |    4 +-
 .../near/GridNearTxFinishRequest.java           |   29 +-
 .../cache/distributed/near/GridNearTxLocal.java |   46 +-
 .../near/GridNearTxPrepareRequest.java          |   38 +-
 .../near/GridNearTxPrepareResponse.java         |   74 +-
 .../distributed/near/GridNearTxRemote.java      |    5 +-
 .../distributed/near/GridNearUnlockRequest.java |    2 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |   17 +-
 .../cache/jta/CacheNoopJtaManager.java          |    2 +-
 .../processors/cache/local/GridLocalCache.java  |    6 +-
 .../local/atomic/GridLocalAtomicCache.java      |   31 +-
 .../processors/cache/query/CacheQuery.java      |    2 +-
 .../query/GridCacheDistributedQueryManager.java |    3 +
 .../cache/query/GridCacheQueryAdapter.java      |  200 +-
 .../cache/query/GridCacheQueryErrorFuture.java  |    2 +
 .../cache/query/GridCacheQueryManager.java      |  243 +-
 .../cache/query/GridCacheQueryRequest.java      |   47 +-
 .../cache/query/GridCacheTwoStepQuery.java      |   22 +-
 .../processors/cache/query/QueryCursorEx.java   |    8 +
 .../continuous/CacheContinuousQueryHandler.java |   12 +-
 .../continuous/CacheContinuousQueryManager.java |   28 +-
 .../cache/store/CacheOsStoreManager.java        |    1 -
 .../cache/store/CacheStoreManager.java          |    7 +-
 .../store/GridCacheStoreManagerAdapter.java     |  202 +-
 .../cache/transactions/IgniteInternalTx.java    |    8 +-
 .../cache/transactions/IgniteTxAdapter.java     |   59 +-
 .../cache/transactions/IgniteTxHandler.java     |  151 +-
 .../transactions/IgniteTxLocalAdapter.java      |  183 +-
 .../cache/transactions/IgniteTxManager.java     |    3 -
 .../cacheobject/IgniteCacheObjectProcessor.java |   14 +-
 .../IgniteCacheObjectProcessorImpl.java         |   14 +-
 .../processors/clock/GridClockServer.java       |   21 +-
 .../continuous/AbstractContinuousMessage.java   |   63 +
 .../continuous/GridContinuousMessageType.java   |   12 -
 .../continuous/GridContinuousProcessor.java     |  853 +--
 .../processors/continuous/StartRequestData.java |  267 +
 .../StartRoutineAckDiscoveryMessage.java        |   63 +
 .../StartRoutineDiscoveryMessage.java           |   85 +
 .../StopRoutineAckDiscoveryMessage.java         |   49 +
 .../continuous/StopRoutineDiscoveryMessage.java |   49 +
 .../datastreamer/DataStreamerCacheUpdaters.java |    2 +-
 .../datastreamer/DataStreamerImpl.java          |  102 +-
 .../datastructures/DataStructuresProcessor.java |  273 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   25 +-
 .../GridCacheAtomicSequenceImpl.java            |   11 +-
 .../GridCacheAtomicStampedImpl.java             |   21 +-
 .../GridCacheCountDownLatchImpl.java            |   31 +-
 .../datastructures/GridCacheSetImpl.java        |    4 +-
 .../dr/IgniteDrDataStreamerCacheUpdater.java    |    7 +-
 .../internal/processors/hadoop/HadoopJob.java   |    2 +-
 .../processors/hadoop/HadoopJobInfo.java        |    4 +-
 .../processors/hadoop/HadoopTaskContext.java    |   14 +-
 .../hadoop/counter/HadoopCounterWriter.java     |    5 +-
 .../internal/processors/igfs/IgfsContext.java   |    5 +-
 .../ignite/internal/processors/igfs/IgfsEx.java |    8 +-
 .../internal/processors/igfs/IgfsImpl.java      |    8 +-
 .../processors/igfs/IgfsIpcHandler.java         |  184 +-
 .../processors/igfs/IgfsMetaManager.java        |    2 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |    9 +-
 .../internal/processors/igfs/IgfsServer.java    |    4 +-
 .../internal/processors/igfs/IgfsUtils.java     |   16 +
 .../offheap/GridOffHeapProcessor.java           |   19 +-
 .../processors/plugin/CachePluginManager.java   |   10 +-
 .../plugin/IgnitePluginProcessor.java           |   19 +-
 .../portable/GridPortableInputStream.java       |   10 +
 .../processors/query/GridQueryIndexing.java     |   18 +-
 .../processors/query/GridQueryProcessor.java    |  405 +-
 .../messages/GridQueryNextPageResponse.java     |   35 +-
 .../h2/twostep/messages/GridQueryRequest.java   |  111 +-
 .../processors/rest/GridRestProcessor.java      |    4 +-
 .../rest/client/message/GridRouterRequest.java  |   18 +
 .../rest/client/message/GridRouterResponse.java |   18 +
 .../handlers/task/GridTaskCommandHandler.java   |   12 +-
 .../rest/protocols/tcp/GridTcpRestProtocol.java |    3 +-
 .../service/GridServiceProcessor.java           |  125 +-
 .../processors/task/GridTaskProcessor.java      |   23 +-
 .../processors/task/GridTaskWorker.java         |    4 +-
 .../timeout/GridSpiTimeoutObject.java           |   73 +
 .../timeout/GridTimeoutProcessor.java           |  105 +-
 .../IgniteTxRollbackCheckedException.java       |    9 +
 .../internal/util/GridConfigurationFinder.java  |   55 +-
 .../apache/ignite/internal/util/GridDebug.java  |   48 +-
 .../ignite/internal/util/GridJavaProcess.java   |   30 +-
 .../ignite/internal/util/IgniteUtils.java       |   40 +-
 .../internal/util/future/GridFutureAdapter.java |    4 +-
 .../internal/util/future/IgniteFutureImpl.java  |   18 +-
 .../shmem/IpcSharedMemoryClientEndpoint.java    |    2 +-
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  151 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |   12 +-
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |    4 +-
 .../util/nio/GridCommunicationClient.java       |   30 +-
 .../util/nio/GridNioDelimitedBuffer.java        |    2 +-
 .../util/nio/GridNioMessageTracker.java         |   23 +-
 .../util/nio/GridNioRecoveryDescriptor.java     |   13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   64 +-
 .../util/nio/GridShmemCommunicationClient.java  |  146 +
 .../util/nio/GridTcpCommunicationClient.java    |  554 --
 .../util/nio/GridTcpNioCommunicationClient.java |    8 -
 .../util/spring/IgniteSpringHelper.java         |   10 +
 .../apache/ignite/internal/visor/VisorJob.java  |    2 +
 .../internal/visor/VisorMultiNodeTask.java      |    2 +-
 .../ignite/internal/visor/cache/VisorCache.java |    2 +-
 .../visor/cache/VisorCacheConfiguration.java    |   11 -
 .../VisorCacheConfigurationCollectorJob.java    |    6 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   19 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |   10 +-
 .../cache/VisorCacheStoreConfiguration.java     |    5 +-
 .../internal/visor/log/VisorLogSearchTask.java  |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    4 +
 .../visor/node/VisorNodeDataCollectorTask.java  |    9 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |   17 +-
 .../node/VisorNodeSuppressedErrorsTask.java     |   12 +-
 .../visor/query/VisorQueryCleanupTask.java      |   14 +
 .../internal/visor/query/VisorQueryJob.java     |   13 +-
 .../internal/visor/query/VisorQueryTask.java    |    3 +-
 .../util/VisorClusterGroupEmptyException.java   |   37 +
 .../visor/util/VisorExceptionWrapper.java       |   81 +
 .../internal/visor/util/VisorTaskUtils.java     |    6 +-
 .../ignite/marshaller/MarshallerContext.java    |    8 +
 .../ignite/mxbean/CacheMetricsMXBean.java       |   80 +
 .../org/apache/ignite/plugin/PluginContext.java |    6 +
 .../apache/ignite/plugin/PluginProvider.java    |   26 +-
 .../plugin/extensions/communication/IoPool.java |   42 +
 .../SpringApplicationContextResource.java       |    4 +-
 .../apache/ignite/resources/SpringResource.java |    6 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  105 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |   66 +-
 .../ignite/spi/IgniteSpiTimeoutObject.java      |   44 +
 .../spi/checkpoint/noop/NoopCheckpointSpi.java  |    3 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  965 +--
 .../tcp/TcpCommunicationSpiMBean.java           |   29 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |   23 +-
 .../discovery/DiscoverySpiCustomMessage.java    |   40 +
 .../spi/discovery/DiscoverySpiListener.java     |    5 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 1722 ++++++
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 4896 +++++++++++++++
 .../discovery/tcp/TcpClientDiscoverySpi.java    | 1264 ----
 .../tcp/TcpClientDiscoverySpiMBean.java         |  164 -
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  279 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 5790 ++++--------------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 1160 ----
 .../spi/discovery/tcp/TcpDiscoverySpiMBean.java |    9 +
 .../tcp/internal/TcpDiscoveryNode.java          |   27 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |   10 +-
 .../tcp/internal/TcpDiscoveryStatistics.java    |   10 +-
 .../tcp/ipfinder/TcpDiscoveryIpFinder.java      |   10 +-
 .../ipfinder/TcpDiscoveryIpFinderAdapter.java   |   34 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  114 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |   34 +-
 .../TcpDiscoveryClientHeartbeatMessage.java     |   67 +
 .../messages/TcpDiscoveryClientPingRequest.java |   56 +
 .../TcpDiscoveryClientPingResponse.java         |   67 +
 .../TcpDiscoveryCustomEventMessage.java         |   41 +-
 .../messages/TcpDiscoveryHeartbeatMessage.java  |   28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |   43 +
 .../messages/TcpDiscoveryNodeAddedMessage.java  |    2 +-
 .../messages/TcpDiscoveryNodeFailedMessage.java |   18 +
 .../tcp/messages/TcpDiscoveryPingRequest.java   |    6 +
 .../tcp/messages/TcpDiscoveryPingResponse.java  |   15 +-
 .../RoundRobinGlobalLoadBalancer.java           |    2 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |    8 +-
 .../startup/cmdline/CommandLineStartup.java     |    3 +-
 .../startup/cmdline/CommandLineTransformer.java |    9 +
 .../java/org/jsr166/ConcurrentHashMap8.java     |    8 +-
 .../java/org/jsr166/ConcurrentLinkedDeque8.java |  586 +-
 .../src/main/java/org/jsr166/LongAdder8.java    |   35 +-
 .../core/src/main/java/org/jsr166/README.txt    |   11 +
 .../src/main/java/org/jsr166/Striped64_8.java   |   22 +-
 .../java/org/jsr166/ThreadLocalRandom8.java     |   19 +-
 .../src/main/java/org/jsr166/package-info.java  |   12 +-
 .../core/src/main/resources/ignite.properties   |    2 +-
 .../core/src/test/config/spark/spark-config.xml |   46 +
 modules/core/src/test/config/tests.properties   |    8 +-
 .../ignite/GridSuppressedExceptionSelfTest.java |    4 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  182 +
 ...cheStoreSessionListenerAbstractSelfTest.java |  314 +
 ...heStoreSessionListenerLifecycleSelfTest.java |  395 ++
 .../CacheJdbcStoreSessionListenerSelfTest.java  |  175 +
 .../internal/ClusterGroupAbstractTest.java      |  777 +++
 .../internal/ClusterGroupHostsSelfTest.java     |  141 +
 .../ignite/internal/ClusterGroupSelfTest.java   |  251 +
 .../ignite/internal/GridAffinitySelfTest.java   |    1 +
 .../internal/GridDiscoveryEventSelfTest.java    |   13 +-
 ...ridFailFastNodeFailureDetectionSelfTest.java |   22 +-
 .../GridFailoverTaskWithPredicateSelfTest.java  |    3 -
 .../GridJobMasterLeaveAwareSelfTest.java        |    2 -
 .../internal/GridJobStealingSelfTest.java       |    3 -
 .../internal/GridProjectionAbstractTest.java    |  768 ---
 .../GridProjectionForCachesSelfTest.java        |   11 +-
 ...ectionLocalJobMultipleArgumentsSelfTest.java |    2 -
 .../ignite/internal/GridProjectionSelfTest.java |  251 -
 .../internal/GridReleaseTypeSelfTest.java       |   77 +-
 .../apache/ignite/internal/GridSelfTest.java    |   30 +-
 .../GridTaskExecutionContextSelfTest.java       |    9 -
 .../GridTaskFailoverAffinityRunTest.java        |  170 +
 .../IgniteComputeEmptyClusterGroupTest.java     |    3 -
 .../IgniteComputeTopologyExceptionTest.java     |    9 -
 .../IgniteSlowClientDetectionSelfTest.java      |  187 +
 .../communication/GridIoManagerSelfTest.java    |    2 +-
 .../GridDiscoveryManagerAliveCacheSelfTest.java |   82 +-
 .../GridDiscoveryManagerAttributesSelfTest.java |  122 +-
 .../discovery/GridDiscoveryManagerSelfTest.java |   46 +-
 .../IgniteTopologyPrintFormatSelfTest.java      |  289 +
 .../GridAffinityProcessorAbstractSelfTest.java  |    1 +
 .../cache/CacheClientStoreSelfTest.java         |  228 +
 .../cache/CacheFutureExceptionSelfTest.java     |  158 +
 .../CacheReadThroughAtomicRestartSelfTest.java  |   32 +
 ...heReadThroughLocalAtomicRestartSelfTest.java |   32 +
 .../CacheReadThroughLocalRestartSelfTest.java   |   32 +
 ...dThroughReplicatedAtomicRestartSelfTest.java |   32 +
 ...cheReadThroughReplicatedRestartSelfTest.java |   32 +
 .../cache/CacheReadThroughRestartSelfTest.java  |  133 +
 .../cache/CacheRemoveAllSelfTest.java           |    2 +-
 .../CacheStoreUsageMultinodeAbstractTest.java   |  305 +
 ...eUsageMultinodeDynamicStartAbstractTest.java |  169 +
 ...oreUsageMultinodeDynamicStartAtomicTest.java |   32 +
 ...heStoreUsageMultinodeDynamicStartTxTest.java |   32 +
 ...reUsageMultinodeStaticStartAbstractTest.java |  158 +
 ...toreUsageMultinodeStaticStartAtomicTest.java |   32 +
 ...cheStoreUsageMultinodeStaticStartTxTest.java |   32 +
 .../GridCacheAbstractFailoverSelfTest.java      |   10 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  152 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   48 +-
 .../GridCacheAbstractRemoveFailureTest.java     |   23 +
 .../cache/GridCacheAbstractSelfTest.java        |    7 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |    4 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |    1 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |    8 +-
 ...idCacheConfigurationConsistencySelfTest.java |   14 +-
 .../cache/GridCacheDeploymentSelfTest.java      |    3 -
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   91 +-
 .../GridCacheExAbstractFullApiSelfTest.java     |  103 -
 .../cache/GridCacheMemoryModeSelfTest.java      |   25 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |    2 +-
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |    9 +
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |    2 +-
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |    2 +-
 .../processors/cache/GridCacheOffHeapTest.java  |   33 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |    1 +
 .../GridCacheReferenceCleanupSelfTest.java      |    3 -
 .../cache/GridCacheReloadSelfTest.java          |    6 +-
 .../GridCacheReturnValueTransferSelfTest.java   |    3 +
 .../processors/cache/GridCacheStopSelfTest.java |    5 +
 ...acheTcpClientDiscoveryMultiThreadedTest.java |  190 +
 .../processors/cache/GridCacheTestEntryEx.java  |    4 +
 .../GridCacheVariableTopologySelfTest.java      |   12 +-
 .../cache/GridCacheVersionMultinodeTest.java    |    6 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   36 +-
 .../cache/IgniteCacheAbstractTest.java          |    5 +-
 .../IgniteCacheAtomicStopBusySelfTest.java      |    8 +-
 .../IgniteCacheConfigurationTemplateTest.java   |   28 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |   14 +-
 .../IgniteCacheInterceptorSelfTestSuite.java    |    2 +-
 .../cache/IgniteCacheInvokeReadThroughTest.java |    5 +
 .../cache/IgniteCacheNearLockValueSelfTest.java |    3 +
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |   29 +-
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |   13 +-
 ...CacheP2pUnmarshallingRebalanceErrorTest.java |   15 +-
 .../IgniteCacheP2pUnmarshallingTxErrorTest.java |   25 +-
 .../IgniteCachePartitionMapUpdateTest.java      |  226 +
 .../cache/IgniteCachePeekModesAbstractTest.java |    5 +-
 ...gniteCacheTransactionalStopBusySelfTest.java |   13 +-
 .../IgniteDaemonNodeMarshallerCacheTest.java    |  192 +
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |  466 ++
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  134 +-
 ...niteDynamicCacheWithConfigStartSelfTest.java |   97 +
 .../IgniteDynamicClientCacheStartSelfTest.java  |  284 +
 .../cache/IgniteInternalCacheTypesTest.java     |    3 +-
 ...teStartCacheInTransactionAtomicSelfTest.java |   32 +
 .../IgniteStartCacheInTransactionSelfTest.java  |  254 +
 .../cache/IgniteSystemCacheOnClientTest.java    |   97 +
 .../IgniteTxMultiThreadedAbstractTest.java      |    4 +-
 ...cheAtomicReferenceMultiNodeAbstractTest.java |   11 -
 .../GridCacheQueueApiSelfAbstractTest.java      |    4 +-
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |    6 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |    5 +
 ...CacheQueueRotativeMultiNodeAbstractTest.java |   10 -
 .../GridCacheSetAbstractSelfTest.java           |   31 +-
 .../IgniteClientDataStructuresAbstractTest.java |  340 +
 .../IgniteClientDataStructuresTest.java         |   28 +
 ...IgniteClientDiscoveryDataStructuresTest.java |   28 +
 .../IgniteCountDownLatchAbstractSelfTest.java   |  114 +-
 .../IgniteDataStructureWithJobTest.java         |  111 +
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |    5 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |    5 +
 ...rtitionedDataStructuresFailoverSelfTest.java |    5 +
 ...edOffheapDataStructuresFailoverSelfTest.java |    5 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |    5 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |    5 +
 ...nedQueueFailoverDataConsistencySelfTest.java |    5 +
 ...eplicatedDataStructuresFailoverSelfTest.java |    5 +
 ...CacheLoadingConcurrentGridStartSelfTest.java |    5 +
 .../GridCacheAbstractJobExecutionTest.java      |    3 -
 .../GridCacheClientModesAbstractSelfTest.java   |   94 +-
 ...ientModesTcpClientDiscoveryAbstractTest.java |  168 +
 .../distributed/GridCacheMixedModeSelfTest.java |    3 +
 ...ridCachePartitionNotLoadedEventSelfTest.java |   82 +
 .../GridCachePreloadLifecycleAbstractTest.java  |    2 -
 .../distributed/IgniteCache150ClientsTest.java  |  189 +
 ...niteCacheClientNodeChangingTopologyTest.java | 1803 ++++++
 .../IgniteCacheClientNodeConcurrentStart.java   |  113 +
 ...teCacheClientNodePartitionsExchangeTest.java |  633 ++
 .../distributed/IgniteCacheManyClientsTest.java |  318 +
 .../IgniteCacheMessageRecoveryAbstractTest.java |    1 +
 .../IgniteCacheTxMessageRecoveryTest.java       |    5 +
 .../IgniteCrossCacheTxStoreSelfTest.java        |  147 +-
 ...heAbstractTransformWriteThroughSelfTest.java |    3 -
 .../dht/GridCacheClientOnlySelfTest.java        |   60 +-
 .../GridCacheColocatedTxExceptionSelfTest.java  |    5 +
 .../GridCacheDhtClientRemoveFailureTest.java    |   28 +
 ...GridCacheDhtEvictionNearReadersSelfTest.java |   11 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |   11 +-
 .../GridCacheExColocatedFullApiSelfTest.java    |   33 -
 ...ePartitionedNearDisabledMetricsSelfTest.java |    4 +-
 ...dCachePartitionedTopologyChangeSelfTest.java |    5 +
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |   53 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    |  147 +
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |   34 +
 ...gniteCachePutRetryTransactionalSelfTest.java |   74 +
 ...cClientInvalidPartitionHandlingSelfTest.java |   29 +
 .../GridCacheAtomicClientRemoveFailureTest.java |   28 +
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   28 +-
 ...unctionExcludeNeighborsAbstractSelfTest.java |    3 +-
 .../near/GridCacheAtomicNearOnlySelfTest.java   |   32 -
 .../near/GridCacheExNearFullApiSelfTest.java    |   39 -
 .../near/GridCacheNearEvictionSelfTest.java     |    3 -
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |    7 +-
 .../near/GridCacheNearOnlySelfTest.java         |   63 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |    1 +
 .../near/GridCacheNearTxExceptionSelfTest.java  |    5 +
 ...ionedClientOnlyNoPrimaryFullApiSelfTest.java |    5 +-
 .../GridCachePartitionedEvictionSelfTest.java   |   11 +-
 .../GridCachePartitionedFailoverSelfTest.java   |    5 +
 ...PartitionedFullApiMultithreadedSelfTest.java |    5 +
 .../GridCachePartitionedFullApiSelfTest.java    |   32 +
 ...idCachePartitionedHitsAndMissesSelfTest.java |    3 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |   53 +-
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    6 +-
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |    2 +-
 ...ePartitionedOptimisticTxNodeRestartTest.java |    5 +
 ...achePartitionedPreloadLifecycleSelfTest.java |    2 +-
 ...CachePartitionedTxMultiThreadedSelfTest.java |    5 +
 .../GridCachePartitionedTxSalvageSelfTest.java  |   37 +-
 ...idCacheRendezvousAffinityClientSelfTest.java |    4 +
 .../GridCacheExReplicatedFullApiSelfTest.java   |   33 -
 .../GridCacheReplicatedClientOnlySelfTest.java  |   43 -
 ...eReplicatedFullApiMultithreadedSelfTest.java |    5 +
 .../GridCacheReplicatedInvalidateSelfTest.java  |    4 +-
 ...ridCacheReplicatedMultiNodeLockSelfTest.java |    5 +
 .../GridCacheReplicatedMultiNodeSelfTest.java   |    5 +
 .../GridCacheReplicatedNearOnlySelfTest.java    |   43 -
 .../GridCacheReplicatedTxExceptionSelfTest.java |    5 +
 .../GridCacheSyncReplicatedPreloadSelfTest.java |    1 -
 .../replicated/GridReplicatedTxPreloadTest.java |    2 +
 ...acheAtomicReplicatedNodeRestartSelfTest.java |   15 +
 ...CacheReplicatedPreloadLifecycleSelfTest.java |    6 +-
 .../cache/eviction/EvictionAbstractTest.java    | 1056 ++++
 .../GridCacheBatchEvictUnswapSelfTest.java      |    5 +-
 ...heConcurrentEvictionConsistencySelfTest.java |   97 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |   29 +-
 .../GridCacheDistributedEvictionsSelfTest.java  |    5 +-
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   11 +-
 .../eviction/GridCacheEvictionAbstractTest.java |  484 --
 .../GridCacheEvictionFilterSelfTest.java        |    2 +-
 .../GridCacheEvictionTouchSelfTest.java         |   22 +-
 .../cache/eviction/GridCacheMockEntry.java      |    5 +
 ...cheSynchronousEvictionsFailoverSelfTest.java |    5 +
 .../fifo/FifoEvictionPolicySelfTest.java        |  262 +
 ...ridCacheFifoBatchEvictionPolicySelfTest.java |  384 --
 .../GridCacheFifoEvictionPolicySelfTest.java    |  372 --
 .../lru/GridCacheLruEvictionPolicySelfTest.java |  417 --
 .../GridCacheLruNearEvictionPolicySelfTest.java |  136 -
 ...heNearOnlyLruNearEvictionPolicySelfTest.java |  171 -
 .../eviction/lru/LruEvictionPolicySelfTest.java |  353 ++
 .../lru/LruNearEvictionPolicySelfTest.java      |  140 +
 .../LruNearOnlyNearEvictionPolicySelfTest.java  |  172 +
 .../GridCacheRandomEvictionPolicySelfTest.java  |  258 -
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |    6 +
 .../random/RandomEvictionPolicySelfTest.java    |  357 ++
 ...dCacheSortedBatchEvictionPolicySelfTest.java |  385 --
 ...acheSortedEvictionPolicyPerformanceTest.java |  135 -
 .../GridCacheSortedEvictionPolicySelfTest.java  |  373 --
 .../SortedEvictionPolicyPerformanceTest.java    |  134 +
 .../sorted/SortedEvictionPolicySelfTest.java    |  266 +
 .../IgniteCacheClientNearCacheExpiryTest.java   |  103 +
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   10 +-
 .../IgniteCacheExpiryPolicyTestSuite.java       |    2 +
 ...eCacheExpiryPolicyWithStoreAbstractTest.java |    4 +-
 .../IgniteCacheTxStoreSessionTest.java          |    4 +
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |  412 ++
 .../local/GridCacheExLocalFullApiSelfTest.java  |   30 -
 ...dCacheLocalFullApiMultithreadedSelfTest.java |    5 +
 .../GridCacheLocalTxExceptionSelfTest.java      |    5 +
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  115 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 ...CacheClientWriteBehindStoreAbstractTest.java |  104 +
 ...teCacheClientWriteBehindStoreAtomicTest.java |   38 +
 .../IgnteCacheClientWriteBehindStoreTxTest.java |   32 +
 .../closure/GridClosureProcessorSelfTest.java   |   29 +-
 .../continuous/GridEventConsumeSelfTest.java    |   98 +-
 .../DataStreamProcessorSelfTest.java            |   48 +-
 .../DataStreamerMultiThreadedSelfTest.java      |   62 +-
 .../DataStreamerMultinodeCreateCacheTest.java   |   97 +
 .../igfs/IgfsClientCacheSelfTest.java           |   12 +-
 .../processors/igfs/IgfsCommonAbstractTest.java |   10 -
 .../processors/igfs/IgfsModesSelfTest.java      |    4 +-
 .../processors/igfs/IgfsOneClientNodeTest.java  |    8 +-
 .../service/ClosureServiceClientsNodesTest.java |   16 +-
 .../service/GridServiceClientNodeTest.java      |   81 +
 .../internal/util/IgniteUtilsSelfTest.java      |   22 +
 .../ipc/shmem/IgfsSharedMemoryTestServer.java   |    2 +
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |    2 +-
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |    2 +-
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |    2 +-
 .../LoadWithCorruptedLibFileTestRunner.java     |    2 +-
 .../IpcSharedMemoryBenchmarkReader.java         |    2 +-
 .../IpcSharedMemoryBenchmarkWriter.java         |    2 +-
 .../nio/GridNioDelimitedBufferSelfTest.java     |  112 +
 .../util/nio/GridNioDelimitedBufferTest.java    |  112 -
 .../internal/util/nio/GridNioSelfTest.java      |   15 +-
 .../internal/util/nio/GridNioSslSelfTest.java   |    2 +
 .../unsafe/GridUnsafeMemorySelfTest.java        |    4 +-
 .../tostring/GridToStringBuilderSelfTest.java   |    4 +-
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    5 +-
 .../communication/GridIoManagerBenchmark0.java  |    1 +
 .../GridCachePartitionedAtomicLongLoadTest.java |    6 +-
 .../loadtests/hashmap/GridCacheTestContext.java |    6 +-
 .../swap/GridSwapEvictAllBenchmark.java         |    6 +-
 .../marshaller/MarshallerContextTestImpl.java   |   29 +-
 .../OptimizedMarshallerNodeFailoverTest.java    |    4 +-
 ...GridMessagingNoPeerClassLoadingSelfTest.java |    7 +-
 .../ignite/messaging/GridMessagingSelfTest.java |   16 +-
 .../IgniteMessagingWithClientTest.java          |  166 +
 .../p2p/GridP2PLocalDeploymentSelfTest.java     |    6 +-
 .../p2p/GridP2PRemoteClassLoadersSelfTest.java  |   31 +-
 .../spi/GridTcpSpiForwardingSelfTest.java       |    4 +-
 .../GridTcpCommunicationSpiAbstractTest.java    |   17 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java |    6 +-
 .../GridTcpCommunicationSpiConfigSelfTest.java  |    3 -
 ...cpCommunicationSpiMultithreadedSelfTest.java |   23 +-
 ...pCommunicationSpiMultithreadedShmemTest.java |   28 +
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |    1 +
 ...GridTcpCommunicationSpiRecoverySelfTest.java |    1 +
 .../GridTcpCommunicationSpiShmemSelfTest.java   |   38 +
 .../tcp/GridTcpCommunicationSpiTcpSelfTest.java |    7 +
 .../discovery/AbstractDiscoverySelfTest.java    |   21 +-
 ...pClientDiscoveryMarshallerCheckSelfTest.java |   76 +
 .../tcp/TcpClientDiscoverySelfTest.java         |  700 ---
 .../tcp/TcpClientDiscoverySpiMulticastTest.java |  129 +
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 1632 +++++
 .../tcp/TcpDiscoveryConcurrentStartTest.java    |   61 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |   56 +-
 .../TcpDiscoveryNodeConsistentIdSelfTest.java   |   80 +
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   46 +-
 .../inmemory/GridTestSwapSpaceSpi.java          |    3 +-
 .../stream/socket/SocketStreamerSelfTest.java   |   29 +-
 .../testframework/GridSpiTestContext.java       |   42 +-
 .../ignite/testframework/GridTestUtils.java     |   31 +-
 .../config/GridTestProperties.java              |   14 +-
 .../testframework/junits/GridAbstractTest.java  |   54 +-
 .../junits/GridTestKernalContext.java           |    3 +-
 .../junits/IgniteTestResources.java             |   16 +-
 .../junits/cache/TestCacheSession.java          |   18 +
 .../cache/TestThreadLocalCacheSession.java      |   15 +
 .../junits/common/GridCommonAbstractTest.java   |   98 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   35 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |   28 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |   17 +-
 .../IgniteCacheFailoverTestSuite.java           |   27 +-
 .../IgniteCacheFailoverTestSuite2.java          |   47 +
 .../IgniteCacheFullApiSelfTestSuite.java        |   14 +-
 .../IgniteCacheMetricsSelfTestSuite.java        |    1 +
 .../IgniteCacheNearOnlySelfTestSuite.java       |   16 +-
 ...gniteCacheP2pUnmarshallingErrorTestSuit.java |   41 -
 ...niteCacheP2pUnmarshallingErrorTestSuite.java |   53 +
 .../testsuites/IgniteCacheRestartTestSuite.java |   10 +-
 .../IgniteCacheTcpClientDiscoveryTestSuite.java |   47 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   54 +-
 .../testsuites/IgniteCacheTestSuite2.java       |   15 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |   35 +-
 .../IgniteCacheWriteBehindTestSuite.java        |    2 +
 .../testsuites/IgniteClientTestSuite.java       |   38 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    1 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |   24 +-
 .../IgniteMarshallerSelfTestSuite.java          |   28 +-
 .../IgniteSpiCommunicationSelfTestSuite.java    |    2 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |    9 +-
 .../testsuites/IgniteStreamSelfTestSuite.java   |   39 +
 .../testsuites/IgniteStreamTestSuite.java       |   39 -
 .../testsuites/IgniteUtilSelfTestSuite.java     |   20 +-
 .../apache/ignite/util/GridRandomSelfTest.java  |    4 +-
 .../ignite/util/TestTcpCommunicationSpi.java    |   21 +
 modules/core/src/test/resources/helloworld.gar  |  Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar |  Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |    6 -
 modules/docker/Dockerfile                       |   55 +
 modules/docker/README.txt                       |   11 +
 modules/docker/build_users_libs.sh              |   39 +
 modules/docker/download_ignite.sh               |   49 +
 modules/docker/execute.sh                       |   62 +
 modules/docker/run.sh                           |   34 +
 modules/extdata/p2p/pom.xml                     |    4 +-
 .../p2p/GridP2PContinuousDeploymentTask1.java   |    2 +-
 .../tests/p2p/P2PTestTaskExternalPath1.java     |   10 +-
 .../tests/p2p/P2PTestTaskExternalPath2.java     |    8 +-
 modules/extdata/uri/META-INF/ignite.xml         |   38 +
 .../extdata/uri/modules/uri-dependency/pom.xml  |   42 +
 .../deployment/uri/tasks/GarHelloWorldBean.java |   60 +
 .../src/main/resources/gar-example.properties   |   18 +
 modules/extdata/uri/pom.xml                     |   62 +-
 .../deployment/uri/tasks/GarHelloWorldTask.java |   81 +
 .../deployment/uri/tasks/gar-spring-bean.xml    |   29 +
 modules/gce/pom.xml                             |    2 +-
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |   43 +-
 modules/geospatial/pom.xml                      |    2 +-
 modules/hadoop/pom.xml                          |   81 +-
 .../fs/IgniteHadoopFileSystemCounterWriter.java |   21 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |  165 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  137 +-
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   32 +-
 .../processors/hadoop/HadoopClassLoader.java    |   29 +
 .../processors/hadoop/HadoopDefaultJobInfo.java |   27 +-
 .../internal/processors/hadoop/HadoopUtils.java |   51 +-
 .../hadoop/SecondaryFileSystemProvider.java     |   58 +-
 .../hadoop/fs/HadoopDistributedFileSystem.java  |   91 -
 .../hadoop/fs/HadoopFileSystemCacheUtils.java   |  241 +
 .../hadoop/fs/HadoopFileSystemsUtils.java       |   26 +-
 .../hadoop/fs/HadoopLazyConcurrentMap.java      |  209 +
 .../processors/hadoop/igfs/HadoopIgfsEx.java    |    6 +
 .../hadoop/igfs/HadoopIgfsInProc.java           |  170 +-
 .../processors/hadoop/igfs/HadoopIgfsIpcIo.java |    2 +-
 .../hadoop/igfs/HadoopIgfsOutProc.java          |   33 +-
 .../hadoop/igfs/HadoopIgfsWrapper.java          |   19 +-
 .../hadoop/jobtracker/HadoopJobTracker.java     |   25 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |   20 +-
 .../child/HadoopChildProcessRunner.java         |    3 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  111 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |   40 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |   85 +-
 .../hadoop/HadoopClientProtocolSelfTest.java    |    6 +-
 .../HadoopIgfs20FileSystemAbstractSelfTest.java |   73 +-
 ...oopSecondaryFileSystemConfigurationTest.java |   18 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    5 +-
 .../igfs/IgfsNearOnlyMultiNodeSelfTest.java     |    5 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |   65 +-
 .../IgniteHadoopFileSystemClientSelfTest.java   |    2 +-
 ...IgniteHadoopFileSystemHandshakeSelfTest.java |    7 +
 .../IgniteHadoopFileSystemIpcCacheSelfTest.java |    9 +
 .../hadoop/HadoopAbstractSelfTest.java          |   19 +-
 .../hadoop/HadoopCommandLineTest.java           |   14 +-
 .../hadoop/HadoopFileSystemsTest.java           |   23 +-
 .../processors/hadoop/HadoopMapReduceTest.java  |  185 +-
 .../hadoop/HadoopTaskExecutionSelfTest.java     |    2 +-
 .../hadoop/HadoopTasksAllVersionsTest.java      |   15 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |    8 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |    8 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |    8 +-
 .../collections/HadoopAbstractMapTest.java      |   15 +-
 .../collections/HadoopHashMapSelfTest.java      |    4 +-
 .../collections/HadoopSkipListSelfTest.java     |    4 +-
 .../HadoopExternalTaskExecutionSelfTest.java    |    2 +
 .../HadoopExternalCommunicationSelfTest.java    |    5 +
 .../testsuites/IgniteHadoopTestSuite.java       |    9 +-
 .../IgniteIgfsLinuxAndMacOSTestSuite.java       |    3 +-
 modules/hibernate/pom.xml                       |   16 +-
 .../HibernateTransactionalDataRegion.java       |   12 +-
 .../hibernate/CacheHibernateBlobStore.java      |   87 +-
 .../CacheHibernateBlobStoreFactory.java         |  235 +
 .../CacheHibernateStoreSessionListener.java     |  216 +
 .../hibernate/src/test/config/factory-cache.xml |   59 +
 .../src/test/config/factory-cache1.xml          |   61 +
 .../config/factory-incorrect-store-cache.xml    |   56 +
 .../hibernate/HibernateL2CacheSelfTest.java     |    2 +
 .../CacheHibernateStoreFactorySelfTest.java     |  273 +
 ...heHibernateStoreSessionListenerSelfTest.java |  228 +
 .../testsuites/IgniteHibernateTestSuite.java    |    8 +-
 modules/indexing/pom.xml                        |   18 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  125 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |    8 +-
 .../processors/query/h2/opt/GridH2Table.java    |    2 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   49 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |  321 +-
 .../query/h2/twostep/GridMergeIndex.java        |   17 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |    7 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  656 +-
 .../query/h2/twostep/GridResultPage.java        |   21 +-
 .../CacheAbstractQueryMetricsSelfTest.java      |  358 ++
 .../cache/CacheLocalQueryMetricsSelfTest.java   |   33 +
 ...titionedQueryMetricsDistributedSelfTest.java |   33 +
 ...chePartitionedQueryMetricsLocalSelfTest.java |   33 +
 ...plicatedQueryMetricsDistributedSelfTest.java |   33 +
 ...acheReplicatedQueryMetricsLocalSelfTest.java |   33 +
 ...CacheScanPartitionQueryFallbackSelfTest.java |  408 ++
 .../cache/GridCacheCrossCacheQuerySelfTest.java |   25 +-
 .../cache/GridCacheOffHeapSelfTest.java         |    1 -
 .../GridCacheOffheapIndexEntryEvictTest.java    |  200 +
 .../cache/GridCacheOffheapIndexGetSelfTest.java |   80 +-
 .../cache/GridCacheQueryMetricsSelfTest.java    |  152 -
 ...idCacheReduceQueryMultithreadedSelfTest.java |   10 -
 .../processors/cache/GridCacheSwapSelfTest.java |    3 -
 .../cache/GridIndexingWithNoopSwapSelfTest.java |    6 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   13 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   85 +-
 ...acheConfigurationPrimitiveTypesSelfTest.java |  104 +
 .../cache/IgniteCacheOffheapEvictQueryTest.java |  196 +
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |    3 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   40 +-
 ...QueryMultiThreadedOffHeapTieredSelfTest.java |   37 +
 ...eQueryMultiThreadedOffHeapTiredSelfTest.java |   37 -
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   17 +-
 ...lientQueryReplicatedNodeRestartSelfTest.java |  419 ++
 .../IgniteCacheQueryNodeRestartSelfTest.java    |   41 +-
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |  388 ++
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |    1 -
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |    6 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    4 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |    6 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    5 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   16 +-
 .../IgniteCacheWithIndexingTestSuite.java       |    3 +
 modules/jcl/pom.xml                             |    2 +-
 modules/jta/pom.xml                             |    2 +-
 .../apache/ignite/cache/jta/CacheTmLookup.java  |    3 +-
 .../processors/cache/jta/CacheJtaManager.java   |   72 +-
 .../cache/jta/GridCacheXAResource.java          |   34 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |   52 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |   29 +-
 modules/kafka/licenses/apache-2.0.txt           |  202 +
 modules/kafka/pom.xml                           |  105 +
 .../ignite/stream/kafka/KafkaStreamer.java      |  220 +
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |   37 +
 .../stream/kafka/KafkaEmbeddedBroker.java       |  378 ++
 .../kafka/KafkaIgniteStreamerSelfTest.java      |  227 +
 .../ignite/stream/kafka/SimplePartitioner.java  |   53 +
 modules/log4j/pom.xml                           |    2 +-
 modules/mesos/README.txt                        |    2 +-
 modules/mesos/pom.xml                           |   11 +-
 .../apache/ignite/mesos/ClusterProperties.java  |   15 +
 .../apache/ignite/mesos/IgniteScheduler.java    |   10 +-
 modules/rest-http/pom.xml                       |   16 +-
 modules/scalar-2.10/README.txt                  |    4 +
 modules/scalar-2.10/licenses/apache-2.0.txt     |  202 +
 .../scalar-2.10/licenses/scala-bsd-license.txt  |   18 +
 modules/scalar-2.10/pom.xml                     |  197 +
 modules/scalar/pom.xml                          |    2 +-
 modules/schedule/pom.xml                        |    2 +-
 modules/schema-import/pom.xml                   |    2 +-
 .../ignite/schema/model/PojoDescriptor.java     |    2 +
 .../apache/ignite/schema/model/PojoField.java   |    1 +
 .../parser/dialect/OracleMetadataDialect.java   |    2 +-
 modules/slf4j/pom.xml                           |    2 +-
 modules/spark-2.10/README.txt                   |    4 +
 modules/spark-2.10/licenses/apache-2.0.txt      |  202 +
 .../spark-2.10/licenses/scala-bsd-license.txt   |   18 +
 modules/spark-2.10/pom.xml                      |  120 +
 modules/spark/README.txt                        |    8 +
 modules/spark/licenses/apache-2.0.txt           |  202 +
 modules/spark/licenses/scala-bsd-license.txt    |   18 +
 modules/spark/pom.xml                           |  110 +
 .../org/apache/ignite/spark/IgniteContext.scala |  161 +
 .../org/apache/ignite/spark/IgniteRDD.scala     |  244 +
 .../apache/ignite/spark/JavaIgniteContext.scala |   63 +
 .../org/apache/ignite/spark/JavaIgniteRDD.scala |   99 +
 .../ignite/spark/impl/IgniteAbstractRDD.scala   |   39 +
 .../ignite/spark/impl/IgnitePartition.scala     |   24 +
 .../ignite/spark/impl/IgniteQueryIterator.scala |   27 +
 .../apache/ignite/spark/impl/IgniteSqlRDD.scala |   41 +
 .../spark/impl/JavaIgniteAbstractRDD.scala      |   34 +
 .../ignite/spark/JavaIgniteRDDSelfTest.java     |  298 +
 .../scala/org/apache/ignite/spark/Entity.scala  |   28 +
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  249 +
 modules/spring/pom.xml                          |   23 +-
 .../spring/CacheSpringStoreSessionListener.java |  207 +
 .../GridResourceSpringBeanInjector.java         |    2 +-
 .../util/spring/IgniteSpringHelperImpl.java     |   89 +-
 .../src/test/config/incorrect-store-cache.xml   |   57 +
 modules/spring/src/test/config/node.xml         |   43 +
 modules/spring/src/test/config/node1.xml        |   45 +
 .../test/config/pojo-incorrect-store-cache.xml  |   56 +
 modules/spring/src/test/config/store-cache.xml  |   59 +
 modules/spring/src/test/config/store-cache1.xml |   62 +
 .../jdbc/CacheJdbcBlobStoreFactorySelfTest.java |  172 +
 .../jdbc/CacheJdbcPojoStoreFactorySelfTest.java |  193 +
 ...CacheSpringStoreSessionListenerSelfTest.java |  197 +
 .../IgniteExcludeInConfigurationTest.java       |   81 +
 .../org/apache/ignite/spring/sprint-exclude.xml |   76 +
 .../testsuites/IgniteSpringTestSuite.java       |   10 +
 modules/ssh/pom.xml                             |    2 +-
 modules/tools/pom.xml                           |    2 +-
 .../ignite/tools/classgen/ClassesGenerator.java |   30 +-
 modules/urideploy/pom.xml                       |   10 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |   13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |    2 +-
 modules/visor-console-2.10/README.txt           |    4 +
 modules/visor-console-2.10/pom.xml              |  174 +
 modules/visor-console/pom.xml                   |    2 +-
 .../ignite/visor/commands/VisorConsole.scala    |    3 +-
 .../commands/cache/VisorCacheCommand.scala      |    9 +-
 .../commands/cache/VisorCacheScanCommand.scala  |    2 +-
 .../visor/commands/open/VisorOpenCommand.scala  |  319 +
 .../scala/org/apache/ignite/visor/visor.scala   |  230 +-
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |    2 +
 .../commands/kill/VisorKillCommandSpec.scala    |    1 +
 .../commands/start/VisorStartCommandSpec.scala  |    1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |    1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |    1 +
 modules/visor-plugins/pom.xml                   |    2 +-
 modules/web/pom.xml                             |    8 +-
 .../IgniteWebSessionSelfTestSuite.java          |    2 +-
 .../config/benchmark-put-indexed-val.properties |   64 +
 modules/yardstick/config/ignite-base-config.xml |   23 +
 modules/yardstick/pom.xml                       |    2 +-
 .../cache/IgnitePutIndexedValue1Benchmark.java  |   42 +
 .../cache/IgnitePutIndexedValue2Benchmark.java  |   42 +
 .../cache/IgnitePutIndexedValue8Benchmark.java  |   42 +
 .../ignite/yardstick/cache/model/Person1.java   |   55 +
 .../ignite/yardstick/cache/model/Person2.java   |   67 +
 .../ignite/yardstick/cache/model/Person8.java   |  109 +
 parent/pom.xml                                  |    6 +
 pom.xml                                         |   35 +-
 scripts/git-apply-patch.sh                      |    8 +-
 scripts/git-format-patch.sh                     |   16 +-
 scripts/git-patch-functions.sh                  |   36 +-
 scripts/git-patch-prop.sh                       |    2 +-
 925 files changed, 54443 insertions(+), 21554 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a2376cb/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 9cea078,b47d34b..6208084
--- a/pom.xml
+++ b/pom.xml
@@@ -70,7 -70,7 +70,8 @@@
          <module>modules/gce</module>
          <module>modules/cloud</module>
          <module>modules/mesos</module>
+         <module>modules/kafka</module>
 +        <module>modules/yarn</module>
      </modules>
  
      <profiles>


[10/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: bc282e28f302d2a4f50d88995b82defc8a4035d0
Parents: 8879c2a
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Thu Jun 11 11:53:18 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Thu Jun 11 11:53:18 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ClusterProperties.java   | 27 +++++++++++---------
 1 file changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc282e28/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 d021d45..d1a6390 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
@@ -32,15 +32,18 @@ public class ClusterProperties {
     /** */
     public static final String EMPTY_STRING = "";
 
-    /** Unlimited. */
-    public static final double UNLIMITED = Double.MAX_VALUE;
-
     /** */
     public static final String IGNITE_CLUSTER_NAME = "IGNITE_CLUSTER_NAME";
 
     /** */
     public static final String DEFAULT_CLUSTER_NAME = "ignite-cluster";
 
+    /** */
+    public static final double DEFAULT_CPU_PER_NODE = 2;
+
+    /** */
+    public static final double DEFAULT_MEM_PER_NODE = 2048;
+
     /** Cluster name. */
     private String clusterName = DEFAULT_CLUSTER_NAME;
 
@@ -48,19 +51,19 @@ public class ClusterProperties {
     public static final String IGNITE_RUN_CPU_PER_NODE = "IGNITE_RUN_CPU_PER_NODE";
 
     /** CPU limit. */
-    private double cpuPerNode = UNLIMITED;
+    private double cpuPerNode = DEFAULT_CPU_PER_NODE;
 
     /** */
     public static final String IGNITE_MEMORY_PER_NODE = "IGNITE_MEMORY_PER_NODE";
 
     /** Memory limit. */
-    private double memPerNode = UNLIMITED;
+    private double memPerNode = DEFAULT_MEM_PER_NODE;
 
     /** */
     public static final String IGNITE_NODE_COUNT = "IGNITE_NODE_COUNT";
 
     /** */
-    public static final int DEFAULT_IGNITE_NODE_COUNT = 3;
+    public static final double DEFAULT_IGNITE_NODE_COUNT = 3;
 
     /** Node count limit. */
     private double nodeCnt = DEFAULT_IGNITE_NODE_COUNT;
@@ -252,9 +255,9 @@ public class ClusterProperties {
 
             prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, props, DEFAULT_CLUSTER_NAME);
 
-            prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, 1.0);
-            prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, 2048.0);
-            prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, 2.0);
+            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.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
             prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
@@ -289,9 +292,9 @@ public class ClusterProperties {
 
         prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, null, DEFAULT_CLUSTER_NAME);
 
-        prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, null, 1.0);
-        prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, 2048.0);
-        prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, 2.0);
+        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.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
         prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, null, DEFAULT_IGNITE_WORK_DIR);


[42/50] [abbrv] incubator-ignite git commit: 1.3.1-SNAPSHOT

Posted by sb...@apache.org.
1.3.1-SNAPSHOT


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

Branch: refs/heads/ignite-901
Commit: cf78f231c9a4df28c4c6f46c06a34ce1d786e4d2
Parents: d1f5102
Author: Ignite Teamcity <ig...@apache.org>
Authored: Mon Jul 13 09:51:23 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Mon Jul 13 09:51:23 2015 +0300

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


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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/apache-license-gen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/pom.xml b/modules/apache-license-gen/pom.xml
index c96ca5a..6e22668 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <build>
         <plugins>

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

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 6c5af02..2c0dfda 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/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 830ca22..3a6aa6f 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.2.1-SNAPSHOT
+ignite.version=1.3.1-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 5de55f5..19c9a28 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/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 c92eb38..2ea01d9 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -16,9 +16,7 @@
   limitations under the License.
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.apache.ignite</groupId>
         <artifactId>ignite-parent</artifactId>
@@ -29,7 +27,7 @@
     <artifactId>ignite-extdata-uri-dep</artifactId>
     <packaging>jar</packaging>
 
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
     <modelVersion>4.0.0</modelVersion>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index c7b4067..984c744 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -20,8 +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>
     <packaging>pom</packaging>
 
@@ -33,7 +32,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -140,33 +139,28 @@
                                 <!-- copying resources to classes -->
                                 <copy todir="${basedir}/target/classes">
                                     <fileset dir="${basedir}/src/main/java">
-                                        <include name="**/*.xml"/>
-                                        <include name="**/*.properties"/>
+                                        <include name="**/*.xml" />
+                                        <include name="**/*.properties" />
                                     </fileset>
                                 </copy>
 
-                                <copy
-                                    file="${settings.localRepository}/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar"
-                                    todir="${basedir}/target/classes/lib"/>
+                                <copy file="${settings.localRepository}/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar" todir="${basedir}/target/classes/lib" />
 
                                 <zip destfile="${basedir}/target/classes/lib/depend.jar" encoding="UTF-8">
-                                    <zipfileset dir="modules/uri-dependency/target/classes"/>
+                                    <zipfileset dir="modules/uri-dependency/target/classes" />
                                 </zip>
 
-                                <taskdef name="gar"
-                                         classname="org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask"/>
+                                <taskdef name="gar" classname="org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask" />
 
-                                <gar destfile="${basedir}/target/deploy/uri.gar" basedir="${basedir}/target/classes"/>
+                                <gar destfile="${basedir}/target/deploy/uri.gar" basedir="${basedir}/target/classes" />
 
                                 <!--
                                 This is created for test GridTaskUriDeploymentDeadlockSelfTest.
                                 We put two files here to have a collision and make deployment SPI to unregister class loaders.
                                 This is intended to test GG-2852 issue.
                                 -->
-                                <gar destfile="${basedir}/target/resources/helloworld.gar"
-                                     descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes"/>
-                                <gar destfile="${basedir}/target/resources/helloworld1.gar"
-                                     descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes"/>
+                                <gar destfile="${basedir}/target/resources/helloworld.gar" descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes" />
+                                <gar destfile="${basedir}/target/resources/helloworld1.gar" descrdir="${basedir}/META-INF" basedir="${basedir}/target/classes" />
                             </target>
                         </configuration>
                     </execution>

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

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

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

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

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index c492100..9541bd4 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-kafka</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 328e5b8..15a6c0c 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-mesos</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <properties>
         <mesos.version>0.22.0</mesos.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 85be48e..cc6cbc7 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/scalar-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml
index b7c9178..2dcaba8 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 7f8fff4..e542bdb 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index 7463d52..2dedf6d 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index b896119..8c93df7 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/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 193e676..f37d4ed 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 87fa4f9..a2d25bc 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index 8a80009..4aca66b 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.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <!-- Ignite dependencies -->

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 8e62a11..45ae1f0 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index 1471ac7..8ac1aea 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yarn</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
 
     <properties>
         <hadoop.version>2.7.0</hadoop.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf78f231/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9988281..85bfe14 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>apache-ignite</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>


[34/50] [abbrv] incubator-ignite git commit: IGNITE-1097 Remove duplicated method. (cherry picked from commit 2074f70)

Posted by sb...@apache.org.
IGNITE-1097 Remove duplicated method.
(cherry picked from commit 2074f70)


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

Branch: refs/heads/ignite-901
Commit: 76515aeddd94be7048158c33e6f9a82d03257172
Parents: 2084175
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:27:54 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:58 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 40 +-------------------
 1 file changed, 1 insertion(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76515aed/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 00fc0f9..1acd49f 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
@@ -1277,45 +1277,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
-        try {
-            CacheOperationContext prev = onEnter(opCtx);
-
-            try {
-                if (isAsync()) {
-                    IgniteInternalFuture<EntryProcessorResult<T>> fut = delegate.invokeAsync(key, entryProcessor, args);
-
-                    IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
-                        @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
-                            throws IgniteCheckedException {
-
-                            try {
-                                EntryProcessorResult<T> res = fut.get();
-
-                                return res != null ? res.get() : null;
-                            }
-                            catch (RuntimeException e) {
-                                throw new GridClosureException(e);
-                            }
-                        }
-                    });
-
-                    setFuture(fut0);
-
-                    return null;
-                }
-                else {
-                    EntryProcessorResult<T> res = delegate.invoke(key, entryProcessor, args);
-
-                    return res != null ? res.get() : null;
-                }
-            }
-            finally {
-                onLeave(prev);
-            }
-        }
-        catch (IgniteCheckedException e) {
-            throw cacheException(e);
-        }
+        return invoke(key, (EntryProcessor<K, V, T>)entryProcessor, args);
     }
 
     /** {@inheritDoc} */


[19/50] [abbrv] incubator-ignite git commit: ignite-1067

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/jta/licenses/jta-cddl-license.txt
----------------------------------------------------------------------
diff --git a/modules/jta/licenses/jta-cddl-license.txt b/modules/jta/licenses/jta-cddl-license.txt
deleted file mode 100644
index 31f9d49..0000000
--- a/modules/jta/licenses/jta-cddl-license.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 (CDDL-1.0)
-
-1. Definitions.
-
-1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
-
-1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-
-1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-1.4. Executable means the Covered Software in any form other than Source Code.
-
-1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
-
-1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-
-1.7. License means this document.
-
-1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-1.9. Modifications means the Source Code and Executable form of any of the following:
-
-A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-
-B. Any new file that contains any part of the Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
-
-1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-
-1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-
-1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreem
 ent with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be
  construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/mesos/licenses/jetty-epl-license.txt
----------------------------------------------------------------------
diff --git a/modules/mesos/licenses/jetty-epl-license.txt b/modules/mesos/licenses/jetty-epl-license.txt
deleted file mode 100644
index f5f0c89..0000000
--- a/modules/mesos/licenses/jetty-epl-license.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Eclipse Public License, Version 1.0 (EPL-1.0)
-(plain text)
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the Program.
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/rest-http/licenses/jetty-epl-license.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/jetty-epl-license.txt b/modules/rest-http/licenses/jetty-epl-license.txt
deleted file mode 100644
index f5f0c89..0000000
--- a/modules/rest-http/licenses/jetty-epl-license.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Eclipse Public License, Version 1.0 (EPL-1.0)
-(plain text)
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the Program.
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt b/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
deleted file mode 100644
index 9c1c6de..0000000
--- a/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
+++ /dev/null
@@ -1,240 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)                                         Version 1.0
-
-
-1. Definitions.
-
-    1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications.
-
-    1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor
-    (if any), and the Modifications made by that particular Contributor.
-
-    1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination
-    of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-    1.4. “Executable” means the Covered Software in any form other than Source Code.
-
-    1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License.
-
-    1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms
-    of this License.
-
-    1.7. “License” means this document.
-
-    1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the
-    initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-    1.9. “Modifications” means the Source Code and Executable form of any of the following:
-        A. Any file that results from an addition to, deletion from or modification of the contents of a file
-        containing Original Software or previous Modifications;
-        B. Any new file that contains any part of the Original Software or previous Modification; or
-        C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-    1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally
-    released under this License.
-
-    1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation,
-    method, process, and apparatus claims, in any patent Licensable by grantor.
-
-    1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and
-    (b) associated documentation included in or with such code.
-
-    1.13. “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of
-    the terms of, this License. For legal entities, “You” includes any entity which controls, is controlled by, or is
-    under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect,
-    to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more
-    than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-    2.1. The Initial Developer Grant.
-    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
-    the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer,
-        to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made,
-        use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-
-        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first
-        distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-
-        (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from
-        the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software,
-        or (ii) the combination of the Original Software with other software or devices.
-
-    2.2. Contributor Grant.
-    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
-    each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use,
-        reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor
-        (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or
-        as part of a Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor
-        either alone and/or in combination with its Contributor Version (or portions of such combination), to make,
-        use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor
-        (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor
-        Version (or portions of such combination).
-
-        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes
-        or otherwise makes the Modifications available to a third party.
-
-        (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has
-        deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of
-        Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software
-        (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered
-        Software in the absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-    3.1. Availability of Source Code.
-    Any Covered Software that You distribute or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only under the terms of this License. You must
-    include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or
-    otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they
-    can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used
-    for software exchange.
-
-    3.2. Modifications.
-    The Modifications that You create or to which You contribute are governed by the terms of this License. You
-    represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to
-    grant the rights conveyed by this License.
-
-    3.3. Required Notices.
-    You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or
-    any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-    3.4. Application of Additional Terms.
-    You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the
-    applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a
-    fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software.
-    However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor.
-    You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered
-    by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability
-    incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability
-    terms You offer.
-
-    3.5. Distribution of Executable Versions.
-    You may distribute the Executable form of the Covered Software under the terms of this License or under the terms
-    of a license of Your choice, which may contain terms different from this License, provided that You are in compliance
-    with the terms of this License and that the license for the Executable form does not attempt to limit or alter
-    the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must make it absolutely clear that any terms
-    which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby
-    agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer
-    or such Contributor as a result of any such terms You offer.
-
-    3.6. Larger Works.
-    You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License
-    and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this
-    License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-    4.1. New Versions.
-    Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License
-    from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3,
-    no one other than the license steward has the right to modify this License.
-
-    4.2. Effect of New Versions.
-    You may always continue to use, distribute or otherwise make the Covered Software available under the terms of
-    the version of the License under which You originally received the Covered Software. If the Initial Developer
-    includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under
-    any subsequent version of the License, You must distribute and make the Covered Software available under the terms
-    of the version of the License under which You originally received the Covered Software. Otherwise, You may also
-    choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version
-    of the License published by the license steward.
-
-    4.3. Modified Versions.
-    When You are an Initial Developer and You want to create a new license for Your Original Software, You may create
-    and use a modified version of this License if You: (a) rename the license and remove any references to the name of
-    the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that
-    the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
-PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.
-SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
-NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms
-    herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their
-    nature, must remain in effect beyond the termination of this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer
-    or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as
-    “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant
-    is a Contributor or the Original Software where the Participant is the Initial Developer) directly or
-    indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant,
-    the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1
-    and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with
-    respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement
-    with Participant.
-
-    6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly
-    or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the
-    initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant
-    under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
-
-    6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted
-    by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor)
-    shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO
-ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
-LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY
-SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-“commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation”
-as such terms are used in 48 C.F.R. 12.212 Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of,
-and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed
-by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any,
-provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject
-to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the
-losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of
-the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that
-the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for
-compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of
-its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on
-an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-
---------
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-LICENSE (CDDL)
-
-The OpenSolaris code released under the CDDL shall be governed by the laws
-of the State of California (excluding conflict-of-law provisions). Any
-litigation relating to this License shall be subject to the jurisdiction of
-the Federal Courts of the Northern District of California and the state
-courts of the State of California, with venue lying in Santa Clara County,
-California.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 03cc5f5..3a44e22 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -567,6 +567,56 @@
 
     <profiles>
         <profile>
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <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>
+                                    <excludeGroupIds>org.apache</excludeGroupIds>
+                                </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>
+
+        <profile>
             <id>check-licenses</id>
             <build>
                 <plugins>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a6d1609..17532d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,7 @@
     </scm>
 
     <modules>
+        <module>modules/apache-license-gen</module>
         <module>modules/tools</module>
         <module>modules/core</module>
         <module>modules/hadoop</module>


[14/50] [abbrv] incubator-ignite git commit: ignite-1067

Posted by sb...@apache.org.
ignite-1067


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

Branch: refs/heads/ignite-901
Commit: 9b18b6452a8585cd7724ff709a66c3c669f88c4d
Parents: e91bc48
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 30 20:28:23 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 30 20:28:23 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                 | 256 +++++++++++++++++++++++++++
 assembly/LICENSE_HADOOP                 | 256 +++++++++++++++++++++++++++
 assembly/NOTICE_FABRIC                  |  13 ++
 assembly/NOTICE_HADOOP                  |  12 ++
 assembly/dependencies-visor-console.xml |  10 +-
 assembly/release-base.xml               |  10 --
 assembly/release-fabric.xml             |  12 ++
 assembly/release-hadoop.xml             |  12 ++
 parent/pom.xml                          |   2 +
 9 files changed, 572 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
new file mode 100644
index 0000000..164d7d3
--- /dev/null
+++ b/assembly/LICENSE_FABRIC
@@ -0,0 +1,256 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+
+
+==============================================================================
+Apache Ignite (incubating) Subcomponents:
+
+The Apache Ignite project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+
+==============================================================================
+For SnapTree:
+==============================================================================
+This product bundles SnapTree, which is available under a
+"3-clause BSD" license.  For details, see
+https://github.com/nbronson/snaptree/blob/master/LICENSE.
+
+==============================================================================
+For JSR 166 classes in "org.jsr166" package
+==============================================================================
+This product bundles JSR-166 classes which are donated to public domain.
+For details, see CC0 1.0 Universal (1.0), Public Domain Dedication,
+http://creativecommons.org/publicdomain/zero/1.0/
+
+==============================================================================
+For books used for tests in "org.apache.ignite.internal.processors.hadoop.books"
+==============================================================================
+This code bundles book text files used for testing purposes which contain
+the following header:
+
+This eBook is for the use of anyone anywhere at no cost and with
+almost no restrictions whatsoever.  You may copy it, give it away or
+re-use it under the terms of the Project Gutenberg License included
+with this eBook or online at www.gutenberg.org
+
+==============================================================================
+JCraft
+==============================================================================
+This product bundles JCraft, which is available under a BSD license.
+For details, see http://www.jcraft.com/jsch/LICENSE.txt.
+
+==============================================================================
+JLine
+==============================================================================
+This product bundles JLine, which is available under a "2-clause BSD" license.
+For details, see http://opensource.org/licenses/bsd-license.php.
+
+==============================================================================
+Scala
+==============================================================================
+This product bundles Scala, which is available under a BSD license.
+For details, see http://www.scala-lang.org/license.html.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/LICENSE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_HADOOP b/assembly/LICENSE_HADOOP
new file mode 100644
index 0000000..164d7d3
--- /dev/null
+++ b/assembly/LICENSE_HADOOP
@@ -0,0 +1,256 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+
+
+==============================================================================
+Apache Ignite (incubating) Subcomponents:
+
+The Apache Ignite project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+
+==============================================================================
+For SnapTree:
+==============================================================================
+This product bundles SnapTree, which is available under a
+"3-clause BSD" license.  For details, see
+https://github.com/nbronson/snaptree/blob/master/LICENSE.
+
+==============================================================================
+For JSR 166 classes in "org.jsr166" package
+==============================================================================
+This product bundles JSR-166 classes which are donated to public domain.
+For details, see CC0 1.0 Universal (1.0), Public Domain Dedication,
+http://creativecommons.org/publicdomain/zero/1.0/
+
+==============================================================================
+For books used for tests in "org.apache.ignite.internal.processors.hadoop.books"
+==============================================================================
+This code bundles book text files used for testing purposes which contain
+the following header:
+
+This eBook is for the use of anyone anywhere at no cost and with
+almost no restrictions whatsoever.  You may copy it, give it away or
+re-use it under the terms of the Project Gutenberg License included
+with this eBook or online at www.gutenberg.org
+
+==============================================================================
+JCraft
+==============================================================================
+This product bundles JCraft, which is available under a BSD license.
+For details, see http://www.jcraft.com/jsch/LICENSE.txt.
+
+==============================================================================
+JLine
+==============================================================================
+This product bundles JLine, which is available under a "2-clause BSD" license.
+For details, see http://opensource.org/licenses/bsd-license.php.
+
+==============================================================================
+Scala
+==============================================================================
+This product bundles Scala, which is available under a BSD license.
+For details, see http://www.scala-lang.org/license.html.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/NOTICE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/NOTICE_FABRIC b/assembly/NOTICE_FABRIC
new file mode 100644
index 0000000..1c6bd92
--- /dev/null
+++ b/assembly/NOTICE_FABRIC
@@ -0,0 +1,13 @@
+Apache Ignite (incubating)
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
+This software includes code from IntelliJ IDEA Community Edition
+Copyright (C) JetBrains s.r.o.
+https://www.jetbrains.com/idea/
+Licensed under Apache License, Version 2.0.
+http://search.maven.org/#artifactdetails%7Corg.jetbrains%7Cannotations%7C13.0%7Cjar
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/NOTICE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/NOTICE_HADOOP b/assembly/NOTICE_HADOOP
new file mode 100644
index 0000000..298d05b
--- /dev/null
+++ b/assembly/NOTICE_HADOOP
@@ -0,0 +1,12 @@
+Apache Ignite (incubating)
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
+This software includes code from IntelliJ IDEA Community Edition
+Copyright (C) JetBrains s.r.o.
+https://www.jetbrains.com/idea/
+Licensed under Apache License, Version 2.0.
+http://search.maven.org/#artifactdetails%7Corg.jetbrains%7Cannotations%7C13.0%7Cjar

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/dependencies-visor-console.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-visor-console.xml b/assembly/dependencies-visor-console.xml
index d773769..9312d39 100644
--- a/assembly/dependencies-visor-console.xml
+++ b/assembly/dependencies-visor-console.xml
@@ -39,7 +39,7 @@
                 <fileSets>
                     <fileSet>
                         <directory>${basedir}</directory>
-                        <outputDirectory>/visorcmd</outputDirectory>
+                        <outputDirectory>/</outputDirectory>
                         <includes>
                             <include>licenses/**</include>
                         </includes>
@@ -88,6 +88,14 @@
                 <includeModuleDirectory>false</includeModuleDirectory>
                 <fileSets>
                     <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/visor-common</outputDirectory>
                         <excludes>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/release-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index 21c4518..4137566 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -23,16 +23,6 @@
            http://maven.apache.org/xsd/component-1.1.2.xsd">
     <files>
         <file>
-            <source>LICENSE</source>
-            <outputDirectory>/</outputDirectory>
-        </file>
-
-        <file>
-            <source>NOTICE</source>
-            <outputDirectory>/</outputDirectory>
-        </file>
-
-        <file>
             <source>RELEASE_NOTES.txt</source>
             <outputDirectory>/</outputDirectory>
         </file>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/release-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric.xml b/assembly/release-fabric.xml
index cd5cbeb..a8c4541 100644
--- a/assembly/release-fabric.xml
+++ b/assembly/release-fabric.xml
@@ -35,6 +35,18 @@
 
     <files>
         <file>
+            <source>assembly/LICENSE_FABRIC</source>
+            <destName>LICENSE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
+            <source>assembly/NOTICE_FABRIC</source>
+            <destName>NOTICE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
             <source>examples/pom-standalone.xml</source>
             <outputDirectory>/examples</outputDirectory>
             <destName>pom.xml</destName>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/assembly/release-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
index 733ebe0..7b94144 100644
--- a/assembly/release-hadoop.xml
+++ b/assembly/release-hadoop.xml
@@ -35,6 +35,18 @@
 
     <files>
         <file>
+            <source>assembly/LICENSE_HADOOP</source>
+            <destName>LICENSE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
+            <source>assembly/NOTICE_HADOOP</source>
+            <destName>NOTICE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
             <source>modules/hadoop/config/core-site.ignite.xml</source>
             <outputDirectory>/config/hadoop</outputDirectory>
         </file>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b18b645/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index b167932..03cc5f5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -628,6 +628,8 @@
                                         <!--special excludes-->
                                         <exclude>idea/ignite_codeStyle.xml</exclude>
                                         <exclude>DEVNOTES.txt</exclude>
+                                        <exclude>**/NOTICE*</exclude>
+                                        <exclude>**/LICENSE*</exclude>
                                         <exclude>src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffHeapSnapTreeMap.java</exclude><!--BSD license-->
                                         <exclude>src/main/java/org/apache/ignite/internal/util/snaptree/*.java</exclude><!--BSD license-->
                                         <exclude>src/main/java/org/jsr166/*.java</exclude>


[41/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-1.3' and 'ignite-1076' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1.3

Posted by sb...@apache.org.
Merge branches 'ignite-1.3' and 'ignite-1076' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1.3


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

Branch: refs/heads/ignite-901
Commit: d1f5102fa6eeaa68d8cb0d262615511126135d31
Parents: 4da2ff2 297d250
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Sun Jul 12 15:01:48 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Sun Jul 12 15:01:48 2015 -0700

----------------------------------------------------------------------
 .../core/src/main/resources/META-INF/classnames-jdk.properties    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------



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

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


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

Branch: refs/heads/ignite-901
Commit: ea3525ea6c06f3b3b876ed78febded4fda2e5134
Parents: d268375 b437ec7
Author: Anton <av...@gridgain.com>
Authored: Thu Jul 2 13:39:14 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Thu Jul 2 13:39:14 2015 +0300

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



[23/50] [abbrv] incubator-ignite git commit: minor fix

Posted by sb...@apache.org.
minor fix


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

Branch: refs/heads/ignite-901
Commit: 62835dddc4122e2cd8d3c42b7cbe19d3a701abf0
Parents: a1e7d11
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Tue Jul 7 20:22:13 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Tue Jul 7 20:22:13 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         | 74 --------------------
 assembly/LICENSE_HADOOP                         | 32 ---------
 .../src/main/resources/META-INF/licenses.txt.vm | 10 ++-
 3 files changed, 7 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/62835ddd/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
index 3fbc5fb..7649b39 100644
--- a/assembly/LICENSE_FABRIC
+++ b/assembly/LICENSE_FABRIC
@@ -236,77 +236,3 @@ This eBook is for the use of anyone anywhere at no cost and with
 almost no restrictions whatsoever.  You may copy it, give it away or
 re-use it under the terms of the Project Gutenberg License included
 with this eBook or online at www.gutenberg.org
-
-==============================================================================
-JCraft
-==============================================================================
-This product bundles JCraft, which is available under a BSD license.
-For details, see http://www.jcraft.com/jsch/LICENSE.txt.
-
-==============================================================================
-JLine
-==============================================================================
-This product bundles JLine, which is available under a "2-clause BSD" license.
-For details, see http://opensource.org/licenses/bsd-license.php.
-
-==============================================================================
-Scala
-==============================================================================
-This product bundles Scala, which is available under a BSD license.
-For details, see http://www.scala-lang.org/license.html.
-
-==============================================================================
-JCache-API (JSR-107)
-==============================================================================
-This product bundles JCache-API, which is available under a JSR-000107 JCACHE 2.9 Public Review - Updated Specification
-License.
-For details, see https://raw.githubusercontent.com/jsr107/jsr107spec/master/LICENSE.txt.
-
-==============================================================================
-H2
-==============================================================================
-This product bundles H2, which is available under the MPL 2.0 (Mozilla Public License Version 2.0)
-or under the EPL 1.0 (Eclipse Public License).
-For details, see https://www.mozilla.org/MPL/2.0/ and http://opensource.org/licenses/eclipse-1.0.php
-
-==============================================================================
-AOP Alliance
-==============================================================================
-All the source code provided by AOP Alliance is Public Domain.
-
-==============================================================================
-AspectJ
-==============================================================================
-This product bundles AspectJ, which is available under a Eclipse Public License 1.0.
-For details, see https://eclipse.org/legal/epl-v10.html.
-
-==============================================================================
-Java Transaction API
-==============================================================================
-This product bundles Java Transaction API, which is available under a CDDL license.
-For details, see http://opensource.org/licenses/cddl1.php.
-
-==============================================================================
-Jetty
-==============================================================================
-This product bundles Jetty, which is available under a Apache License 2.0 and Eclipse Public License 1.0.
-For details, see https://www.eclipse.org/legal/epl-v10.html.
-
-==============================================================================
-SLF4J
-==============================================================================
-This product bundles SLF4J, which is available under MIT license.
-For details, see http://www.slf4j.org/license.html.
-
-==============================================================================
-JTidy
-==============================================================================
-This product bundles JTidy, which is available under MIT license.
-For details, see http://jtidy.sourceforge.net/license.html.
-
-==============================================================================
-Tomcat Servlet API
-==============================================================================
-This product bundles Tomcat Servlet API, which is available under Apache License, Version 2.0 and
-Common Development And Distribution License (CDDL) Version 1.0.
-For details, see http://www.opensource.org/licenses/cddl1.txt.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/62835ddd/assembly/LICENSE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_HADOOP b/assembly/LICENSE_HADOOP
index 09189f8..7649b39 100644
--- a/assembly/LICENSE_HADOOP
+++ b/assembly/LICENSE_HADOOP
@@ -236,35 +236,3 @@ This eBook is for the use of anyone anywhere at no cost and with
 almost no restrictions whatsoever.  You may copy it, give it away or
 re-use it under the terms of the Project Gutenberg License included
 with this eBook or online at www.gutenberg.org
-
-==============================================================================
-JCraft
-==============================================================================
-This product bundles JCraft, which is available under a BSD license.
-For details, see http://www.jcraft.com/jsch/LICENSE.txt.
-
-==============================================================================
-JLine
-==============================================================================
-This product bundles JLine, which is available under a "2-clause BSD" license.
-For details, see http://opensource.org/licenses/bsd-license.php.
-
-==============================================================================
-Scala
-==============================================================================
-This product bundles Scala, which is available under a BSD license.
-For details, see http://www.scala-lang.org/license.html.
-
-==============================================================================
-JCache-API (JSR-107)
-==============================================================================
-This product bundles JCache-API, which is available under a JSR-000107 JCACHE 2.9 Public Review - Updated Specification
-License.
-For details, see https://raw.githubusercontent.com/jsr107/jsr107spec/master/LICENSE.txt.
-
-==============================================================================
-ASM
-==============================================================================
-This product bundles ASM, which is available under a BSD license.
-For details, see http://asm.ow2.org/license.html.
-

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/62835ddd/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
index 32c6c09..cb756c1 100644
--- a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
+++ b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
@@ -20,14 +20,18 @@
 ##
 // ------------------------------------------------------------------
 // List of #if ($projectName)$projectName#else${project.name}#end module's dependencies provided as a part of this distribution
-// with licenses differ from Apache Software License.
+// which licenses differ from Apache Software License.
 // ------------------------------------------------------------------
+
 #foreach ( $organizationName in $projectsSortedByOrganization.keySet() )
 #foreach ( $project in $projectsSortedByOrganization.get( $organizationName ) )
 #if($project.licenses.size() == 1 && $project.licenses.get(0).url.contains("www.apache.org/licenses/LICENSE-2.0") && !$project.licenses.get(0).url.contains("and"))#else
-  - $project.name #if ($project.url)($project.url)#end $project.artifact
+==============================================================================
+For $project.name #if ($project.url)($project.url)#end $project.artifact
+==============================================================================
+This product bundles $project.name which is available under a:
 #foreach ( $license in $project.licenses )
-    License: $license.name #if ($license.url) ($license.url)#end
+$license.name.replaceAll("[ ]{2,}"," ").replaceAll("\n",""). #if ($license.url)For details, see $license.url.replaceAll("[ ]{2,}"," ").replaceAll("\n","").#end
 
 #end
 #if ($project.licenses.size() == 0)    No licenses.#end


[06/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup. Added tests.

Posted by sb...@apache.org.
#YARN Code cleanup. Added tests.


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

Branch: refs/heads/ignite-901
Commit: 960e19dda15d58ddc403a8e6856d0eb19d7794c1
Parents: 858d2a3
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Tue Jun 9 16:38:07 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Tue Jun 9 16:38:07 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   |  89 +++--
 .../apache/ignite/yarn/ClusterProperties.java   |  53 +--
 .../apache/ignite/yarn/IgniteYarnClient.java    |  30 +-
 .../org/apache/ignite/IgniteMesosTestSuite.java |  38 ---
 .../org/apache/ignite/IgniteYarnTestSuite.java  |  38 +++
 .../yarn/IgniteApplicationMasterSelfTest.java   | 324 +++++++++++++++++++
 .../ignite/yarn/IgniteSchedulerSelfTest.java    |  29 --
 7 files changed, 460 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/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 3bf0521..c552ea0 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
@@ -47,27 +47,30 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     public static final String DELIM = ",";
 
     /** */
+    private long schedulerTimeout = TimeUnit.SECONDS.toMillis(1);
+
+    /** Yarn configuration. */
     private YarnConfiguration conf;
 
-    /** */
+    /** Cluster properties. */
     private ClusterProperties props;
 
-    /** */
+    /** Network manager. */
     private NMClient nmClient;
 
-    /** */
-    AMRMClientAsync<AMRMClient.ContainerRequest> rmClient;
+    /** Resource manager. */
+    private AMRMClientAsync<AMRMClient.ContainerRequest> rmClient;
 
-    /** */
+    /** Ignite path. */
     private Path ignitePath;
 
-    /** */
+    /** Config path. */
     private Path cfgPath;
 
-    /** */
+    /** Hadoop file system. */
     private FileSystem fs;
 
-    /** */
+    /** Running containers. */
     private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
@@ -76,13 +79,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
         this.conf = new YarnConfiguration();
         this.props = props;
-        this.fs = FileSystem.get(conf);
         this.ignitePath = new Path(ignitePath);
-
-        nmClient = NMClient.createNMClient();
-
-        nmClient.init(conf);
-        nmClient.start();
     }
 
     /** {@inheritDoc} */
@@ -103,11 +100,16 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                     resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
                     resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
 
+                    if (props.userLibs() != null)
+                        resources.put("libs", IgniteYarnUtils.setupFile(new Path(props.userLibs()), fs,
+                            LocalResourceType.FILE));
+
                     ctx.setLocalResources(resources);
 
                     ctx.setCommands(
                         Collections.singletonList(
-                            "./ignite/*/bin/ignite.sh "
+                            "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"
@@ -153,7 +155,9 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         // Check that slave satisfies min requirements.
         if (cont.getResource().getVirtualCores() < props.cpusPerNode()
             || cont.getResource().getMemory() < props.memoryPerNode()) {
-            //log.log(Level.FINE, "Offer not sufficient for slave request: {0}", offer.getResourcesList());
+            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()});
 
             return false;
         }
@@ -185,7 +189,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         for (ContainerStatus status : statuses) {
             containers.remove(status.getContainerId());
 
-            //log.log(Level.FINE, "Offer not sufficient for slave request: {0}", offer.getResourcesList());
+            log.log(Level.INFO, "Container stopped. Container id: {0}. State: {1}.",
+                new Object[]{status.getContainerId(), status.getState()});
         }
     }
 
@@ -243,9 +248,6 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
      * @throws Exception If failed.
      */
     public void run() throws Exception {
-        rmClient.init(conf);
-        rmClient.start();
-
         // Register with ResourceManager
         rmClient.registerApplicationMaster("", 0, "");
 
@@ -260,7 +262,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
             while (!nmClient.isInState(Service.STATE.STOPPED)) {
                 int runningCnt = containers.size();
 
-                if (runningCnt < props.instances() && checkAvailableResource(rmClient.getAvailableResources())) {
+                if (runningCnt < props.instances() && checkAvailableResource()) {
                     // Resource requirements for worker containers.
                     Resource capability = Records.newRecord(Resource.class);
 
@@ -279,7 +281,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                     }
                 }
 
-                TimeUnit.SECONDS.sleep(5);
+                TimeUnit.MILLISECONDS.sleep(schedulerTimeout);
             }
         }
         catch (Exception e) {
@@ -294,10 +296,11 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     }
 
     /**
-     * @param availableRes Available resources.
      * @return {@code True} if cluster contains available resources.
      */
-    private boolean checkAvailableResource(Resource availableRes) {
+    private boolean checkAvailableResource() {
+        Resource availableRes = rmClient.getAvailableResources();
+
         return availableRes == null || availableRes.getMemory() >= props.memoryPerNode()
             && availableRes.getVirtualCores() >= props.cpusPerNode();
     }
@@ -306,10 +309,17 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
      * @throws IOException
      */
     public void init() throws IOException {
+        fs = FileSystem.get(conf);
+
+        nmClient = NMClient.createNMClient();
+
+        nmClient.init(conf);
+        nmClient.start();
+
         // Create async application master.
         rmClient = AMRMClientAsync.createAMRMClientAsync(300, this);
 
-        if (props.igniteConfigUrl() == null || props.igniteConfigUrl().isEmpty()) {
+        if (props.igniteCfg() == null || props.igniteCfg().isEmpty()) {
             InputStream input = Thread.currentThread().getContextClassLoader()
                 .getResourceAsStream(IgniteYarnUtils.DEFAULT_IGNITE_CONFIG);
 
@@ -325,6 +335,33 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
             IOUtils.closeQuietly(outputStream);
         }
         else
-            cfgPath = new Path(props.igniteConfigUrl());
+            cfgPath = new Path(props.igniteCfg());
+    }
+
+    /**
+     * Sets NMClient.
+     *
+     * @param nmClient NMClient.
+     */
+    public void setNmClient(NMClient nmClient) {
+        this.nmClient = nmClient;
+    }
+
+    /**
+     * Sets RMClient
+     *
+     * @param rmClient AMRMClientAsync.
+     */
+    public void setRmClient(AMRMClientAsync<AMRMClient.ContainerRequest> rmClient) {
+        this.rmClient = rmClient;
+    }
+
+    /**
+     * Sets scheduler timeout.
+     *
+     * @param schedulerTimeout Scheduler timeout.
+     */
+    public void setSchedulerTimeout(long schedulerTimeout) {
+        this.schedulerTimeout = schedulerTimeout;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/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 f9fdb59..d021d45 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
@@ -59,8 +59,11 @@ public class ClusterProperties {
     /** */
     public static final String IGNITE_NODE_COUNT = "IGNITE_NODE_COUNT";
 
+    /** */
+    public static final int DEFAULT_IGNITE_NODE_COUNT = 3;
+
     /** Node count limit. */
-    private double nodeCnt = 3;
+    private double nodeCnt = DEFAULT_IGNITE_NODE_COUNT;
 
     /** */
     public static final String IGNITE_VERSION = "IGNITE_VERSION";
@@ -105,24 +108,12 @@ public class ClusterProperties {
     private String userLibs = null;
 
     /** */
-    public static final String IGNITE_USERS_LIBS_URL = "IGNITE_USERS_LIBS_URL";
-
-    /** URL to users libs. */
-    private String userLibsUrl = null;
-
-    /** */
     public static final String IGNITE_CONFIG_XML = "IGNITE_XML_CONFIG";
 
     /** Ignite config. */
     private String igniteCfg = null;
 
     /** */
-    public static final String IGNITE_CONFIG_XML_URL = "IGNITE_CONFIG_XML_URL";
-
-    /** Url to ignite config. */
-    private String igniteCfgUrl = null;
-
-    /** */
     public static final String IGNITE_HOSTNAME_CONSTRAINT = "IGNITE_HOSTNAME_CONSTRAINT";
 
     /** Url to ignite config. */
@@ -179,6 +170,13 @@ public class ClusterProperties {
     }
 
     /**
+     * Sets instance count limit.
+     */
+    public void instances(int nodeCnt) {
+        this.nodeCnt = nodeCnt;
+    }
+
+    /**
      * Sets hostname constraint.
      *
      * @param pattern Hostname pattern.
@@ -230,20 +228,6 @@ public class ClusterProperties {
     }
 
     /**
-     * @return Url to ignite configuration.
-     */
-    public String igniteConfigUrl() {
-        return igniteCfgUrl;
-    }
-
-    /**
-     * @return Url to users libs configuration.
-     */
-    public String usersLibsUrl() {
-        return userLibsUrl;
-    }
-
-    /**
      * @return Host name constraint.
      */
     public Pattern hostnameConstraint() {
@@ -268,15 +252,14 @@ public class ClusterProperties {
 
             prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, props, DEFAULT_CLUSTER_NAME);
 
-            prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null);
-            prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null);
-
             prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, 1.0);
             prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, 2048.0);
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, 2.0);
 
             prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
             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);
 
@@ -306,15 +289,14 @@ public class ClusterProperties {
 
         prop.clusterName = getStringProperty(IGNITE_CLUSTER_NAME, null, DEFAULT_CLUSTER_NAME);
 
-        prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, null, null);
-        prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, null, null);
-
         prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, null, 1.0);
         prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, 2048.0);
         prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, 2.0);
 
         prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
         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);
 
@@ -342,15 +324,14 @@ public class ClusterProperties {
 
         envs.put(IGNITE_CLUSTER_NAME, toEnvVal(clusterName));
 
-        envs.put(IGNITE_USERS_LIBS_URL, toEnvVal(userLibsUrl));
-        envs.put(IGNITE_CONFIG_XML_URL, toEnvVal(igniteCfgUrl));
-
         envs.put(IGNITE_RUN_CPU_PER_NODE, toEnvVal(cpuPerNode));
         envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
         envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
         envs.put(IGNITE_WORKING_DIR, toEnvVal(igniteWorkDir));
+        envs.put(IGNITE_LOCAL_WORK_DIR, toEnvVal(igniteLocalWorkDir));
+        envs.put(IGNITE_RELEASES_DIR, toEnvVal(igniteReleasesDir));
         envs.put(IGNITE_CONFIG_XML, toEnvVal(igniteCfg));
         envs.put(IGNITE_USERS_LIBS, toEnvVal(userLibs));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index f74890d..764e717 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -39,9 +39,9 @@ public class IgniteYarnClient {
     public static final Logger log = Logger.getLogger(IgniteYarnClient.class.getSimpleName());
 
     /**
-     * Main methods has only one optional parameter - path to properties file.
+     * Main methods has one mandatory parameter and one optional parameter.
      *
-     * @param args Args.
+     * @param args Path to jar mandatory parameter and property file is optional.
      */
     public static void main(String[] args) throws Exception {
         checkArguments(args);
@@ -107,24 +107,27 @@ public class IgniteYarnClient {
 
         yarnClient.submitApplication(appContext);
 
-        log.log(Level.INFO, "Submitted application. Application id: [{0}]", appId);
+        log.log(Level.INFO, "Submitted application. Application id: {0}", appId);
 
         ApplicationReport appReport = yarnClient.getApplicationReport(appId);
         YarnApplicationState appState = appReport.getYarnApplicationState();
 
-        while (appState != YarnApplicationState.FINISHED &&
-                appState != YarnApplicationState.KILLED &&
-                appState != YarnApplicationState.FAILED) {
+        while (appState == YarnApplicationState.NEW ||
+            appState == YarnApplicationState.NEW_SAVING ||
+            appState == YarnApplicationState.SUBMITTED ||
+            appState == YarnApplicationState.ACCEPTED) {
             TimeUnit.SECONDS.sleep(1L);
 
             appReport = yarnClient.getApplicationReport(appId);
 
+            if (appState != YarnApplicationState.ACCEPTED
+                && appReport.getYarnApplicationState() == YarnApplicationState.ACCEPTED)
+                log.log(Level.INFO, "Application {0} is ACCEPTED.", appId);
+
             appState = appReport.getYarnApplicationState();
         }
 
-        yarnClient.killApplication(appId);
-
-        log.log(Level.INFO, "Application [{0}] finished with state [{1}]", new Object[]{appId, appState});
+        log.log(Level.INFO, "Application {0} is {1}.", new Object[]{appId, appState});
     }
 
     /**
@@ -134,7 +137,7 @@ public class IgniteYarnClient {
      */
     private static void checkArguments(String[] args) {
         if (args.length < 1)
-            throw new IllegalArgumentException();
+            throw new IllegalArgumentException("Invalid arguments.");
     }
 
     /**
@@ -146,11 +149,14 @@ public class IgniteYarnClient {
     private static Path getIgnite(ClusterProperties props, FileSystem fileSystem) throws Exception {
         IgniteProvider provider = new IgniteProvider(props, fileSystem);
 
-        return provider.getIgnite();
+        if (props.igniteVer() == null
+            || props.igniteVer().equalsIgnoreCase(ClusterProperties.DEFAULT_IGNITE_VERSION))
+            return provider.getIgnite();
+        else
+            return provider.getIgnite(props.igniteVer());
     }
 
     /**
-     *
      * @param envs Environment variables.
      * @param conf Yarn configuration.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/modules/yarn/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java b/modules/yarn/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java
deleted file mode 100644
index e6920b3..0000000
--- a/modules/yarn/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java
+++ /dev/null
@@ -1,38 +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;
-
-import junit.framework.*;
-import org.apache.ignite.yarn.*;
-
-/**
- * Apache Mesos integration tests.
- */
-public class IgniteMesosTestSuite extends TestSuite {
-    /**
-     * @return Test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Apache Mesos Integration Test Suite");
-
-        suite.addTest(new TestSuite(IgniteSchedulerSelfTest.class));
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java
new file mode 100644
index 0000000..aa31774
--- /dev/null
+++ b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.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;
+
+import junit.framework.*;
+import org.apache.ignite.yarn.*;
+
+/**
+ * Apache Hadoop Yarn integration tests.
+ */
+public class IgniteYarnTestSuite extends TestSuite {
+    /**
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        TestSuite suite = new TestSuite("Apache Yarn Integration Test Suite");
+
+        suite.addTest(new TestSuite(IgniteApplicationMasterSelfTest.class));
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/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
new file mode 100644
index 0000000..d865659
--- /dev/null
+++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
@@ -0,0 +1,324 @@
+/*
+ * 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.yarn;
+
+import junit.framework.*;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.hadoop.util.ThreadUtil;
+import org.apache.hadoop.yarn.api.protocolrecords.*;
+import org.apache.hadoop.yarn.api.records.*;
+import org.apache.hadoop.yarn.client.api.*;
+import org.apache.hadoop.yarn.client.api.async.*;
+import org.apache.hadoop.yarn.exceptions.*;
+
+import java.io.*;
+import java.nio.*;
+import java.util.*;
+
+/**
+ * Application master tests.
+ */
+public class IgniteApplicationMasterSelfTest extends TestCase {
+    /** */
+    private ApplicationMaster appMaster;
+
+    /** */
+    private ClusterProperties props;
+
+    /** */
+    private RMMock rmMock = new RMMock();
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Override protected void setUp() throws Exception {
+        super.setUp();
+
+        props = new ClusterProperties();
+        appMaster = new ApplicationMaster("test", props);
+
+        appMaster.setSchedulerTimeout(100000);
+
+        rmMock.clear();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testContainerAllocate() throws Exception {
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(new NMMock());
+
+        props.cpusPerNode(2);
+        props.memoryPerNode(1024);
+        props.instances(3);
+
+        Thread thread = runAppMaster(appMaster);
+
+        List<AMRMClient.ContainerRequest> contRequests = collectRequests(rmMock, 2, 1000);
+
+        interruptedThread(thread);
+
+        assertEquals(3, contRequests.size());
+
+        for (AMRMClient.ContainerRequest req : contRequests) {
+            assertEquals(2, req.getCapability().getVirtualCores());
+            assertEquals(1024, req.getCapability().getMemory());
+        }
+    }
+
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClusterResource() throws Exception {
+        rmMock.availableRes(new MockResource(1024, 2));
+
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(new NMMock());
+
+        props.cpusPerNode(8);
+        props.memoryPerNode(10240);
+        props.instances(3);
+
+        Thread thread = runAppMaster(appMaster);
+
+        interruptedThread(thread);
+
+        List<AMRMClient.ContainerRequest> contRequests = collectRequests(rmMock, 1, 1000);
+
+        assertEquals(0, contRequests.size());
+    }
+
+    /**
+     * @param rmMock RM mock.
+     * @param expectedCnt Expected cnt.
+     * @param timeOut Timeout.
+     * @return Requests.
+     */
+    private List<AMRMClient.ContainerRequest> collectRequests(RMMock rmMock, int expectedCnt, int timeOut) {
+        long startTime = System.currentTimeMillis();
+
+        List<AMRMClient.ContainerRequest> requests = rmMock.requests();
+
+        while (requests.size() < expectedCnt
+           && (System.currentTimeMillis() - startTime) < timeOut)
+            requests = rmMock.requests();
+
+        return requests;
+    }
+
+    /**
+     * Runs appMaster other thread.
+     *
+     * @param appMaster Application master.
+     * @return Thread.
+     */
+    private static Thread runAppMaster(final ApplicationMaster appMaster) {
+        Thread thread = new Thread(new Runnable() {
+            @Override public void run() {
+                try {
+                    appMaster.run();
+                }
+                catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+
+        thread.start();
+
+        return thread;
+    }
+
+    /**
+     * Interrupt thread and wait.
+     *
+     * @param thread Thread.
+     */
+    private static void interruptedThread(Thread thread) throws InterruptedException {
+        thread.interrupt();
+
+        thread.join();
+    }
+
+    /**
+     * Resource manager mock.
+     */
+    private static class RMMock extends AMRMClientAsync {
+        /** */
+        private List<AMRMClient.ContainerRequest> contRequests = new ArrayList<>();
+
+        /** */
+        private Resource availableRes;
+
+        /** */
+        public RMMock() {
+            super(0, null);
+        }
+
+        /**
+         * @return Requests.
+         */
+        public List<AMRMClient.ContainerRequest> requests() {
+            return contRequests;
+        }
+
+        /**
+         * Sets resource.
+         *
+         * @param availableRes Available resource.
+         */
+        public void availableRes(Resource availableRes) {
+            this.availableRes = availableRes;
+        }
+
+        /**
+         * Clear internal state.
+         */
+        public void clear() {
+            contRequests.clear();
+            availableRes = null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public List<? extends Collection> getMatchingRequests(Priority priority, String resourceName,
+            Resource capability) {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public RegisterApplicationMasterResponse registerApplicationMaster(String appHostName,
+            int appHostPort, String appTrackingUrl) throws YarnException, IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void unregisterApplicationMaster(FinalApplicationStatus appStatus, String appMessage,
+            String appTrackingUrl) throws YarnException, IOException {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void addContainerRequest(AMRMClient.ContainerRequest req) {
+            contRequests.add(req);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void removeContainerRequest(AMRMClient.ContainerRequest req) {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void releaseAssignedContainer(ContainerId containerId) {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public Resource getAvailableResources() {
+            return availableRes;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int getClusterNodeCount() {
+            return 0;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void updateBlacklist(List blacklistAdditions, List blacklistRemovals) {
+            // No-op.
+        }
+    }
+
+    /**
+     * Network manager mock.
+     */
+    public static class NMMock extends NMClient {
+        /** */
+        protected NMMock() {
+            super("name");
+        }
+
+        /** {@inheritDoc} */
+        @Override public Map<String, ByteBuffer> startContainer(Container container,
+            ContainerLaunchContext containerLaunchContext) throws YarnException, IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void stopContainer(ContainerId containerId, NodeId nodeId) throws YarnException, IOException {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public ContainerStatus getContainerStatus(ContainerId containerId, NodeId nodeId)
+            throws YarnException, IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void cleanupRunningContainersOnStop(boolean enabled) {
+            // No-op.
+        }
+    }
+
+    /**
+     * Resource.
+     */
+    public static class MockResource extends Resource {
+        /** Memory. */
+        private int mem;
+
+        /** CPU. */
+        private int cpu;
+
+        /**
+         * @param mem Memory.
+         * @param cpu CPU.
+         */
+        public MockResource(int mem, int cpu) {
+            this.mem = mem;
+            this.cpu = cpu;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int getMemory() {
+            return mem;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setMemory(int memory) {
+            this.mem = memory;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int getVirtualCores() {
+            return cpu;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setVirtualCores(int vCores) {
+            this.cpu = vCores;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int compareTo(Resource resource) {
+            return 0;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/960e19dd/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
deleted file mode 100644
index 04d3492..0000000
--- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteSchedulerSelfTest.java
+++ /dev/null
@@ -1,29 +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.yarn;
-
-import junit.framework.*;
-
-/**
- * Scheduler tests.
- */
-public class IgniteSchedulerSelfTest extends TestCase {
-    public void testName() throws Exception {
-
-    }
-}


[18/50] [abbrv] incubator-ignite git commit: tomcat-servlet-api

Posted by sb...@apache.org.
tomcat-servlet-api


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

Branch: refs/heads/ignite-901
Commit: 19ab54e18ec4f939554710b5bd05c1d99e98624d
Parents: ea3525e
Author: Anton <av...@gridgain.com>
Authored: Thu Jul 2 14:07:59 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Thu Jul 2 14:07:59 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         |   9 +-
 modules/jta/jta-cddl-license.txt                | 129 ----------
 modules/jta/licenses/jta-cddl-license.txt       | 129 ++++++++++
 .../licenses/servlet-api-cddl-gpl-license.txt   |  35 ---
 .../licenses/tomcat-servlet-api-cddl.txt        | 240 +++++++++++++++++++
 modules/rest-http/pom.xml                       |   6 +-
 modules/urideploy/pom.xml                       |   6 +-
 .../web/licenses/tomcat-servlet-api-cddl.txt    | 240 +++++++++++++++++++
 modules/web/pom.xml                             |   6 +-
 9 files changed, 626 insertions(+), 174 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
index 4329885..3fbc5fb 100644
--- a/assembly/LICENSE_FABRIC
+++ b/assembly/LICENSE_FABRIC
@@ -302,4 +302,11 @@ For details, see http://www.slf4j.org/license.html.
 JTidy
 ==============================================================================
 This product bundles JTidy, which is available under MIT license.
-For details, see http://jtidy.sourceforge.net/license.html.
\ No newline at end of file
+For details, see http://jtidy.sourceforge.net/license.html.
+
+==============================================================================
+Tomcat Servlet API
+==============================================================================
+This product bundles Tomcat Servlet API, which is available under Apache License, Version 2.0 and
+Common Development And Distribution License (CDDL) Version 1.0.
+For details, see http://www.opensource.org/licenses/cddl1.txt.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/jta/jta-cddl-license.txt
----------------------------------------------------------------------
diff --git a/modules/jta/jta-cddl-license.txt b/modules/jta/jta-cddl-license.txt
deleted file mode 100644
index 31f9d49..0000000
--- a/modules/jta/jta-cddl-license.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 (CDDL-1.0)
-
-1. Definitions.
-
-1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
-
-1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-
-1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-1.4. Executable means the Covered Software in any form other than Source Code.
-
-1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
-
-1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-
-1.7. License means this document.
-
-1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-1.9. Modifications means the Source Code and Executable form of any of the following:
-
-A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-
-B. Any new file that contains any part of the Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
-
-1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-
-1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-
-1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreem
 ent with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be
  construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/jta/licenses/jta-cddl-license.txt
----------------------------------------------------------------------
diff --git a/modules/jta/licenses/jta-cddl-license.txt b/modules/jta/licenses/jta-cddl-license.txt
new file mode 100644
index 0000000..31f9d49
--- /dev/null
+++ b/modules/jta/licenses/jta-cddl-license.txt
@@ -0,0 +1,129 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 (CDDL-1.0)
+
+1. Definitions.
+
+1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
+
+1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
+
+1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+1.4. Executable means the Covered Software in any form other than Source Code.
+
+1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
+
+1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
+
+1.7. License means this document.
+
+1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+1.9. Modifications means the Source Code and Executable form of any of the following:
+
+A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
+
+B. Any new file that contains any part of the Original Software or previous Modification; or
+
+C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
+
+1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
+
+1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
+
+1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
+
+(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
+
+(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
+
+(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
+
+(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreem
 ent with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be
  construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt b/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
deleted file mode 100644
index d4392e4..0000000
--- a/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
-
-The contents of this file are subject to the terms of either the GNU
-General Public License Version 2 only ("GPL") or the Common Development
-and Distribution License("CDDL") (collectively, the "License").  You
-may not use this file except in compliance with the License.  You can
-obtain a copy of the License at
-https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
-or packager/legal/LICENSE.txt.  See the License for the specific
-language governing permissions and limitations under the License.
-
-When distributing the software, include this License Header Notice in each
-file and include the License file at packager/legal/LICENSE.txt.
-
-GPL Classpath Exception:
-Oracle designates this particular file as subject to the "Classpath"
-exception as provided by Oracle in the GPL Version 2 section of the License
-file that accompanied this code.
-
-Modifications:
-If applicable, add the following below the License Header, with the fields
-enclosed by brackets [] replaced by your own identifying information:
-"Portions Copyright [year] [name of copyright owner]"
-
-Contributor(s):
-If you wish your version of this file to be governed by only the CDDL or
-only the GPL Version 2, indicate your decision by adding "[Contributor]
-elects to include this software in this distribution under the [CDDL or GPL
-Version 2] license."  If you don't indicate a single choice of license, a
-recipient has the option to distribute your version of this file under
-either the CDDL, the GPL Version 2 or to extend the choice of license to
-its licensees as provided above.  However, if you add GPL Version 2 code
-and therefore, elected the GPL Version 2 license, then the option applies
-only if the new code is made subject to such option by the copyright
-holder.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt b/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
new file mode 100644
index 0000000..9c1c6de
--- /dev/null
+++ b/modules/rest-http/licenses/tomcat-servlet-api-cddl.txt
@@ -0,0 +1,240 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)                                         Version 1.0
+
+
+1. Definitions.
+
+    1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications.
+
+    1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor
+    (if any), and the Modifications made by that particular Contributor.
+
+    1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination
+    of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+    1.4. “Executable” means the Covered Software in any form other than Source Code.
+
+    1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License.
+
+    1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms
+    of this License.
+
+    1.7. “License” means this document.
+
+    1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the
+    initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+    1.9. “Modifications” means the Source Code and Executable form of any of the following:
+        A. Any file that results from an addition to, deletion from or modification of the contents of a file
+        containing Original Software or previous Modifications;
+        B. Any new file that contains any part of the Original Software or previous Modification; or
+        C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+    1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally
+    released under this License.
+
+    1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation,
+    method, process, and apparatus claims, in any patent Licensable by grantor.
+
+    1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and
+    (b) associated documentation included in or with such code.
+
+    1.13. “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of
+    the terms of, this License. For legal entities, “You” includes any entity which controls, is controlled by, or is
+    under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect,
+    to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more
+    than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+    2.1. The Initial Developer Grant.
+    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
+    the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer,
+        to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions
+        thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made,
+        use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first
+        distributes or otherwise makes the Original Software available to a third party under the terms of this License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from
+        the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software,
+        or (ii) the combination of the Original Software with other software or devices.
+
+    2.2. Contributor Grant.
+    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
+    each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use,
+        reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor
+        (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or
+        as part of a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor
+        either alone and/or in combination with its Contributor Version (or portions of such combination), to make,
+        use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor
+        (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor
+        Version (or portions of such combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes
+        or otherwise makes the Modifications available to a third party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has
+        deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of
+        Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software
+        (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered
+        Software in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+    3.1. Availability of Source Code.
+    Any Covered Software that You distribute or otherwise make available in Executable form must also be made available
+    in Source Code form and that Source Code form must be distributed only under the terms of this License. You must
+    include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or
+    otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they
+    can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used
+    for software exchange.
+
+    3.2. Modifications.
+    The Modifications that You create or to which You contribute are governed by the terms of this License. You
+    represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to
+    grant the rights conveyed by this License.
+
+    3.3. Required Notices.
+    You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification.
+    You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or
+    any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+    3.4. Application of Additional Terms.
+    You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the
+    applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a
+    fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software.
+    However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor.
+    You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered
+    by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability
+    incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability
+    terms You offer.
+
+    3.5. Distribution of Executable Versions.
+    You may distribute the Executable form of the Covered Software under the terms of this License or under the terms
+    of a license of Your choice, which may contain terms different from this License, provided that You are in compliance
+    with the terms of this License and that the license for the Executable form does not attempt to limit or alter
+    the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the
+    Covered Software in Executable form under a different license, You must make it absolutely clear that any terms
+    which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby
+    agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer
+    or such Contributor as a result of any such terms You offer.
+
+    3.6. Larger Works.
+    You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License
+    and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this
+    License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+    4.1. New Versions.
+    Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License
+    from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3,
+    no one other than the license steward has the right to modify this License.
+
+    4.2. Effect of New Versions.
+    You may always continue to use, distribute or otherwise make the Covered Software available under the terms of
+    the version of the License under which You originally received the Covered Software. If the Initial Developer
+    includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under
+    any subsequent version of the License, You must distribute and make the Covered Software available under the terms
+    of the version of the License under which You originally received the Covered Software. Otherwise, You may also
+    choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version
+    of the License published by the license steward.
+
+    4.3. Modified Versions.
+    When You are an Initial Developer and You want to create a new license for Your Original Software, You may create
+    and use a modified version of this License if You: (a) rename the license and remove any references to the name of
+    the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that
+    the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
+PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.
+SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
+NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+    6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms
+    herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their
+    nature, must remain in effect beyond the termination of this License shall survive.
+
+    6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer
+    or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as
+    “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant
+    is a Contributor or the Original Software where the Participant is the Initial Developer) directly or
+    indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant,
+    the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1
+    and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically
+    at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with
+    respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement
+    with Participant.
+
+    6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly
+    or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the
+    initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant
+    under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
+
+    6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted
+    by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor)
+    shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO
+ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
+LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY
+SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
+“commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation”
+as such terms are used in 48 C.F.R. 12.212 Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of,
+and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed
+by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any,
+provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject
+to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the
+losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of
+the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that
+the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for
+compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use,
+distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of
+its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on
+an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
+
+--------
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+LICENSE (CDDL)
+
+The OpenSolaris code released under the CDDL shall be governed by the laws
+of the State of California (excluding conflict-of-law provisions). Any
+litigation relating to this License shall be subject to the jurisdiction of
+the Federal Courts of the Northern District of California and the state
+courts of the State of California, with venue lying in Santa Clara County,
+California.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index c4cb62d..8e61e11 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -41,9 +41,9 @@
         </dependency>
 
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <version>3.0.1</version>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-servlet-api</artifactId>
+            <version>8.0.23</version>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 76a862b..c90d094 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -89,9 +89,9 @@
         </dependency>
 
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <version>3.0.1</version>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-servlet-api</artifactId>
+            <version>8.0.23</version>
             <scope>test</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/web/licenses/tomcat-servlet-api-cddl.txt
----------------------------------------------------------------------
diff --git a/modules/web/licenses/tomcat-servlet-api-cddl.txt b/modules/web/licenses/tomcat-servlet-api-cddl.txt
new file mode 100644
index 0000000..9c1c6de
--- /dev/null
+++ b/modules/web/licenses/tomcat-servlet-api-cddl.txt
@@ -0,0 +1,240 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)                                         Version 1.0
+
+
+1. Definitions.
+
+    1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications.
+
+    1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor
+    (if any), and the Modifications made by that particular Contributor.
+
+    1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination
+    of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+    1.4. “Executable” means the Covered Software in any form other than Source Code.
+
+    1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License.
+
+    1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms
+    of this License.
+
+    1.7. “License” means this document.
+
+    1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the
+    initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+    1.9. “Modifications” means the Source Code and Executable form of any of the following:
+        A. Any file that results from an addition to, deletion from or modification of the contents of a file
+        containing Original Software or previous Modifications;
+        B. Any new file that contains any part of the Original Software or previous Modification; or
+        C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+    1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally
+    released under this License.
+
+    1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation,
+    method, process, and apparatus claims, in any patent Licensable by grantor.
+
+    1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and
+    (b) associated documentation included in or with such code.
+
+    1.13. “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of
+    the terms of, this License. For legal entities, “You” includes any entity which controls, is controlled by, or is
+    under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect,
+    to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more
+    than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+    2.1. The Initial Developer Grant.
+    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
+    the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer,
+        to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions
+        thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made,
+        use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first
+        distributes or otherwise makes the Original Software available to a third party under the terms of this License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from
+        the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software,
+        or (ii) the combination of the Original Software with other software or devices.
+
+    2.2. Contributor Grant.
+    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims,
+    each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use,
+        reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor
+        (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or
+        as part of a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor
+        either alone and/or in combination with its Contributor Version (or portions of such combination), to make,
+        use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor
+        (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor
+        Version (or portions of such combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes
+        or otherwise makes the Modifications available to a third party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has
+        deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of
+        Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software
+        (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered
+        Software in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+    3.1. Availability of Source Code.
+    Any Covered Software that You distribute or otherwise make available in Executable form must also be made available
+    in Source Code form and that Source Code form must be distributed only under the terms of this License. You must
+    include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or
+    otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they
+    can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used
+    for software exchange.
+
+    3.2. Modifications.
+    The Modifications that You create or to which You contribute are governed by the terms of this License. You
+    represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to
+    grant the rights conveyed by this License.
+
+    3.3. Required Notices.
+    You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification.
+    You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or
+    any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+    3.4. Application of Additional Terms.
+    You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the
+    applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a
+    fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software.
+    However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor.
+    You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered
+    by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability
+    incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability
+    terms You offer.
+
+    3.5. Distribution of Executable Versions.
+    You may distribute the Executable form of the Covered Software under the terms of this License or under the terms
+    of a license of Your choice, which may contain terms different from this License, provided that You are in compliance
+    with the terms of this License and that the license for the Executable form does not attempt to limit or alter
+    the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the
+    Covered Software in Executable form under a different license, You must make it absolutely clear that any terms
+    which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby
+    agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer
+    or such Contributor as a result of any such terms You offer.
+
+    3.6. Larger Works.
+    You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License
+    and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this
+    License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+    4.1. New Versions.
+    Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License
+    from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3,
+    no one other than the license steward has the right to modify this License.
+
+    4.2. Effect of New Versions.
+    You may always continue to use, distribute or otherwise make the Covered Software available under the terms of
+    the version of the License under which You originally received the Covered Software. If the Initial Developer
+    includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under
+    any subsequent version of the License, You must distribute and make the Covered Software available under the terms
+    of the version of the License under which You originally received the Covered Software. Otherwise, You may also
+    choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version
+    of the License published by the license steward.
+
+    4.3. Modified Versions.
+    When You are an Initial Developer and You want to create a new license for Your Original Software, You may create
+    and use a modified version of this License if You: (a) rename the license and remove any references to the name of
+    the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that
+    the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
+PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.
+SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
+NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+    6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms
+    herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their
+    nature, must remain in effect beyond the termination of this License shall survive.
+
+    6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer
+    or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as
+    “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant
+    is a Contributor or the Original Software where the Participant is the Initial Developer) directly or
+    indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant,
+    the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1
+    and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically
+    at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with
+    respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement
+    with Participant.
+
+    6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly
+    or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the
+    initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant
+    under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
+
+    6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted
+    by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor)
+    shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO
+ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
+LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY
+SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
+“commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation”
+as such terms are used in 48 C.F.R. 12.212 Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of,
+and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed
+by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any,
+provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject
+to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the
+losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of
+the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that
+the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for
+compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use,
+distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of
+its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on
+an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
+
+--------
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+LICENSE (CDDL)
+
+The OpenSolaris code released under the CDDL shall be governed by the laws
+of the State of California (excluding conflict-of-law provisions). Any
+litigation relating to this License shall be subject to the jurisdiction of
+the Federal Courts of the Northern District of California and the state
+courts of the State of California, with venue lying in Santa Clara County,
+California.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19ab54e1/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index f109880..2ceb3d8 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -41,9 +41,9 @@
         </dependency>
 
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <version>3.0.1</version>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-servlet-api</artifactId>
+            <version>8.0.23</version>
         </dependency>
 
         <dependency>


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

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


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

Branch: refs/heads/ignite-901
Commit: d2683752a11c66c32023235db4ccac839af75726
Parents: b1a4c04 44b187d
Author: Anton <av...@gridgain.com>
Authored: Thu Jul 2 13:25:28 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Thu Jul 2 13:25:28 2015 +0300

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



[48/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1.3' into ignite-1.3_

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.3' into ignite-1.3_


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

Branch: refs/heads/ignite-901
Commit: c559692d6b3aa96316dc0c9b2874c67179489a87
Parents: 10c8a71 24f8961
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 14 16:41:51 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 14 16:41:51 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 20 +++++++++++++++-----
 ...eAtomicInvalidPartitionHandlingSelfTest.java |  2 +-
 ...acheAtomicReplicatedNodeRestartSelfTest.java | 15 ---------------
 4 files changed, 18 insertions(+), 23 deletions(-)
----------------------------------------------------------------------



[08/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: 78ab7aa1a5f7255b43db129ae3f40093e076cc55
Parents: 7e072dc
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Wed Jun 10 17:00:05 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Wed Jun 10 17:00:05 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78ab7aa1/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 0ef1362..a784340 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
@@ -322,6 +322,10 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         // Create async application master.
         rmClient = AMRMClientAsync.createAMRMClientAsync(300, this);
 
+        rmClient.init(conf);
+
+        rmClient.start();
+
         if (props.igniteCfg() == null || props.igniteCfg().isEmpty()) {
             InputStream input = Thread.currentThread().getContextClassLoader()
                 .getResourceAsStream(IgniteYarnUtils.DEFAULT_IGNITE_CONFIG);


[05/50] [abbrv] incubator-ignite git commit: #YARN WIP

Posted by sb...@apache.org.
#YARN WIP


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

Branch: refs/heads/ignite-901
Commit: 858d2a3f757fea2b88ffcb907e0f221699e32420
Parents: 12d9c02
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Mon Jun 8 20:03:31 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Mon Jun 8 20:03:31 2015 +0300

----------------------------------------------------------------------
 modules/yarn/README.txt                         |   8 +-
 .../apache/ignite/yarn/ApplicationMaster.java   | 187 +++++++++++++------
 .../apache/ignite/yarn/ClusterProperties.java   | 145 ++++----------
 .../org/apache/ignite/yarn/IgniteContainer.java |  33 +++-
 .../org/apache/ignite/yarn/IgniteProvider.java  |   4 +-
 .../apache/ignite/yarn/IgniteYarnClient.java    |  13 +-
 .../org/apache/ignite/yarn/package-info.java    |   2 +-
 .../ignite/yarn/utils/IgniteYarnUtils.java      |   4 +-
 8 files changed, 207 insertions(+), 189 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/README.txt
----------------------------------------------------------------------
diff --git a/modules/yarn/README.txt b/modules/yarn/README.txt
index 75a62f8..5cdd4a2 100644
--- a/modules/yarn/README.txt
+++ b/modules/yarn/README.txt
@@ -1,9 +1,9 @@
-Apache Ignite Mesos Module
+Apache Ignite Yarn Module
 ------------------------
 
-Apache Ignite Mesos module provides integration Apache Ignite with Apache Mesos.
+Apache Ignite Yarn module provides integration Apache Ignite with Apache Hadoop Yarn.
 
-Importing Apache Ignite Mesos Module In Maven Project
+Importing Apache Ignite Yarn Module In Maven Project
 -------------------------------------
 
 If you are using Maven to manage dependencies of your project, you can add Cloud module
@@ -19,7 +19,7 @@ interested in):
         ...
         <dependency>
             <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-mesos</artifactId>
+            <artifactId>ignite-yarn</artifactId>
             <version>${ignite.version}</version>
         </dependency>
         ...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/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 fe065a3..3bf0521 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
@@ -19,7 +19,7 @@ package org.apache.ignite.yarn;
 
 import org.apache.commons.io.*;
 import org.apache.hadoop.fs.*;
-import org.apache.hadoop.service.Service;
+import org.apache.hadoop.service.*;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
 import org.apache.hadoop.yarn.client.api.async.*;
@@ -30,11 +30,16 @@ import org.apache.ignite.yarn.utils.*;
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
- * TODO
+ * Application master request containers from Yarn and decides how many resources will be occupied.
  */
 public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
+    /** */
+    public static final Logger log = Logger.getLogger(ApplicationMaster.class.getSimpleName());
+
     /** Default port range. */
     public static final String DEFAULT_PORT = ":47500..47510";
 
@@ -51,6 +56,9 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private NMClient nmClient;
 
     /** */
+    AMRMClientAsync<AMRMClient.ContainerRequest> rmClient;
+
+    /** */
     private Path ignitePath;
 
     /** */
@@ -60,7 +68,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private FileSystem fs;
 
     /** */
-    private Map<String, IgniteContainer> containers = new HashMap<>();
+    private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
      * Constructor.
@@ -79,47 +87,81 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
     /** {@inheritDoc} */
     public synchronized void onContainersAllocated(List<Container> conts) {
-        for (Container container : conts) {
-            try {
-                ContainerLaunchContext ctx = Records.newRecord(ContainerLaunchContext.class);
+        for (Container c : conts) {
+            if (checkContainer(c)) {
+                try {
+                    ContainerLaunchContext ctx = Records.newRecord(ContainerLaunchContext.class);
 
-                Map<String, String> env = new HashMap<>(System.getenv());
+                    Map<String, String> env = new HashMap<>(System.getenv());
 
-                env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(container.getNodeId().getHost()));
+                    //env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
 
-                ctx.setEnvironment(env);
+                    ctx.setEnvironment(env);
 
-                Map<String, LocalResource> resources = new HashMap<>();
+                    Map<String, LocalResource> resources = new HashMap<>();
 
-                resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
-                resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
+                    resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
+                    resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
 
-                ctx.setLocalResources(resources);
+                    ctx.setLocalResources(resources);
 
-                ctx.setCommands(
-                    Collections.singletonList(
-                        "./ignite/*/bin/ignite.sh "
-                        + "./ignite-config.xml"
-                        + " -J-Xmx" + container.getResource().getMemory() + "m"
-                        + " -J-Xms" + container.getResource().getMemory() + "m"
-                        + IgniteYarnUtils.YARN_LOG_OUT
-                    ));
+                    ctx.setCommands(
+                        Collections.singletonList(
+                            "./ignite/*/bin/ignite.sh "
+                            + "./ignite-config.xml"
+                            + " -J-Xmx" + c.getResource().getMemory() + "m"
+                            + " -J-Xms" + c.getResource().getMemory() + "m"
+                            + IgniteYarnUtils.YARN_LOG_OUT
+                        ));
 
-                System.out.println("[AM] Launching container " + container.getId());
+                    log.log(Level.INFO, "Launching container: {0}.", c.getId());
 
-                nmClient.startContainer(container, ctx);
+                    nmClient.startContainer(c, ctx);
 
-                containers.put(container.getNodeId().getHost(),
-                    new IgniteContainer(container.getNodeId().getHost(), container.getResource().getVirtualCores(),
-                        container.getResource().getMemory()));
-            }
-            catch (Exception ex) {
-                System.err.println("[AM] Error launching container " + container.getId() + " " + ex);
+                    containers.put(c.getId(),
+                        new IgniteContainer(
+                            c.getId(),
+                            c.getNodeId(),
+                            c.getResource().getVirtualCores(),
+                            c.getResource().getMemory()));
+                }
+                catch (Exception ex) {
+                    System.err.println("[AM] Error launching container " + c.getId() + " " + ex);
+                }
             }
+            else
+                rmClient.releaseAssignedContainer(c.getId());
         }
     }
 
     /**
+     * Checks that container
+     *
+     * @param cont Container.
+     * @return {@code True} if
+     */
+    private boolean checkContainer(Container cont) {
+        // Check limit on running nodes.
+        if (props.instances() <= containers.size())
+            return false;
+
+        // Check host name
+        if (props.hostnameConstraint() != null
+                && props.hostnameConstraint().matcher(cont.getNodeId().getHost()).matches())
+            return false;
+
+        // Check that slave satisfies min requirements.
+        if (cont.getResource().getVirtualCores() < props.cpusPerNode()
+            || cont.getResource().getMemory() < props.memoryPerNode()) {
+            //log.log(Level.FINE, "Offer not sufficient for slave request: {0}", offer.getResourcesList());
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
      * @return Address running nodes.
      */
     private String getAddress(String address) {
@@ -133,7 +175,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         StringBuilder sb = new StringBuilder();
 
         for (IgniteContainer cont : containers.values())
-            sb.append(cont.host()).append(DEFAULT_PORT).append(DELIM);
+            sb.append(cont.nodeId.getHost()).append(DEFAULT_PORT).append(DELIM);
 
         return sb.substring(0, sb.length() - 1);
     }
@@ -141,13 +183,30 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     /** {@inheritDoc} */
     public synchronized void onContainersCompleted(List<ContainerStatus> statuses) {
         for (ContainerStatus status : statuses) {
-            synchronized (this) {
-            }
+            containers.remove(status.getContainerId());
+
+            //log.log(Level.FINE, "Offer not sufficient for slave request: {0}", offer.getResourcesList());
         }
     }
 
     /** {@inheritDoc} */
-    public void onNodesUpdated(List<NodeReport> updated) {
+    public synchronized void onNodesUpdated(List<NodeReport> updated) {
+        for (NodeReport node : updated) {
+            // If node unusable.
+            if (node.getNodeState().isUnusable()) {
+                for (IgniteContainer cont : containers.values()) {
+                    if (cont.nodeId().equals(node.getNodeId())) {
+                        containers.remove(cont.id());
+
+                        log.log(Level.WARNING, "Node is unusable. Node: {0}, state: {1}.",
+                            new Object[]{node.getNodeId().getHost(), node.getNodeState()});
+                    }
+                }
+
+                log.log(Level.WARNING, "Node is unusable. Node: {0}, state: {1}.",
+                    new Object[]{node.getNodeId().getHost(), node.getNodeState()});
+            }
+        }
     }
 
     /** {@inheritDoc} */
@@ -169,7 +228,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
      * @throws Exception If failed.
      */
     public static void main(String[] args) throws Exception {
-        ClusterProperties props = ClusterProperties.from(null);
+        ClusterProperties props = ClusterProperties.from();
 
         ApplicationMaster master = new ApplicationMaster(args[0], props);
 
@@ -184,60 +243,72 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
      * @throws Exception If failed.
      */
     public void run() throws Exception {
-        // Create asyn application master.
-        AMRMClientAsync<AMRMClient.ContainerRequest> rmClient = AMRMClientAsync.createAMRMClientAsync(300, this);
-
         rmClient.init(conf);
         rmClient.start();
 
         // Register with ResourceManager
         rmClient.registerApplicationMaster("", 0, "");
 
-        System.out.println("[AM] registerApplicationMaster 1");
+        log.log(Level.INFO, "Application master registered.");
 
         // Priority for worker containers - priorities are intra-application
         Priority priority = Records.newRecord(Priority.class);
         priority.setPriority(0);
 
-        // Check ignite cluster.
-        while (!nmClient.isInState(Service.STATE.STOPPED)) {
-            Resource availableRes = rmClient.getAvailableResources();
+        try {
+            // Check ignite cluster.
+            while (!nmClient.isInState(Service.STATE.STOPPED)) {
+                int runningCnt = containers.size();
 
-            if (containers.size() < props.instances() || availableRes.getMemory() >= props.cpusPerNode()
-                || availableRes.getVirtualCores() >= props.cpus()) {
-                // Resource requirements for worker containers
-                Resource capability = Records.newRecord(Resource.class);
-                capability.setMemory(1024);
-                capability.setVirtualCores(2);
+                if (runningCnt < props.instances() && checkAvailableResource(rmClient.getAvailableResources())) {
+                    // Resource requirements for worker containers.
+                    Resource capability = Records.newRecord(Resource.class);
 
-                for (int i = 0; i < 1; ++i) {
-                    // Make container requests to ResourceManager
-                    AMRMClient.ContainerRequest containerAsk =
+                    capability.setMemory((int)props.memoryPerNode());
+                    capability.setVirtualCores((int)props.cpusPerNode());
+
+                    for (int i = 0; i < props.instances() - runningCnt; ++i) {
+                        // Make container requests to ResourceManager
+                        AMRMClient.ContainerRequest containerAsk =
                             new AMRMClient.ContainerRequest(capability, null, null, priority);
 
-                    System.out.println("[AM] Making res-req " + i);
+                        rmClient.addContainerRequest(containerAsk);
 
-                    rmClient.addContainerRequest(containerAsk);
+                        log.log(Level.INFO, "Making request. Memory: {0}, cpu {1}.",
+                            new Object[]{props.memoryPerNode(), props.cpusPerNode()});
+                    }
                 }
-            }
 
-            TimeUnit.SECONDS.sleep(5);
+                TimeUnit.SECONDS.sleep(5);
+            }
         }
+        catch (Exception e) {
+            // Un-register with ResourceManager
+            rmClient.unregisterApplicationMaster(FinalApplicationStatus.FAILED, "", "");
 
-        System.out.println("[AM] waiting for containers to finish");
-
-        System.out.println("[AM] unregisterApplicationMaster 0");
+            System.exit(1);
+        }
 
         // Un-register with ResourceManager
         rmClient.unregisterApplicationMaster(FinalApplicationStatus.KILLED, "", "");
+    }
 
-        System.out.println("[AM] unregisterApplicationMaster 1");
+    /**
+     * @param availableRes Available resources.
+     * @return {@code True} if cluster contains available resources.
+     */
+    private boolean checkAvailableResource(Resource availableRes) {
+        return availableRes == null || availableRes.getMemory() >= props.memoryPerNode()
+            && availableRes.getVirtualCores() >= props.cpusPerNode();
     }
 
     /**
      * @throws IOException
      */
     public void init() throws IOException {
+        // Create async application master.
+        rmClient = AMRMClientAsync.createAMRMClientAsync(300, this);
+
         if (props.igniteConfigUrl() == null || props.igniteConfigUrl().isEmpty()) {
             InputStream input = Thread.currentThread().getContextClassLoader()
                 .getResourceAsStream(IgniteYarnUtils.DEFAULT_IGNITE_CONFIG);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/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 adddd51..f9fdb59 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
@@ -41,28 +41,16 @@ public class ClusterProperties {
     /** */
     public static final String DEFAULT_CLUSTER_NAME = "ignite-cluster";
 
-    /** Mesos master url. */
+    /** Cluster name. */
     private String clusterName = DEFAULT_CLUSTER_NAME;
 
     /** */
-    public static final String IGNITE_TOTAL_CPU = "IGNITE_TOTAL_CPU";
-
-    /** CPU limit. */
-    private double cpu = UNLIMITED;
-
-    /** */
     public static final String IGNITE_RUN_CPU_PER_NODE = "IGNITE_RUN_CPU_PER_NODE";
 
     /** CPU limit. */
     private double cpuPerNode = UNLIMITED;
 
     /** */
-    public static final String IGNITE_TOTAL_MEMORY = "IGNITE_TOTAL_MEMORY";
-
-    /** Memory limit. */
-    private double mem = UNLIMITED;
-
-    /** */
     public static final String IGNITE_MEMORY_PER_NODE = "IGNITE_MEMORY_PER_NODE";
 
     /** Memory limit. */
@@ -72,25 +60,7 @@ public class ClusterProperties {
     public static final String IGNITE_NODE_COUNT = "IGNITE_NODE_COUNT";
 
     /** Node count limit. */
-    private double nodeCnt = UNLIMITED;
-
-    /** */
-    public static final String IGNITE_MIN_CPU_PER_NODE = "IGNITE_MIN_CPU_PER_NODE";
-
-    /** */
-    public static final double DEFAULT_RESOURCE_MIN_CPU = 1;
-
-    /** Min memory per node. */
-    private double minCpu = DEFAULT_RESOURCE_MIN_CPU;
-
-    /** */
-    public static final String IGNITE_MIN_MEMORY_PER_NODE = "IGNITE_MIN_MEMORY_PER_NODE";
-
-    /** */
-    public static final double DEFAULT_RESOURCE_MIN_MEM = 256;
-
-    /** Min memory per node. */
-    private double minMemory = DEFAULT_RESOURCE_MIN_MEM;
+    private double nodeCnt = 3;
 
     /** */
     public static final String IGNITE_VERSION = "IGNITE_VERSION";
@@ -170,19 +140,6 @@ public class ClusterProperties {
         return clusterName;
     }
 
-    /**
-     * @return CPU count limit.
-     */
-    public double cpus() {
-        return cpu;
-    }
-
-    /**
-     * Sets CPU count limit.
-     */
-    public void cpus(double cpu) {
-        this.cpu = cpu;
-    }
 
     /**
      * @return CPU count limit.
@@ -201,22 +158,6 @@ public class ClusterProperties {
     /**
      * @return mem limit.
      */
-    public double memory() {
-        return mem;
-    }
-
-    /**
-     * Sets mem limit.
-     *
-     * @param mem Memory.
-     */
-    public void memory(double mem) {
-        this.mem = mem;
-    }
-
-    /**
-     * @return mem limit.
-     */
     public double memoryPerNode() {
         return memPerNode;
     }
@@ -238,22 +179,6 @@ public class ClusterProperties {
     }
 
     /**
-     * @return min memory per node.
-     */
-    public double minMemoryPerNode() {
-        return minMemory;
-    }
-
-    /**
-     * Sets min memory.
-     *
-     * @param minMemory Min memory.
-     */
-    public void minMemoryPerNode(double minMemory) {
-        this.minMemory = minMemory;
-    }
-
-    /**
      * Sets hostname constraint.
      *
      * @param pattern Hostname pattern.
@@ -263,22 +188,6 @@ public class ClusterProperties {
     }
 
     /**
-     * @return min cpu count per node.
-     */
-    public double minCpuPerNode() {
-        return minCpu;
-    }
-
-    /**
-     * Sets min cpu count per node.
-     *
-     * @param minCpu min cpu count per node.
-     */
-    public void minCpuPerNode(double minCpu) {
-        this.minCpu = minCpu;
-    }
-
-    /**
      * @return Ignite version.
      */
     public String igniteVer() {
@@ -362,13 +271,9 @@ public class ClusterProperties {
             prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null);
             prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null);
 
-            prop.cpu = getDoubleProperty(IGNITE_TOTAL_CPU, props, UNLIMITED);
-            prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, UNLIMITED);
-            prop.mem = getDoubleProperty(IGNITE_TOTAL_MEMORY, props, UNLIMITED);
-            prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, UNLIMITED);
-            prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, UNLIMITED);
-            prop.minCpu = getDoubleProperty(IGNITE_MIN_CPU_PER_NODE, props, DEFAULT_RESOURCE_MIN_CPU);
-            prop.minMemory = getDoubleProperty(IGNITE_MIN_MEMORY_PER_NODE, props, DEFAULT_RESOURCE_MIN_MEM);
+            prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, props, 1.0);
+            prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, 2048.0);
+            prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, 2.0);
 
             prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
             prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
@@ -394,6 +299,40 @@ 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.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, null, null);
+        prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, null, null);
+
+        prop.cpuPerNode = getDoubleProperty(IGNITE_RUN_CPU_PER_NODE, null, 1.0);
+        prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, 2048.0);
+        prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, 2.0);
+
+        prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
+        prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, null, DEFAULT_IGNITE_WORK_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;
+    }
+
+    /**
      * Convert to properties to map.
      *
      * @return Key-value map.
@@ -406,13 +345,9 @@ public class ClusterProperties {
         envs.put(IGNITE_USERS_LIBS_URL, toEnvVal(userLibsUrl));
         envs.put(IGNITE_CONFIG_XML_URL, toEnvVal(igniteCfgUrl));
 
-        envs.put(IGNITE_TOTAL_CPU, toEnvVal(cpu));
         envs.put(IGNITE_RUN_CPU_PER_NODE, toEnvVal(cpuPerNode));
-        envs.put(IGNITE_TOTAL_MEMORY, toEnvVal(mem));
         envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
-        envs.put(IGNITE_MIN_CPU_PER_NODE, toEnvVal(minCpu));
-        envs.put(IGNITE_MIN_MEMORY_PER_NODE, toEnvVal(minMemory));
 
         envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
         envs.put(IGNITE_WORKING_DIR, toEnvVal(igniteWorkDir));
@@ -461,7 +396,7 @@ public class ClusterProperties {
 
     /**
      * @param val Value.
-     * @return If val is null {@link EMPTY_STRING} else to string.
+     * @return If val is null {@code EMPTY_STRING} else to string.
      */
     private String toEnvVal(Object val) {
         return val == null ? EMPTY_STRING : val.toString();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
index 4e3c285..a8b0342 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -17,12 +17,17 @@
 
 package org.apache.ignite.yarn;
 
+import org.apache.hadoop.yarn.api.records.*;
+
 /**
  * Information about launched task.
  */
 public class IgniteContainer {
     /** */
-    public final String host;
+    public final ContainerId id;
+
+    /** */
+    public final NodeId nodeId;
 
     /** */
     public final double cpuCores;
@@ -33,21 +38,29 @@ public class IgniteContainer {
     /**
      * Ignite launched task.
      *
-     * @param host Host.
+     * @param nodeId Node id.
      * @param cpuCores Cpu cores count.
      * @param mem Memory
      */
-    public IgniteContainer(String host, double cpuCores, double mem) {
-        this.host = host;
+    public IgniteContainer(ContainerId id, NodeId nodeId, double cpuCores, double mem) {
+        this.id = id;
+        this.nodeId = nodeId;
         this.cpuCores = cpuCores;
         this.mem = mem;
     }
 
     /**
+     * @return Id.
+     */
+    public ContainerId id() {
+        return id;
+    }
+
+    /**
      * @return Host.
      */
-    public String host() {
-        return host;
+    public NodeId nodeId() {
+        return nodeId;
     }
 
     /**
@@ -64,10 +77,12 @@ public class IgniteContainer {
         return mem;
     }
 
-    @Override
-    public String toString() {
+    /**
+     * {@inheritDoc}
+     */
+    @Override public String toString() {
         return "IgniteTask " +
-            "host: [" + host + ']' +
+            "host: [" + nodeId.getHost() + ']' +
             ", cpuCores: [" + cpuCores + "]" +
             ", mem: [" + mem + "]";
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index c6e07cb..1ac2974 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.yarn;
 
 import org.apache.hadoop.fs.*;
-import org.apache.ignite.yarn.utils.IgniteYarnUtils;
+import org.apache.ignite.yarn.utils.*;
 
 import java.io.*;
 import java.net.*;
@@ -26,7 +26,7 @@ import java.nio.channels.*;
 import java.util.*;
 
 /**
- * Class downloads and stores Ignite.
+ * Downloads and stores Ignite.
  */
 public class IgniteProvider {
     /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 0ab9e91..f74890d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -26,6 +26,7 @@ import org.apache.ignite.yarn.utils.*;
 
 import java.io.*;
 import java.util.*;
+import java.util.concurrent.*;
 import java.util.logging.*;
 
 import static org.apache.hadoop.yarn.api.ApplicationConstants.*;
@@ -69,9 +70,6 @@ public class IgniteYarnClient {
         // Set up the container launch context for the application master
         ContainerLaunchContext amContainer = Records.newRecord(ContainerLaunchContext.class);
 
-        System.out.println(Environment.JAVA_HOME.$() + "/bin/java -Xmx512m " + ApplicationMaster.class.getName()
-            + IgniteYarnUtils.SPACE + ignite.toUri());
-
         amContainer.setCommands(
             Collections.singletonList(
                 Environment.JAVA_HOME.$() + "/bin/java -Xmx512m " + ApplicationMaster.class.getName()
@@ -106,16 +104,18 @@ public class IgniteYarnClient {
 
         // Submit application
         ApplicationId appId = appContext.getApplicationId();
-        System.out.println("Submitting application " + appId);
+
         yarnClient.submitApplication(appContext);
 
+        log.log(Level.INFO, "Submitted application. Application id: [{0}]", appId);
+
         ApplicationReport appReport = yarnClient.getApplicationReport(appId);
         YarnApplicationState appState = appReport.getYarnApplicationState();
 
         while (appState != YarnApplicationState.FINISHED &&
                 appState != YarnApplicationState.KILLED &&
                 appState != YarnApplicationState.FAILED) {
-            Thread.sleep(100);
+            TimeUnit.SECONDS.sleep(1L);
 
             appReport = yarnClient.getApplicationReport(appId);
 
@@ -124,8 +124,7 @@ public class IgniteYarnClient {
 
         yarnClient.killApplication(appId);
 
-        System.out.println("Application " + appId + " finished with state " + appState + " at "
-            + appReport.getFinishTime());
+        log.log(Level.INFO, "Application [{0}] finished with state [{1}]", new Object[]{appId, appState});
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/src/main/java/org/apache/ignite/yarn/package-info.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/package-info.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/package-info.java
index c47f1e8..6734307 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/package-info.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/package-info.java
@@ -17,6 +17,6 @@
 
 /**
  * <!-- Package description. -->
- * Contains classes to support integration with Apache Mesos.
+ * Contains classes to support integration with Apache Hadoop Yarn.
  */
 package org.apache.ignite.yarn;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/858d2a3f/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
index 1e6c414..3b62411 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/utils/IgniteYarnUtils.java
@@ -21,12 +21,10 @@ import org.apache.hadoop.fs.*;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.util.*;
 
-import java.io.IOException;
-
 import static org.apache.hadoop.yarn.api.ApplicationConstants.*;
 
 /**
- *
+ * Utils.
  */
 public class IgniteYarnUtils {
     /** */


[20/50] [abbrv] incubator-ignite git commit: ignite-1067

Posted by sb...@apache.org.
ignite-1067


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

Branch: refs/heads/ignite-901
Commit: 3066b4a924fa3cdf4f04e01ed9913915d9d75641
Parents: 19ab54e
Author: Anton <av...@gridgain.com>
Authored: Tue Jul 7 13:17:20 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Tue Jul 7 13:17:20 2015 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |  12 +
 assembly/dependencies-hadoop.xml                |  12 +
 assembly/dependencies-visor-console.xml         |  10 +
 modules/aop/licenses/aopalliance-license.txt    |   1 -
 modules/aop/licenses/aspectj-epl-license.txt    |  69 ------
 modules/apache-license-gen/pom.xml              |  48 ++++
 .../src/main/resources/META-INF/licenses.txt.vm |  39 +++
 modules/core/licenses/cache-api-license.txt     |  47 ----
 .../geospatial/licenses/jts-lgpl-license.txt    | 165 -------------
 modules/hadoop/licenses/asm-bsd-license.txt     |  29 ---
 .../licenses/hibernate-lgpl-2.1-license.txt     | 174 --------------
 modules/indexing/licenses/h2-epl-license.txt    |  69 ------
 modules/jta/licenses/jta-cddl-license.txt       | 129 ----------
 modules/mesos/licenses/jetty-epl-license.txt    |  69 ------
 .../rest-http/licenses/jetty-epl-license.txt    |  69 ------
 .../licenses/tomcat-servlet-api-cddl.txt        | 240 -------------------
 parent/pom.xml                                  |  50 ++++
 pom.xml                                         |   1 +
 18 files changed, 172 insertions(+), 1061 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
index b4808e7..93f96f1 100644
--- a/assembly/dependencies-fabric.xml
+++ b/assembly/dependencies-fabric.xml
@@ -47,6 +47,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                     </fileSet>
@@ -82,6 +86,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                     </fileSet>
@@ -134,6 +142,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                     </fileSet>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/assembly/dependencies-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-hadoop.xml b/assembly/dependencies-hadoop.xml
index 5b39d34..4638643 100644
--- a/assembly/dependencies-hadoop.xml
+++ b/assembly/dependencies-hadoop.xml
@@ -47,6 +47,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                     </fileSet>
@@ -81,6 +85,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                     </fileSet>
@@ -116,6 +124,10 @@
                         </includes>
                     </fileSet>
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/</outputDirectory>
                         <excludes>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/assembly/dependencies-visor-console.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-visor-console.xml b/assembly/dependencies-visor-console.xml
index 9312d39..f24bba3 100644
--- a/assembly/dependencies-visor-console.xml
+++ b/assembly/dependencies-visor-console.xml
@@ -46,6 +46,11 @@
                     </fileSet>
 
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/visorcmd</outputDirectory>
                         <excludes>
@@ -96,6 +101,11 @@
                     </fileSet>
 
                     <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+
+                    <fileSet>
                         <directory>target/libs</directory>
                         <outputDirectory>/visor-common</outputDirectory>
                         <excludes>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/aop/licenses/aopalliance-license.txt
----------------------------------------------------------------------
diff --git a/modules/aop/licenses/aopalliance-license.txt b/modules/aop/licenses/aopalliance-license.txt
deleted file mode 100644
index 6e5f6e6..0000000
--- a/modules/aop/licenses/aopalliance-license.txt
+++ /dev/null
@@ -1 +0,0 @@
-All the source code provided by AOP Alliance is Public Domain.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/aop/licenses/aspectj-epl-license.txt
----------------------------------------------------------------------
diff --git a/modules/aop/licenses/aspectj-epl-license.txt b/modules/aop/licenses/aspectj-epl-license.txt
deleted file mode 100644
index f5f0c89..0000000
--- a/modules/aop/licenses/aspectj-epl-license.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Eclipse Public License, Version 1.0 (EPL-1.0)
-(plain text)
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the Program.
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/apache-license-gen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/pom.xml b/modules/apache-license-gen/pom.xml
new file mode 100644
index 0000000..c96ca5a
--- /dev/null
+++ b/modules/apache-license-gen/pom.xml
@@ -0,0 +1,48 @@
+<?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.apache.resources</groupId>
+        <artifactId>apache-resource-bundles</artifactId>
+        <version>4</version>
+    </parent>
+
+    <groupId>org.apache.ignite</groupId>
+    <artifactId>ignite-apache-license-gen</artifactId>
+    <version>1.2.1-SNAPSHOT</version>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
new file mode 100644
index 0000000..5d812e3
--- /dev/null
+++ b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
@@ -0,0 +1,39 @@
+##
+## 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.
+##
+## $Id$
+##
+// ------------------------------------------------------------------
+// List of #if ($projectName)$projectName#else${project.name}#end module's dependencies provided as a part of this distribution
+// with licenses differ from Apache Software License.
+// ------------------------------------------------------------------
+#foreach ( $organizationName in $projectsSortedByOrganization.keySet() )
+#foreach ( $project in $projectsSortedByOrganization.get( $organizationName ) )
+##if($project.licenses.size() == 1 && $project.licenses.get(0).name.contains("Apache Software License"))#else
+  - $project.name #if ($project.url)($project.url)#end $project.artifact
+#foreach ( $license in $project.licenses )
+    License: $license.name #if ($license.url) ($license.url)#end
+#end
+#if ($project.licenses.size() == 0)    No licenses.#end
+
+
+##end
+#end
+#end
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/core/licenses/cache-api-license.txt
----------------------------------------------------------------------
diff --git a/modules/core/licenses/cache-api-license.txt b/modules/core/licenses/cache-api-license.txt
deleted file mode 100644
index 2945ab2..0000000
--- a/modules/core/licenses/cache-api-license.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-JSR-000107 JCACHE 2.9 Public Review - Updated Specification
-
-ORACLE AND GREG LUCK ARE WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT ("AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THEM, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE AND THE DOWNLOADING PROCESS WILL NOT CONTINUE.
-Specification: JSR-000107 Java(tm) Temporary Caching API Specification ("Specification")
-Version: 2.9
-Status: Public Review
-Release: 8 August 2013
-
-Copyright 2013 ORACLE America, Inc. and Greg Luck
-4150 Network Circle, Santa Clara, California 95054, U.S.A
-All rights reserved.
-NOTICE
-The Specification is protected by copyright and the information described therein may be protected by one or more U.S. patents, foreign patents, or pending applications. Except as provided under the following license, no part of the Specification may be reproduced in any form by any means without the prior written authorization of Oracle USA, Inc. ("Oracle"), Greg Luck ("Greg Luck") and their licensors, if any. Any use of the Specification and the information described therein will be governed by the terms and conditions of this Agreement.
-
-Subject to the terms and conditions of this license, including your compliance with Paragraphs 1 and 2 below, Oracle and Greg Luck hereby grant you a fully-paid, non-exclusive, non-transferable, limited license (without the right to sublicense) under Oracle and Greg Luck's intellectual property rights to:
-
-1.Review the Specification for the purposes of evaluation. This includes: (i) developing implementations of the Specification for your internal, non-commercial use; (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Technology. 2.Distribute implementations of the Specification to third parties for their testing and evaluation use, provided that any such implementation:
-(i) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented;
-(ii) is clearly and prominently marked with the word "UNTESTED" or "EARLY ACCESS" or "INCOMPATIBLE" or "UNSTABLE" or "BETA" in any list of available builds and in proximity to every link initiating its download, where the list or link is under Licensee's control; and
-(iii) includes the following notice:
-"This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP." The grant set forth above concerning your distribution of implementations of the specification is contingent upon your agreement to terminate development and distribution of your "early draft" implementation as soon as feasible following final completion of the specification. If you fail to do so, the foregoing grant shall be considered null and void. No provision of this Agreement shall be understood to restrict your ability to make and distribute to third parties applications written to the Specification. Other than this limited license, you acquire no right, title or interest in or to the Specification or any other Oracle or Greg Luck intellectual property, and the Specification may only be used in accordance with the license terms set forth herein.
  This license will expire on the earlier of: (a) two (2) years from the date of Release listed above; (b) the date on which the final version of the Specification is publicly released; or (c) the date on which the Java Specification Request (JSR) to which the Specification corresponds is withdrawn. In addition, this license will terminate immediately without notice from Oracle or Greg Luck if you fail to comply with any provision of this license. Upon termination, you must cease use of or destroy the Specification. "Licensor Name Space" means the public class or interface declarations whose names begin with "java", "javax", "com.oracle" or their equivalents in any subsequent naming convention adopted by Oracle or Greg Luck through the Java Community Process, or any recognized successors or replacements thereof
-
-TRADEMARKS
-No right, title, or interest in or to any trademarks, service marks, or trade names of Oracle, Greg Luck or their licensors is granted hereunder. Oracle, the Oracle logo, Java are trademarks or registered trademarks of Oracle USA, Inc. in the U.S. and other countries.
-
-DISCLAIMER OF WARRANTIES
-THE SPECIFICATION IS PROVIDED "AS IS" AND IS EXPERIMENTAL AND MAY CONTAIN DEFECTS OR DEFICIENCIES WHICH CANNOT OR WILL NOT BE CORRECTED BY ORACLE. ORACLE MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE OR THAT ANY PRACTICE OR IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER RIGHTS. This document does not represent any commitment to release or implement any portion of the Specification in any product.
-
-THE SPECIFICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY. ORACLE MAY MAKE IMPROVEMENTS AND/OR CHANGES TO THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY TIME. Any use of such changes in the Specification will be governed by the then-current license for the applicable version of the Specification.
-
-LIMITATION OF LIABILITY
-TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ORACLE OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO ANY FURNISHING, PRACTICING, MODIFYING OR ANY USE OF THE SPECIFICATION, EVEN IF ORACLE AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-You will hold Oracle and Greg Luck (and their licensors) harmless from any claims based on your use of the Specification for any purposes other than the limited right of evaluation as described above, and from any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
-
-RESTRICTED RIGHTS LEGEND
-If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
-
-REPORT
-You may wish to report any ambiguities, inconsistencies or inaccuracies you may find in connection with your evaluation of the Specification ("Feedback"). To the extent that you provide Oracle or Greg Luck with any Feedback, you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Oracle and Greg Luck a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose related to the Specification and future versions, implementations, and test suites thereof.
-
-GENERAL TERMS
-Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
-
-The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
-
-This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/geospatial/licenses/jts-lgpl-license.txt
----------------------------------------------------------------------
diff --git a/modules/geospatial/licenses/jts-lgpl-license.txt b/modules/geospatial/licenses/jts-lgpl-license.txt
deleted file mode 100644
index 474a6dc..0000000
--- a/modules/geospatial/licenses/jts-lgpl-license.txt
+++ /dev/null
@@ -1,165 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
-Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-  This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
-  0. Additional Definitions.
-
-  As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
-  "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
-  An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
-  A "Combined Work" is a work produced by combining or linking an
-Application with the Library.  The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
-  The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
-  The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
-  1. Exception to Section 3 of the GNU GPL.
-
-  You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
-  2. Conveying Modified Versions.
-
-  If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
-   a) under this License, provided that you make a good faith effort to
-   ensure that, in the event an Application does not supply the
-   function or data, the facility still operates, and performs
-   whatever part of its purpose remains meaningful, or
-
-   b) under the GNU GPL, with none of the additional permissions of
-   this License applicable to that copy.
-
-  3. Object Code Incorporating Material from Library Header Files.
-
-  The object code form of an Application may incorporate material from
-a header file that is part of the Library.  You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
-   a) Give prominent notice with each copy of the object code that the
-   Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the object code with a copy of the GNU GPL and this license
-   document.
-
-  4. Combined Works.
-
-  You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
-   a) Give prominent notice with each copy of the Combined Work that
-   the Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the Combined Work with a copy of the GNU GPL and this license
-   document.
-
-   c) For a Combined Work that displays copyright notices during
-   execution, include the copyright notice for the Library among
-   these notices, as well as a reference directing the user to the
-   copies of the GNU GPL and this license document.
-
-   d) Do one of the following:
-
-       0) Convey the Minimal Corresponding Source under the terms of this
-       License, and the Corresponding Application Code in a form
-       suitable for, and under terms that permit, the user to
-       recombine or relink the Application with a modified version of
-       the Linked Version to produce a modified Combined Work, in the
-       manner specified by section 6 of the GNU GPL for conveying
-       Corresponding Source.
-
-       1) Use a suitable shared library mechanism for linking with the
-       Library.  A suitable mechanism is one that (a) uses at run time
-       a copy of the Library already present on the user's computer
-       system, and (b) will operate properly with a modified version
-       of the Library that is interface-compatible with the Linked
-       Version.
-
-   e) Provide Installation Information, but only if you would otherwise
-   be required to provide such information under section 6 of the
-   GNU GPL, and only to the extent that such information is
-   necessary to install and execute a modified version of the
-   Combined Work produced by recombining or relinking the
-   Application with a modified version of the Linked Version. (If
-   you use option 4d0, the Installation Information must accompany
-   the Minimal Corresponding Source and Corresponding Application
-   Code. If you use option 4d1, you must provide the Installation
-   Information in the manner specified by section 6 of the GNU GPL
-   for conveying Corresponding Source.)
-
-  5. Combined Libraries.
-
-  You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
-   a) Accompany the combined library with a copy of the same work based
-   on the Library, uncombined with any other library facilities,
-   conveyed under the terms of this License.
-
-   b) Give prominent notice with the combined library that part of it
-   is a work based on the Library, and explaining where to find the
-   accompanying uncombined form of the same work.
-
-  6. Revised Versions of the GNU Lesser General Public License.
-
-  The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-  Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
-  If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/hadoop/licenses/asm-bsd-license.txt
----------------------------------------------------------------------
diff --git a/modules/hadoop/licenses/asm-bsd-license.txt b/modules/hadoop/licenses/asm-bsd-license.txt
deleted file mode 100644
index 7676ba5..0000000
--- a/modules/hadoop/licenses/asm-bsd-license.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 2000-2011 INRIA, France Telecom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/hibernate/licenses/hibernate-lgpl-2.1-license.txt
----------------------------------------------------------------------
diff --git a/modules/hibernate/licenses/hibernate-lgpl-2.1-license.txt b/modules/hibernate/licenses/hibernate-lgpl-2.1-license.txt
deleted file mode 100644
index abbd747..0000000
--- a/modules/hibernate/licenses/hibernate-lgpl-2.1-license.txt
+++ /dev/null
@@ -1,174 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 2.1, February 1999
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
-
-This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
-
-When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
-
-To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
-
-For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
-
-We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
-
-To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
-
-Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
-
-Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
-
-When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
-
-We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
-
-For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
-
-In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
-
-Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
-
-The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
-
-The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
-
-1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-a) The modified work must itself be a software library.
-b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
-c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
-d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
-(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
-
-5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
-
-However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
-
-When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
-
-If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
-
-6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
-
-You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
-
-a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
-b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
-c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
-d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
-e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
-For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
-
-7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
-
-a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
-b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
-8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
-
-10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
-
-11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
-
-14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Libraries
-
-If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
-
-To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
-
-one line to give the library's name and an idea of what it does.
-Copyright (C) year  name of author
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
-
-Yoyodyne, Inc., hereby disclaims all copyright interest in
-the library `Frob' (a library for tweaking knobs) written
-by James Random Hacker.
-
-signature of Ty Coon, 1 April 1990
-Ty Coon, President of Vice
-That's all there is to it!
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3066b4a9/modules/indexing/licenses/h2-epl-license.txt
----------------------------------------------------------------------
diff --git a/modules/indexing/licenses/h2-epl-license.txt b/modules/indexing/licenses/h2-epl-license.txt
deleted file mode 100644
index f5f0c89..0000000
--- a/modules/indexing/licenses/h2-epl-license.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Eclipse Public License, Version 1.0 (EPL-1.0)
-(plain text)
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the Program.
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file


[46/50] [abbrv] incubator-ignite git commit: # ignite-1095 guard from concurrent remap (cherry picked from commit b19ed0c)

Posted by sb...@apache.org.
# ignite-1095 guard from concurrent remap (cherry picked from commit b19ed0c)


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

Branch: refs/heads/ignite-901
Commit: 24f8961c098534beb399dbeee7dfd61e053c3f2e
Parents: d5ed494
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 14 16:55:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 14 16:40:58 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 20 +++++++++++++++-----
 ...eAtomicInvalidPartitionHandlingSelfTest.java |  2 +-
 ...acheAtomicReplicatedNodeRestartSelfTest.java | 15 ---------------
 4 files changed, 18 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24f8961c/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 1670994..96e6edc 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
@@ -142,7 +142,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 }
 
                 // Request should be for primary keys only in PRIMARY ordering mode.
-                assert req.hasPrimary();
+                assert req.hasPrimary() : req;
 
                 if (req.writeSynchronizationMode() != FULL_ASYNC)
                     sendNearUpdateReply(res.nodeId(), res);
@@ -2158,7 +2158,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
      */
     private void unlockEntries(Collection<GridDhtCacheEntry> locked, AffinityTopologyVersion topVer) {
         // Process deleted entries before locks release.
-        assert ctx.deferredDelete();
+        assert ctx.deferredDelete() : this;
 
         // Entries to skip eviction manager notification for.
         // Enqueue entries while holding locks.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24f8961c/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 41cc400..751c9ba 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
@@ -358,8 +358,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
      * @param failed Keys to remap.
      */
     private void remap(Collection<?> failed) {
-        if (futVer != null)
-            cctx.mvcc().removeAtomicFuture(version());
+        GridCacheVersion futVer0 = futVer;
+
+        if (futVer0 == null || cctx.mvcc().removeAtomicFuture(futVer0) == null)
+            return;
 
         Collection<Object> remapKeys = new ArrayList<>(failed.size());
         Collection<Object> remapVals = vals != null ? new ArrayList<>(failed.size()) : null;
@@ -444,6 +446,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
 
         if (err != null && X.hasCause(err, CachePartialUpdateCheckedException.class) &&
             X.hasCause(err, ClusterTopologyCheckedException.class) &&
+            storeFuture() &&
             remapCnt.decrementAndGet() > 0) {
 
             CachePartialUpdateCheckedException cause = X.cause(err, CachePartialUpdateCheckedException.class);
@@ -646,6 +649,13 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
     }
 
     /**
+     * @return {@code True} future is stored by {@link GridCacheMvccManager#addAtomicFuture}.
+     */
+    private boolean storeFuture() {
+        return cctx.config().getAtomicWriteOrderMode() == CLOCK || syncMode != FULL_ASYNC;
+    }
+
+    /**
      * @param topVer Topology version.
      * @param remapKeys Keys to remap or {@code null} to map all keys.
      * @param remap Flag indicating if this is partial remap for this future.
@@ -671,7 +681,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
             // Assign future version in topology read lock before first exception may be thrown.
             futVer = cctx.versions().next(topVer);
 
-        if (!remap && (cctx.config().getAtomicWriteOrderMode() == CLOCK || syncMode != FULL_ASYNC))
+        if (!remap && storeFuture())
             cctx.mvcc().addAtomicFuture(version(), this);
 
         CacheConfiguration ccfg = cctx.config();
@@ -998,7 +1008,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
                     @Override public void apply(GridNearAtomicUpdateRequest req,
                         GridNearAtomicUpdateResponse res) {
-                        assert res.futureVersion().equals(futVer);
+                        assert res.futureVersion().equals(futVer) : futVer;
 
                         onResult(res.nodeId(), res);
                     }
@@ -1065,7 +1075,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
                     @Override public void apply(GridNearAtomicUpdateRequest req,
                         GridNearAtomicUpdateResponse res) {
-                        assert res.futureVersion().equals(futVer);
+                        assert res.futureVersion().equals(futVer) : futVer;
 
                         onResult(res.nodeId(), res);
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24f8961c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 8e69853..d3bcf67 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -269,7 +269,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
 
                     return null;
                 }
-            }, 4);
+            }, 4, "putAll-thread");
 
             Random rnd = new Random();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24f8961c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
index b4ed18d..f556023 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
@@ -26,21 +26,6 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
  */
 public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheReplicatedNodeRestartSelfTest {
     /** {@inheritDoc} */
-    @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1095");
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1095");
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1095");
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }


[43/50] [abbrv] incubator-ignite git commit: Fixed build.

Posted by sb...@apache.org.
Fixed build.


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

Branch: refs/heads/ignite-901
Commit: 8870668c586c3faf52b23a4e14252438b0623c47
Parents: cf78f23
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jul 13 13:29:30 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jul 13 13:34:03 2015 +0300

----------------------------------------------------------------------
 modules/mesos/pom.xml | 2 ++
 modules/yarn/pom.xml  | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8870668c/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 15a6c0c..331083e 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -78,11 +78,13 @@
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
+                    <finalName>${project.artifactId}-${project.version}-full</finalName>
                     <archive>
                         <manifest>
                             <mainClass>org.apache.ignite.mesos.IgniteFramework</mainClass>
                         </manifest>
                     </archive>
+                    <appendAssemblyId>false</appendAssemblyId>
                 </configuration>
                 <executions>
                     <execution>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8870668c/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index 8ac1aea..e87c7df 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -78,11 +78,13 @@
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
+                    <finalName>${project.artifactId}-${project.version}-full</finalName>
                     <archive>
                         <manifest>
                             <mainClass>org.apache.ignite.yarn.IgniteYarnClient</mainClass>
                         </manifest>
                     </archive>
+                    <appendAssemblyId>false</appendAssemblyId>
                 </configuration>
                 <executions>
                     <execution>


[29/50] [abbrv] incubator-ignite git commit: Fixed notes.

Posted by sb...@apache.org.
Fixed notes.


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

Branch: refs/heads/ignite-901
Commit: 8c6687944643853a85fc56246e42a811d249f497
Parents: 7e0aef7
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 18:20:42 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 18:24:55 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |  8 ++++++
 .../apache/ignite/mesos/ClusterProperties.java  | 14 +++++++++++
 .../apache/ignite/mesos/IgniteScheduler.java    | 26 +++++++++++++++-----
 parent/pom.xml                                  |  4 +++
 4 files changed, 46 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index d7cffa7..b5e556a 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -99,6 +99,14 @@ mvn clean package
 
 Look for ignite-mesos-<version>-jar-with-dependencies.jar in ./target directory.
 
+Ignite Yarn Maven Build Instructions
+============================================
+cd to ./modules/yarn
+
+mvn clean package
+
+Look for ignite-yarn-<version>-jar-with-dependencies.jar in ./target directory.
+
 Run tests
 ==========
 To run tests locally use:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
index a97a97f..548b4bb 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
@@ -169,6 +169,12 @@ public class ClusterProperties {
     private String userLibsUrl = null;
 
     /** */
+    public static final String LICENCE_URL = "LICENCE_URL";
+
+    /** Licence url. */
+    private String licenceUrl = null;
+
+    /** */
     public static final String IGNITE_CONFIG_XML = "IGNITE_XML_CONFIG";
 
     /** Ignite config. */
@@ -398,6 +404,13 @@ public class ClusterProperties {
     }
 
     /**
+     * @return Url to licence.
+     */
+    public String licenceUrl() {
+        return licenceUrl;
+    }
+
+    /**
      * @return Host name constraint.
      */
     public Pattern hostnameConstraint() {
@@ -436,6 +449,7 @@ public class ClusterProperties {
 
             prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null);
             prop.ignitePackageUrl = getStringProperty(IGNITE_PACKAGE_URL, props, null);
+            prop.licenceUrl = getStringProperty(LICENCE_URL, props, null);
             prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null);
 
             prop.cpu = getDoubleProperty(IGNITE_TOTAL_CPU, props, UNLIMITED);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
index 7795a31..9097d64 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
@@ -147,14 +147,18 @@ public class IgniteScheduler implements Scheduler {
 
         String cfgName = resourceProvider.configName();
 
-        if (clusterProps.igniteConfigUrl() != null) {
-            String[] split = clusterProps.igniteConfigUrl().split("/");
+        if (clusterProps.igniteConfigUrl() != null)
+            cfgName = fileName(clusterProps.igniteConfigUrl());
 
-            cfgName = split[split.length - 1];
-        }
+        String licenceFile = null;
+
+        if (clusterProps.licenceUrl() != null)
+            licenceFile = fileName(clusterProps.licenceUrl());
 
-        builder.setValue("find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./gridgain-community-*/libs/ \\; && "
-            + "./gridgain-community-*/bin/ignite.sh "
+        builder.setValue(
+            (licenceFile != null ? "find . -maxdepth 1 -name \"" + licenceFile + "\" -exec cp {} ./*/ \\; && " : "")
+            + "find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./*/libs/ \\; && "
+            + "./*/bin/ignite.sh "
             + cfgName
             + " -J-Xmx" + String.valueOf((int)igniteTask.mem() + "m")
             + " -J-Xms" + String.valueOf((int)igniteTask.mem()) + "m");
@@ -180,6 +184,16 @@ public class IgniteScheduler implements Scheduler {
     }
 
     /**
+     * @param path Path.
+     * @return File name.
+     */
+    private String fileName(String path) {
+        String[] split = path.split("/");
+
+        return split[split.length - 1];
+    }
+
+    /**
      * @return Address running nodes.
      */
     private String getAddress(String address) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index bfa9f62..5eecff7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -323,6 +323,10 @@
                                 <packages>org.apache.ignite.mesos*</packages>
                             </group>
                             <group>
+                                <title>Yarn Integration</title>
+                                <packages>org.apache.ignite.yarn*</packages>
+                            </group>
+                            <group>
                                 <title>Spark Integration</title>
                                 <packages>org.apache.ignite.spark.examples.java</packages>
                             </group>


[32/50] [abbrv] incubator-ignite git commit: # IGNITE-1097 (IgniteFuture.chain() unwraps exceptions incorrectly.) (cherry picked from commit b131c81)

Posted by sb...@apache.org.
# IGNITE-1097 (IgniteFuture.chain() unwraps exceptions incorrectly.)
(cherry picked from commit b131c81)


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

Branch: refs/heads/ignite-901
Commit: 98c57e00676dd22e7f92c3c95b85c6039f902021
Parents: 3dcf891
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 16:04:54 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:35 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheFutureImpl.java |  6 ++++
 .../internal/util/future/IgniteFutureImpl.java  | 12 ++++++--
 .../cache/GridCacheAbstractFullApiSelfTest.java | 32 ++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
index 06c28e6..42e31d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 
 /**
  * Implementation of public API future for cache.
@@ -36,6 +37,11 @@ public class IgniteCacheFutureImpl<V> extends IgniteFutureImpl<V> {
     }
 
     /** {@inheritDoc} */
+    @Override public <T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
+        return new IgniteCacheFutureImpl<>(chainInternal(doneCb));
+    }
+
+    /** {@inheritDoc} */
     @Override protected RuntimeException convertException(IgniteCheckedException e) {
         return CU.convertToCacheException(e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
index 764e0ea..13d564d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
@@ -78,7 +78,15 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
 
     /** {@inheritDoc} */
     @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
-        IgniteInternalFuture<T> fut0 = fut.chain(new C1<IgniteInternalFuture<V>, T>() {
+        return new IgniteFutureImpl<>(chainInternal(doneCb));
+    }
+
+    /**
+     * @param doneCb Done callback.
+     * @return Internal future
+     */
+    protected  <T> IgniteInternalFuture<T> chainInternal(final IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
+        return fut.chain(new C1<IgniteInternalFuture<V>, T>() {
             @Override public T apply(IgniteInternalFuture<V> fut) {
                 assert IgniteFutureImpl.this.fut == fut;
 
@@ -90,8 +98,6 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
                 }
             }
         });
-
-        return new IgniteFutureImpl<>(fut0);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/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 151c249..3f9c365 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
@@ -62,6 +62,14 @@ import static org.apache.ignite.transactions.TransactionState.*;
  * Full API cache test.
  */
 public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
+    /** */
+    public static final CacheEntryProcessor<String, Integer, String> ERR_PROCESSOR =
+        new CacheEntryProcessor<String, Integer, String>() {
+            @Override public String process(MutableEntry<String, Integer> e, Object... args) {
+                throw new RuntimeException("Failed!");
+            }
+        };
+    
     /** Increment processor for invoke operations. */
     public static final EntryProcessor<String, Integer, String> INCR_PROCESSOR = new EntryProcessor<String, Integer, String>() {
         @Override public String process(MutableEntry<String, Integer> e, Object... args) {
@@ -4993,6 +5001,30 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testTransformException() throws Exception {
+        final IgniteCache<String, Integer> cache = jcache().withAsync();
+        
+        cache.invoke("key2", ERR_PROCESSOR);
+
+        assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+
+                IgniteFuture fut = cache.future().chain(new IgniteClosure<IgniteFuture, Object>() {
+                    @Override public Object apply(IgniteFuture o) {
+                        return o.get();
+                    }
+                });
+
+                fut.get();
+
+                return null;
+            }
+        }, EntryProcessorException.class, null);
+    }
+    
+    /**
      * Sets given value, returns old value.
      */
     public static final class SetValueProcessor implements EntryProcessor<String, Integer, Integer> {


[02/50] [abbrv] incubator-ignite git commit: #IGNITE-857 WIP

Posted by sb...@apache.org.
#IGNITE-857 WIP


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

Branch: refs/heads/ignite-901
Commit: 81cde9b71b3ab88023f68fa6f3bee86f20442412
Parents: b569191
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Wed Jun 3 18:37:02 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Wed Jun 3 18:37:02 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 51 +++++++++++++++-----
 .../apache/ignite/yarn/IgniteYarnClient.java    | 15 ++----
 2 files changed, 45 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81cde9b7/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 9ab70d4..532830c 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
@@ -19,6 +19,9 @@ package org.apache.ignite.yarn;
 
 import com.google.common.collect.Lists;
 import org.apache.hadoop.conf.*;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.yarn.api.*;
 import org.apache.hadoop.yarn.api.protocolrecords.*;
 import org.apache.hadoop.yarn.api.records.*;
@@ -33,27 +36,33 @@ import java.util.*;
  * TODO
  */
 public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
-    Configuration configuration;
+    YarnConfiguration configuration;
     NMClient nmClient;
-    int numContainersToWaitFor = 5;
+    int numContainersToWaitFor = 1;
 
     public ApplicationMaster() {
         configuration = new YarnConfiguration();
+
         nmClient = NMClient.createNMClient();
         nmClient.init(configuration);
         nmClient.start();
     }
 
+    /** {@inheritDoc} */
     public void onContainersAllocated(List<Container> containers) {
         for (Container container : containers) {
             try {
                 // Launch container by create ContainerLaunchContext
-                // bin/hadoop fs -rm /user/ntikhonov/*.jar && bin/hadoop fs -copyFromLocal ./ignite-yarn.jar /user/ntikhonov
-                ContainerLaunchContext ctx =
-                        Records.newRecord(ContainerLaunchContext.class);
+                ContainerLaunchContext ctx = Records.newRecord(ContainerLaunchContext.class);
+
+                final LocalResource igniteZip = Records.newRecord(LocalResource.class);
+                setupAppMasterJar(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6.zip"), igniteZip,
+                    configuration);
+
+                ctx.setLocalResources(Collections.singletonMap("ignite", igniteZip));
                 ctx.setCommands(
                         Lists.newArrayList(
-                                "ls " +
+                                "$LOCAL_DIRS/ignite/*/bin/ignite.sh" +
                                 " 1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" +
                                 " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr"
                         ));
@@ -65,6 +74,24 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         }
     }
 
+    /** {@inheritDoc} */
+    private static void setupAppMasterJar(Path jarPath, LocalResource appMasterJar, YarnConfiguration conf)
+        throws Exception {
+        FileSystem fileSystem = FileSystem.get(conf);
+        jarPath = fileSystem.makeQualified(jarPath);
+
+        FileStatus jarStat = fileSystem.getFileStatus(jarPath);
+
+        appMasterJar.setResource(ConverterUtils.getYarnUrlFromPath(jarPath));
+        appMasterJar.setSize(jarStat.getLen());
+        appMasterJar.setTimestamp(jarStat.getModificationTime());
+        appMasterJar.setType(LocalResourceType.ARCHIVE);
+        appMasterJar.setVisibility(LocalResourceVisibility.APPLICATION);
+
+        System.out.println("Path :" + jarPath);
+    }
+
+    /** {@inheritDoc} */
     public void onContainersCompleted(List<ContainerStatus> statuses) {
         for (ContainerStatus status : statuses) {
             System.out.println("[AM] Completed container " + status.getContainerId());
@@ -74,20 +101,21 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         }
     }
 
+    /** {@inheritDoc} */
     public void onNodesUpdated(List<NodeReport> updated) {
     }
 
-    public void onReboot() {
-    }
-
+    /** {@inheritDoc} */
     public void onShutdownRequest() {
     }
 
+    /** {@inheritDoc} */
     public void onError(Throwable t) {
     }
 
+    /** {@inheritDoc} */
     public float getProgress() {
-        return 0;
+        return 50;
     }
 
     public boolean doneWithContainers() {
@@ -101,7 +129,6 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     public static void main(String[] args) throws Exception {
         ApplicationMaster master = new ApplicationMaster();
         master.runMainLoop();
-
     }
 
     public void runMainLoop() throws Exception {
@@ -136,6 +163,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
             Thread.sleep(100);
         }
 
+
+
         System.out.println("[AM] unregisterApplicationMaster 0");
         // Un-register with ResourceManager
         rmClient.unregisterApplicationMaster(

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81cde9b7/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index e020ef4..092aaa9 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -74,20 +74,15 @@ public class IgniteYarnClient {
         final LocalResource igniteZip = Records.newRecord(LocalResource.class);
         setupAppMasterJar(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6.zip"), igniteZip, conf);
 
-        FileSystem fileSystem = FileSystem.get(conf);
-
-        Path path = fileSystem.makeQualified(new Path("/user/ntikhonov/gridgain-community-fabric-1.0.6/bin/ignite.sh"));
-
-        System.out.println("Path: " + path);
-        System.out.println("Path URI: " + path.toUri().toString());
-
-        amContainer.setLocalResources(new HashMap<String, LocalResource>(){{
+        amContainer.setLocalResources(new HashMap<String, LocalResource>() {{
             put("ignite-yarn.jar", appMasterJar);
-            put("ignite", igniteZip);
+            put("gridgain-community-fabric-1.0.6.zip", igniteZip);
         }});
 
+
+
         // Setup CLASSPATH for ApplicationMaster
-        Map<String, String> appMasterEnv = new HashMap<String, String>();
+        Map<String, String> appMasterEnv = new HashMap<>();
         setupAppMasterEnv(appMasterEnv, conf);
         amContainer.setEnvironment(appMasterEnv);
 


[04/50] [abbrv] incubator-ignite git commit: #YARN WIP

Posted by sb...@apache.org.
#YARN WIP


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

Branch: refs/heads/ignite-901
Commit: 12d9c02cf6443551cf903e6caac455201cfc0043
Parents: 85f4a89
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Fri Jun 5 19:37:23 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Fri Jun 5 19:37:23 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 35 ++++++++++++--------
 1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12d9c02c/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 95197b7..fe065a3 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
@@ -19,6 +19,7 @@ package org.apache.ignite.yarn;
 
 import org.apache.commons.io.*;
 import org.apache.hadoop.fs.*;
+import org.apache.hadoop.service.Service;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
 import org.apache.hadoop.yarn.client.api.async.*;
@@ -198,29 +199,37 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
         Priority priority = Records.newRecord(Priority.class);
         priority.setPriority(0);
 
-        // Resource requirements for worker containers
-        Resource capability = Records.newRecord(Resource.class);
-        capability.setMemory(1024);
-        capability.setVirtualCores(2);
+        // Check ignite cluster.
+        while (!nmClient.isInState(Service.STATE.STOPPED)) {
+            Resource availableRes = rmClient.getAvailableResources();
 
-        // Make container requests to ResourceManager
-        for (int i = 0; i < 1; ++i) {
-            AMRMClient.ContainerRequest containerAsk =
-                new AMRMClient.ContainerRequest(capability, null, null, priority);
+            if (containers.size() < props.instances() || availableRes.getMemory() >= props.cpusPerNode()
+                || availableRes.getVirtualCores() >= props.cpus()) {
+                // Resource requirements for worker containers
+                Resource capability = Records.newRecord(Resource.class);
+                capability.setMemory(1024);
+                capability.setVirtualCores(2);
 
-            System.out.println("[AM] Making res-req " + i);
+                for (int i = 0; i < 1; ++i) {
+                    // Make container requests to ResourceManager
+                    AMRMClient.ContainerRequest containerAsk =
+                            new AMRMClient.ContainerRequest(capability, null, null, priority);
 
-            rmClient.addContainerRequest(containerAsk);
+                    System.out.println("[AM] Making res-req " + i);
+
+                    rmClient.addContainerRequest(containerAsk);
+                }
+            }
+
+            TimeUnit.SECONDS.sleep(5);
         }
 
         System.out.println("[AM] waiting for containers to finish");
 
-        TimeUnit.MINUTES.sleep(10);
-
         System.out.println("[AM] unregisterApplicationMaster 0");
 
         // Un-register with ResourceManager
-        rmClient.unregisterApplicationMaster(FinalApplicationStatus.SUCCEEDED, "", "");
+        rmClient.unregisterApplicationMaster(FinalApplicationStatus.KILLED, "", "");
 
         System.out.println("[AM] unregisterApplicationMaster 1");
     }


[40/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-1.3' and 'ignite-1067' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1.3_

Posted by sb...@apache.org.
Merge branches 'ignite-1.3' and 'ignite-1067' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1.3_


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

Branch: refs/heads/ignite-901
Commit: 4da2ff277c6fbae556d3ecc2fa33780d5a1fe963
Parents: 5f28cce 3dcda26
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 10 17:57:12 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 10 17:57:12 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         | 317 +++++++++++++++++++
 assembly/LICENSE_HADOOP                         | 270 ++++++++++++++++
 assembly/NOTICE_FABRIC                          |  13 +
 assembly/NOTICE_HADOOP                          |  12 +
 assembly/dependencies-fabric.xml                |  13 +
 assembly/dependencies-hadoop.xml                |  12 +
 assembly/dependencies-visor-console.xml         |  20 +-
 assembly/release-base.xml                       |  10 -
 assembly/release-fabric.xml                     |  12 +
 assembly/release-hadoop.xml                     |  12 +
 modules/aop/licenses/aspectj-epl-license.txt    |  69 ----
 modules/apache-license-gen/pom.xml              |  48 +++
 .../src/main/resources/META-INF/licenses.txt.vm |  44 +++
 .../geospatial/licenses/jts-lgpl-license.txt    | 165 ----------
 .../licenses/hibernate-lgpl-2.1-license.txt     | 174 ----------
 modules/indexing/licenses/h2-epl-license.txt    |  69 ----
 modules/mesos/licenses/jetty-epl-license.txt    |  69 ----
 modules/rest-http/pom.xml                       |   6 +-
 .../scalar-2.10/licenses/scala-bsd-license.txt  |  18 --
 modules/scalar/licenses/scala-bsd-license.txt   |  18 --
 .../licenses/cron4j-lgpl-2.1-license.txt        | 174 ----------
 modules/slf4j/licenses/sl4j-mit-license.txt     |  21 --
 .../spark-2.10/licenses/scala-bsd-license.txt   |  18 --
 modules/spark/licenses/scala-bsd-license.txt    |  18 --
 modules/ssh/licenses/jcraft-revised-bsd.txt     |  28 --
 modules/tools/licenses/jodd-revised-bsd.txt     |  21 --
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 ---
 modules/urideploy/pom.xml                       |   6 +-
 .../licenses/jline-bsd-license.txt              |  18 --
 .../licenses/scala-bsd-license.txt              |  18 --
 .../licenses/slf4j-mit-license.txt              |  21 --
 modules/web/pom.xml                             |   6 +-
 parent/pom.xml                                  |  51 +++
 pom.xml                                         |   1 +
 34 files changed, 833 insertions(+), 989 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4da2ff27/parent/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4da2ff27/pom.xml
----------------------------------------------------------------------


[22/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1067

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1067

Conflicts:
	modules/rest-http/pom.xml
	modules/web/pom.xml


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

Branch: refs/heads/ignite-901
Commit: a1e7d11bdc36957c0f5dcd42daa36aeb54ba4358
Parents: deb0ab3
Author: Anton <av...@gridgain.com>
Authored: Tue Jul 7 13:59:59 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Tue Jul 7 13:59:59 2015 +0300

----------------------------------------------------------------------
 .../src/main/resources/META-INF/licenses.txt.vm                | 6 +++---
 parent/pom.xml                                                 | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1e7d11b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
index 5d812e3..32c6c09 100644
--- a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
+++ b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
@@ -24,15 +24,15 @@
 // ------------------------------------------------------------------
 #foreach ( $organizationName in $projectsSortedByOrganization.keySet() )
 #foreach ( $project in $projectsSortedByOrganization.get( $organizationName ) )
-##if($project.licenses.size() == 1 && $project.licenses.get(0).name.contains("Apache Software License"))#else
+#if($project.licenses.size() == 1 && $project.licenses.get(0).url.contains("www.apache.org/licenses/LICENSE-2.0") && !$project.licenses.get(0).url.contains("and"))#else
   - $project.name #if ($project.url)($project.url)#end $project.artifact
 #foreach ( $license in $project.licenses )
     License: $license.name #if ($license.url) ($license.url)#end
+
 #end
 #if ($project.licenses.size() == 0)    No licenses.#end
 
-
-##end
+#end
 #end
 #end
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1e7d11b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 8724fa4..43e7607 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -585,7 +585,6 @@
                                         <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
                                     </resourceBundles>
                                     <excludeTransitive>true</excludeTransitive>
-                                    <excludeGroupIds>org.apache</excludeGroupIds>
                                 </configuration>
                             </execution>
                         </executions>


[30/50] [abbrv] incubator-ignite git commit: Fixed build.

Posted by sb...@apache.org.
Fixed build.


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

Branch: refs/heads/ignite-901
Commit: 9dcca80a74ae02e6824ee07080cd6ed8eb1a0940
Parents: 8c66879
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 10 10:02:20 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 10 10:02:20 2015 +0300

----------------------------------------------------------------------
 modules/yarn/pom.xml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9dcca80a/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index f51b0e8..1471ac7 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -23,9 +23,15 @@
 <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>
 
-    <groupId>org.apache.ignite</groupId>
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../parent</relativePath>
+    </parent>
+
     <artifactId>ignite-yarn</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <hadoop.version>2.7.0</hadoop.version>


[11/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: 808089eb6f238a9ca6ab96b99d490ed1e62f0584
Parents: bc282e2
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Thu Jun 11 12:51:19 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Thu Jun 11 12:51:19 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/808089eb/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 bdc6f9a..acda940 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
@@ -216,6 +216,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
     /** {@inheritDoc} */
     public void onShutdownRequest() {
+        // No-op.
     }
 
     /** {@inheritDoc} */


[45/50] [abbrv] incubator-ignite git commit: release notes

Posted by sb...@apache.org.
release notes


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

Branch: refs/heads/ignite-901
Commit: d5ed4947f299f61a94a7b4856c60908c98eff5da
Parents: ee8820a
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jul 13 14:24:18 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jul 13 14:24:18 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5ed4947/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index f68a339..73ea48b 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -6,6 +6,7 @@ Apache Ignite In-Memory Data Fabric 1.3
 
 * Added auto-retries for cache operations in recoverable cases.
 * Added integration with Apache YARN.
+* Added auto detection and dropping of slow client nodes.
 * Fixed several issues with JTA integration.
 * Fixed several issues with Hibernate L2 cache.
 * Fixed issue with GAR files in source release.


[13/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup.

Posted by sb...@apache.org.
#YARN Code cleanup.


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

Branch: refs/heads/ignite-901
Commit: b02b8dd8eaeff33f96cc3f55ac35460e75c38d58
Parents: 167f1af
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Thu Jun 11 16:31:36 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Thu Jun 11 16:31:36 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b02b8dd8/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 acda940..739a71a 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
@@ -128,7 +128,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                             c.getResource().getMemory()));
                 }
                 catch (Exception ex) {
-                    System.err.println("[AM] Error launching container " + c.getId() + " " + ex);
+                    log.log(Level.WARNING, "Error launching container " + c.getId(), ex);
                 }
             }
             else


[50/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-901

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-901


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

Branch: refs/heads/ignite-901
Commit: f44924a48ff2ab6b85a735a683628a7271138bed
Parents: 3518ba8 13e55b2
Author: sboikov <sb...@gridgain.com>
Authored: Thu Jul 16 11:47:32 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Jul 16 11:47:32 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   8 +
 RELEASE_NOTES.txt                               |   2 +
 assembly/LICENSE_FABRIC                         | 317 +++++++++++
 assembly/LICENSE_HADOOP                         | 270 ++++++++++
 assembly/NOTICE_FABRIC                          |  13 +
 assembly/NOTICE_HADOOP                          |  12 +
 assembly/dependencies-fabric.xml                |  13 +
 assembly/dependencies-hadoop.xml                |  12 +
 assembly/dependencies-visor-console.xml         |  20 +-
 assembly/release-base.xml                       |  10 -
 assembly/release-fabric.xml                     |  12 +
 assembly/release-hadoop.xml                     |  12 +
 modules/aop/licenses/aspectj-epl-license.txt    |  69 ---
 modules/apache-license-gen/pom.xml              |  48 ++
 .../src/main/resources/META-INF/licenses.txt.vm |  44 ++
 .../processors/cache/IgniteCacheFutureImpl.java |   6 +
 .../processors/cache/IgniteCacheProxy.java      |  55 +-
 .../util/future/GridFutureChainListener.java    |   4 -
 .../internal/util/future/IgniteFutureImpl.java  |  12 +-
 .../plugin/security/SecuritySubjectType.java    |   3 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  32 ++
 .../geospatial/licenses/jts-lgpl-license.txt    | 165 ------
 .../licenses/hibernate-lgpl-2.1-license.txt     | 174 ------
 modules/indexing/licenses/h2-epl-license.txt    |  69 ---
 modules/mesos/licenses/jetty-epl-license.txt    |  69 ---
 modules/mesos/pom.xml                           |   1 +
 .../apache/ignite/mesos/ClusterProperties.java  |  14 +
 .../apache/ignite/mesos/IgniteScheduler.java    |  26 +-
 modules/rest-http/pom.xml                       |   6 +-
 .../scalar-2.10/licenses/scala-bsd-license.txt  |  18 -
 modules/scalar/licenses/scala-bsd-license.txt   |  18 -
 .../licenses/cron4j-lgpl-2.1-license.txt        | 174 ------
 modules/slf4j/licenses/sl4j-mit-license.txt     |  21 -
 .../spark-2.10/licenses/scala-bsd-license.txt   |  18 -
 modules/spark/licenses/scala-bsd-license.txt    |  18 -
 modules/ssh/licenses/jcraft-revised-bsd.txt     |  28 -
 modules/tools/licenses/jodd-revised-bsd.txt     |  21 -
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 --
 modules/urideploy/pom.xml                       |   6 +-
 .../licenses/jline-bsd-license.txt              |  18 -
 .../licenses/scala-bsd-license.txt              |  18 -
 .../licenses/slf4j-mit-license.txt              |  21 -
 modules/web/pom.xml                             |   6 +-
 modules/yarn/README.txt                         |  28 +
 modules/yarn/licenses/apache-2.0.txt            | 202 +++++++
 modules/yarn/pom.xml                            | 101 ++++
 .../apache/ignite/yarn/ApplicationMaster.java   | 400 ++++++++++++++
 .../apache/ignite/yarn/ClusterProperties.java   | 432 +++++++++++++++
 .../org/apache/ignite/yarn/IgniteContainer.java |  84 +++
 .../org/apache/ignite/yarn/IgniteProvider.java  | 339 ++++++++++++
 .../apache/ignite/yarn/IgniteYarnClient.java    | 178 +++++++
 .../org/apache/ignite/yarn/package-info.java    |  22 +
 .../ignite/yarn/utils/IgniteYarnUtils.java      |  81 +++
 .../main/resources/ignite-default-config.xml    |  35 ++
 .../org/apache/ignite/IgniteYarnTestSuite.java  |  38 ++
 .../yarn/IgniteApplicationMasterSelfTest.java   | 532 +++++++++++++++++++
 parent/pom.xml                                  |  55 ++
 pom.xml                                         |   2 +
 58 files changed, 3420 insertions(+), 1042 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f44924a4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
index 13af004,42e31d2..9233f24
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
@@@ -36,12 -37,12 +37,17 @@@ public class IgniteCacheFutureImpl<V> e
      }
  
      /** {@inheritDoc} */
+     @Override public <T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
+         return new IgniteCacheFutureImpl<>(chainInternal(doneCb));
+     }
+ 
+     /** {@inheritDoc} */
      @Override protected RuntimeException convertException(IgniteCheckedException e) {
 +        if (e instanceof IgniteFutureCancelledCheckedException ||
 +            e instanceof IgniteInterruptedCheckedException ||
 +            e instanceof IgniteFutureTimeoutCheckedException)
 +            return U.convertException(e);
 +
          return CU.convertToCacheException(e);
      }
  }

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


[15/50] [abbrv] incubator-ignite git commit: ignite-1067

Posted by sb...@apache.org.
ignite-1067


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

Branch: refs/heads/ignite-901
Commit: b1a4c04385b69cb6c24810edb8f17db94c0de973
Parents: 9b18b64
Author: Anton <av...@gridgain.com>
Authored: Wed Jul 1 19:10:28 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Wed Jul 1 19:10:28 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         |  51 +++++++-
 assembly/LICENSE_HADOOP                         |  16 ++-
 modules/aop/licenses/aopalliance-license.txt    |   1 +
 modules/core/licenses/cache-api-license.txt     |  47 +++++++
 modules/hadoop/licenses/asm-bsd-license.txt     |  29 +++++
 modules/jta/jta-cddl-license.txt                | 129 +++++++++++++++++++
 .../rest-http/licenses/jetty-epl-license.txt    |  69 ++++++++++
 .../licenses/servlet-api-cddl-gpl-license.txt   |  35 +++++
 8 files changed, 375 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
index 164d7d3..4329885 100644
--- a/assembly/LICENSE_FABRIC
+++ b/assembly/LICENSE_FABRIC
@@ -253,4 +253,53 @@ For details, see http://opensource.org/licenses/bsd-license.php.
 Scala
 ==============================================================================
 This product bundles Scala, which is available under a BSD license.
-For details, see http://www.scala-lang.org/license.html.
\ No newline at end of file
+For details, see http://www.scala-lang.org/license.html.
+
+==============================================================================
+JCache-API (JSR-107)
+==============================================================================
+This product bundles JCache-API, which is available under a JSR-000107 JCACHE 2.9 Public Review - Updated Specification
+License.
+For details, see https://raw.githubusercontent.com/jsr107/jsr107spec/master/LICENSE.txt.
+
+==============================================================================
+H2
+==============================================================================
+This product bundles H2, which is available under the MPL 2.0 (Mozilla Public License Version 2.0)
+or under the EPL 1.0 (Eclipse Public License).
+For details, see https://www.mozilla.org/MPL/2.0/ and http://opensource.org/licenses/eclipse-1.0.php
+
+==============================================================================
+AOP Alliance
+==============================================================================
+All the source code provided by AOP Alliance is Public Domain.
+
+==============================================================================
+AspectJ
+==============================================================================
+This product bundles AspectJ, which is available under a Eclipse Public License 1.0.
+For details, see https://eclipse.org/legal/epl-v10.html.
+
+==============================================================================
+Java Transaction API
+==============================================================================
+This product bundles Java Transaction API, which is available under a CDDL license.
+For details, see http://opensource.org/licenses/cddl1.php.
+
+==============================================================================
+Jetty
+==============================================================================
+This product bundles Jetty, which is available under a Apache License 2.0 and Eclipse Public License 1.0.
+For details, see https://www.eclipse.org/legal/epl-v10.html.
+
+==============================================================================
+SLF4J
+==============================================================================
+This product bundles SLF4J, which is available under MIT license.
+For details, see http://www.slf4j.org/license.html.
+
+==============================================================================
+JTidy
+==============================================================================
+This product bundles JTidy, which is available under MIT license.
+For details, see http://jtidy.sourceforge.net/license.html.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/assembly/LICENSE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_HADOOP b/assembly/LICENSE_HADOOP
index 164d7d3..09189f8 100644
--- a/assembly/LICENSE_HADOOP
+++ b/assembly/LICENSE_HADOOP
@@ -253,4 +253,18 @@ For details, see http://opensource.org/licenses/bsd-license.php.
 Scala
 ==============================================================================
 This product bundles Scala, which is available under a BSD license.
-For details, see http://www.scala-lang.org/license.html.
\ No newline at end of file
+For details, see http://www.scala-lang.org/license.html.
+
+==============================================================================
+JCache-API (JSR-107)
+==============================================================================
+This product bundles JCache-API, which is available under a JSR-000107 JCACHE 2.9 Public Review - Updated Specification
+License.
+For details, see https://raw.githubusercontent.com/jsr107/jsr107spec/master/LICENSE.txt.
+
+==============================================================================
+ASM
+==============================================================================
+This product bundles ASM, which is available under a BSD license.
+For details, see http://asm.ow2.org/license.html.
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/aop/licenses/aopalliance-license.txt
----------------------------------------------------------------------
diff --git a/modules/aop/licenses/aopalliance-license.txt b/modules/aop/licenses/aopalliance-license.txt
new file mode 100644
index 0000000..6e5f6e6
--- /dev/null
+++ b/modules/aop/licenses/aopalliance-license.txt
@@ -0,0 +1 @@
+All the source code provided by AOP Alliance is Public Domain.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/core/licenses/cache-api-license.txt
----------------------------------------------------------------------
diff --git a/modules/core/licenses/cache-api-license.txt b/modules/core/licenses/cache-api-license.txt
new file mode 100644
index 0000000..2945ab2
--- /dev/null
+++ b/modules/core/licenses/cache-api-license.txt
@@ -0,0 +1,47 @@
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification
+
+ORACLE AND GREG LUCK ARE WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT ("AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THEM, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE AND THE DOWNLOADING PROCESS WILL NOT CONTINUE.
+Specification: JSR-000107 Java(tm) Temporary Caching API Specification ("Specification")
+Version: 2.9
+Status: Public Review
+Release: 8 August 2013
+
+Copyright 2013 ORACLE America, Inc. and Greg Luck
+4150 Network Circle, Santa Clara, California 95054, U.S.A
+All rights reserved.
+NOTICE
+The Specification is protected by copyright and the information described therein may be protected by one or more U.S. patents, foreign patents, or pending applications. Except as provided under the following license, no part of the Specification may be reproduced in any form by any means without the prior written authorization of Oracle USA, Inc. ("Oracle"), Greg Luck ("Greg Luck") and their licensors, if any. Any use of the Specification and the information described therein will be governed by the terms and conditions of this Agreement.
+
+Subject to the terms and conditions of this license, including your compliance with Paragraphs 1 and 2 below, Oracle and Greg Luck hereby grant you a fully-paid, non-exclusive, non-transferable, limited license (without the right to sublicense) under Oracle and Greg Luck's intellectual property rights to:
+
+1.Review the Specification for the purposes of evaluation. This includes: (i) developing implementations of the Specification for your internal, non-commercial use; (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Technology. 2.Distribute implementations of the Specification to third parties for their testing and evaluation use, provided that any such implementation:
+(i) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented;
+(ii) is clearly and prominently marked with the word "UNTESTED" or "EARLY ACCESS" or "INCOMPATIBLE" or "UNSTABLE" or "BETA" in any list of available builds and in proximity to every link initiating its download, where the list or link is under Licensee's control; and
+(iii) includes the following notice:
+"This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP." The grant set forth above concerning your distribution of implementations of the specification is contingent upon your agreement to terminate development and distribution of your "early draft" implementation as soon as feasible following final completion of the specification. If you fail to do so, the foregoing grant shall be considered null and void. No provision of this Agreement shall be understood to restrict your ability to make and distribute to third parties applications written to the Specification. Other than this limited license, you acquire no right, title or interest in or to the Specification or any other Oracle or Greg Luck intellectual property, and the Specification may only be used in accordance with the license terms set forth herein.
  This license will expire on the earlier of: (a) two (2) years from the date of Release listed above; (b) the date on which the final version of the Specification is publicly released; or (c) the date on which the Java Specification Request (JSR) to which the Specification corresponds is withdrawn. In addition, this license will terminate immediately without notice from Oracle or Greg Luck if you fail to comply with any provision of this license. Upon termination, you must cease use of or destroy the Specification. "Licensor Name Space" means the public class or interface declarations whose names begin with "java", "javax", "com.oracle" or their equivalents in any subsequent naming convention adopted by Oracle or Greg Luck through the Java Community Process, or any recognized successors or replacements thereof
+
+TRADEMARKS
+No right, title, or interest in or to any trademarks, service marks, or trade names of Oracle, Greg Luck or their licensors is granted hereunder. Oracle, the Oracle logo, Java are trademarks or registered trademarks of Oracle USA, Inc. in the U.S. and other countries.
+
+DISCLAIMER OF WARRANTIES
+THE SPECIFICATION IS PROVIDED "AS IS" AND IS EXPERIMENTAL AND MAY CONTAIN DEFECTS OR DEFICIENCIES WHICH CANNOT OR WILL NOT BE CORRECTED BY ORACLE. ORACLE MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE OR THAT ANY PRACTICE OR IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER RIGHTS. This document does not represent any commitment to release or implement any portion of the Specification in any product.
+
+THE SPECIFICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY. ORACLE MAY MAKE IMPROVEMENTS AND/OR CHANGES TO THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY TIME. Any use of such changes in the Specification will be governed by the then-current license for the applicable version of the Specification.
+
+LIMITATION OF LIABILITY
+TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ORACLE OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO ANY FURNISHING, PRACTICING, MODIFYING OR ANY USE OF THE SPECIFICATION, EVEN IF ORACLE AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+You will hold Oracle and Greg Luck (and their licensors) harmless from any claims based on your use of the Specification for any purposes other than the limited right of evaluation as described above, and from any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
+
+RESTRICTED RIGHTS LEGEND
+If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
+
+REPORT
+You may wish to report any ambiguities, inconsistencies or inaccuracies you may find in connection with your evaluation of the Specification ("Feedback"). To the extent that you provide Oracle or Greg Luck with any Feedback, you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Oracle and Greg Luck a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose related to the Specification and future versions, implementations, and test suites thereof.
+
+GENERAL TERMS
+Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
+
+The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
+
+This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/hadoop/licenses/asm-bsd-license.txt
----------------------------------------------------------------------
diff --git a/modules/hadoop/licenses/asm-bsd-license.txt b/modules/hadoop/licenses/asm-bsd-license.txt
new file mode 100644
index 0000000..7676ba5
--- /dev/null
+++ b/modules/hadoop/licenses/asm-bsd-license.txt
@@ -0,0 +1,29 @@
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/jta/jta-cddl-license.txt
----------------------------------------------------------------------
diff --git a/modules/jta/jta-cddl-license.txt b/modules/jta/jta-cddl-license.txt
new file mode 100644
index 0000000..31f9d49
--- /dev/null
+++ b/modules/jta/jta-cddl-license.txt
@@ -0,0 +1,129 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 (CDDL-1.0)
+
+1. Definitions.
+
+1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
+
+1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
+
+1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+1.4. Executable means the Covered Software in any form other than Source Code.
+
+1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
+
+1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
+
+1.7. License means this document.
+
+1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+1.9. Modifications means the Source Code and Executable form of any of the following:
+
+A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
+
+B. Any new file that contains any part of the Original Software or previous Modification; or
+
+C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
+
+1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
+
+1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
+
+1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
+
+(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
+
+(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
+
+(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
+
+(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreem
 ent with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be
  construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/rest-http/licenses/jetty-epl-license.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/jetty-epl-license.txt b/modules/rest-http/licenses/jetty-epl-license.txt
new file mode 100644
index 0000000..f5f0c89
--- /dev/null
+++ b/modules/rest-http/licenses/jetty-epl-license.txt
@@ -0,0 +1,69 @@
+Eclipse Public License, Version 1.0 (EPL-1.0)
+(plain text)
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within the Program.
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1a4c043/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt b/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
new file mode 100644
index 0000000..d4392e4
--- /dev/null
+++ b/modules/rest-http/licenses/servlet-api-cddl-gpl-license.txt
@@ -0,0 +1,35 @@
+Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common Development
+and Distribution License("CDDL") (collectively, the "License").  You
+may not use this file except in compliance with the License.  You can
+obtain a copy of the License at
+https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+or packager/legal/LICENSE.txt.  See the License for the specific
+language governing permissions and limitations under the License.
+
+When distributing the software, include this License Header Notice in each
+file and include the License file at packager/legal/LICENSE.txt.
+
+GPL Classpath Exception:
+Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the GPL Version 2 section of the License
+file that accompanied this code.
+
+Modifications:
+If applicable, add the following below the License Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyright [year] [name of copyright owner]"
+
+Contributor(s):
+If you wish your version of this file to be governed by only the CDDL or
+only the GPL Version 2, indicate your decision by adding "[Contributor]
+elects to include this software in this distribution under the [CDDL or GPL
+Version 2] license."  If you don't indicate a single choice of license, a
+recipient has the option to distribute your version of this file under
+either the CDDL, the GPL Version 2 or to extend the choice of license to
+its licensees as provided above.  However, if you add GPL Version 2 code
+and therefore, elected the GPL Version 2 license, then the option applies
+only if the new code is made subject to such option by the copyright
+holder.
\ No newline at end of file


[37/50] [abbrv] incubator-ignite git commit: # ignite-929 close does not destroy cache (cherry picked from commit e3fba88)

Posted by sb...@apache.org.
# ignite-929 close does not destroy cache (cherry picked from commit e3fba88)


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

Branch: refs/heads/ignite-901
Commit: a233fa00fcfb1266acdecfec45b7ac6024cc9791
Parents: 3dcf891
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jul 10 10:20:11 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jul 10 10:48:44 2015 +0300

----------------------------------------------------------------------
 .../examples/ScalarCacheAffinityExample.scala   |   2 +-
 .../scalar/examples/ScalarCacheExample.scala    |   2 +-
 .../ScalarCachePopularNumbersExample.scala      |   2 +-
 .../examples/ScalarCacheQueryExample.scala      |   2 +-
 .../examples/ScalarSnowflakeSchemaExample.scala |   4 +-
 .../java/org/apache/ignite/IgniteCache.java     |  14 +-
 .../org/apache/ignite/cache/CacheManager.java   |  13 +-
 .../apache/ignite/internal/IgniteKernal.java    |   2 +-
 .../discovery/GridDiscoveryManager.java         |  23 +-
 .../cache/DynamicCacheChangeRequest.java        |  39 +-
 .../processors/cache/GridCacheGateway.java      |   4 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    | 102 ++-
 .../processors/cache/IgniteCacheProxy.java      | 448 +++++++---
 .../distributed/dht/GridDhtCacheEntry.java      |   4 +-
 .../GridDhtPartitionsExchangeFuture.java        |  30 +-
 .../visor/cache/VisorCacheStopTask.java         |   2 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  14 +-
 .../IgniteFairAffinityDynamicCacheSelfTest.java |   3 +-
 ...cheStoreSessionListenerAbstractSelfTest.java | 111 ++-
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |  34 +-
 .../CacheMetricsForClusterGroupSelfTest.java    |  10 +-
 .../cache/CacheOffheapMapEntrySelfTest.java     |   7 +-
 .../cache/CacheStopAndDestroySelfTest.java      | 859 +++++++++++++++++++
 ...eUsageMultinodeDynamicStartAbstractTest.java |   2 +-
 ...ProjectionForCachesOnDaemonNodeSelfTest.java |   2 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 140 +--
 ...teCacheClientNodePartitionsExchangeTest.java |  29 +-
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |   2 +-
 .../DataStreamerMultinodeCreateCacheTest.java   |  14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 .../CacheConfigurationP2PTestClient.java        |   4 +-
 32 files changed, 1593 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
index fbf66bc..40b947d 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
@@ -62,7 +62,7 @@ object ScalarCacheAffinityExample extends App {
             visitUsingMapKeysToNodes(cache)
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
index 42e8ca4..0bf8d6f 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
@@ -50,7 +50,7 @@ object ScalarCacheExample extends App {
             basicOperations()
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
index 828c5a3..d113297 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
@@ -93,7 +93,7 @@ object ScalarCachePopularNumbersExample extends App {
             }
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
index b8054eb..1a42947 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
@@ -55,7 +55,7 @@ object ScalarCacheQueryExample {
                 example(ignite$)
             }
             finally {
-                cache.close()
+                cache.destroy()
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
index 2656f44..33b2fcc 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
@@ -86,11 +86,11 @@ object ScalarSnowflakeSchemaExample {
                     queryProductPurchases()
                 }
                 finally {
-                    factCache.close()
+                    factCache.destroy()
                 }
             }
             finally {
-                dimCache.close()
+                dimCache.destroy()
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index c8d6d7a..4938ab1 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -543,9 +543,21 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
         CacheEntryProcessor<K, V, T> entryProcessor, Object... args);
 
     /**
+     * Closes this cache instance.
+     * <p>
+     * For local cache equivalent to {@link #destroy()}.
+     * For distributed caches, if called on clients, stops client cache, if called on a server node,
+     * just closes this cache instance and does not destroy cache data.
+     * <p>
+     * After cache instance is closed another {@link IgniteCache} instance for the same
+     * cache can be created using {@link Ignite#cache(String)} method.
+     */
+    @Override public void close();
+
+    /**
      * Completely deletes the cache with all its data from the system on all cluster nodes.
      */
-    @Override void close();
+    public void destroy();
 
     /**
      * This cache node to re-balance its partitions. This method is usually used when

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index 9ba50d1..bc6df76 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -130,6 +130,7 @@ public class CacheManager implements javax.cache.CacheManager {
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public <K, V, C extends Configuration<K, V>> Cache<K, V> createCache(String cacheName, C cacheCfg)
         throws IllegalArgumentException {
         kernalGateway.readLock();
@@ -155,11 +156,11 @@ public class CacheManager implements javax.cache.CacheManager {
 
             IgniteCache<K, V> res = ignite.createCache(igniteCacheCfg);
 
-            ((IgniteCacheProxy<K, V>)res).setCacheManager(this);
-
             if (res == null)
                 throw new CacheException();
 
+            ((IgniteCacheProxy<K, V>)res).setCacheManager(this);
+
             if (igniteCacheCfg.isManagementEnabled())
                 enableManagement(cacheName, true);
 
@@ -219,6 +220,7 @@ public class CacheManager implements javax.cache.CacheManager {
 
     /**
      * @param cacheName Cache name.
+     * @return Cache.
      */
     @Nullable private <K, V> IgniteCache<K, V> getCache0(String cacheName) {
         if (cacheName == null)
@@ -272,11 +274,13 @@ public class CacheManager implements javax.cache.CacheManager {
         }
 
         if (cache != null)
-            cache.close();
+            cache.destroy();
     }
 
     /**
      * @param cacheName Cache name.
+     * @param objName Object name.
+     * @return Object name instance.
      */
     private ObjectName getObjectName(String cacheName, String objName) {
         String mBeanName = "javax.cache:type=" + objName + ",CacheManager="
@@ -339,7 +343,8 @@ public class CacheManager implements javax.cache.CacheManager {
 
     /**
      * @param mxbean MXBean.
-     * @param name cache name.
+     * @param name Cache name.
+     * @param beanType Bean type.
      */
     private void registerCacheObject(Object mxbean, String name, String beanType) {
         MBeanServer mBeanSrv = ignite.configuration().getMBeanServer();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index d6ddf79..024dc7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -2436,7 +2436,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         IgniteInternalFuture<?> stopFut;
 
         try {
-            stopFut = ctx.cache().dynamicStopCache(cacheName);
+            stopFut = ctx.cache().dynamicDestroyCache(cacheName);
         }
         finally {
             unguard();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index a8ce8ff..eae07ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -263,6 +263,19 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     }
 
     /**
+     * Removes near node ID from cache filter.
+     *
+     * @param cacheName Cache name.
+     * @param clientNodeId Near node ID.
+     */
+    public void onClientCacheClose(String cacheName, UUID clientNodeId) {
+        CachePredicate predicate = registeredCaches.get(cacheName);
+
+        if (predicate != null)
+            predicate.onNodeLeft(clientNodeId);
+    }
+
+    /**
      * @return Client nodes map.
      */
     public Map<String, Map<UUID, Boolean>> clientNodesMap() {
@@ -1079,9 +1092,17 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return {@code True} if node for given ID is alive.
      */
     public boolean alive(UUID nodeId) {
+        return getAlive(nodeId) != null;
+    }
+
+    /**
+     * @param nodeId Node ID.
+     * @return Node if node is alive.
+     */
+    @Nullable public ClusterNode getAlive(UUID nodeId) {
         assert nodeId != null;
 
-        return getSpi().getNode(nodeId) != null; // Go directly to SPI without checking disco cache.
+        return getSpi().getNode(nodeId); // Go directly to SPI without checking disco cache.
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
index c08a179..7af1572 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
@@ -57,6 +57,9 @@ public class DynamicCacheChangeRequest implements Serializable {
     /** Stop flag. */
     private boolean stop;
 
+    /** Close flag. */
+    private boolean close;
+
     /** Fail if exists flag. */
     private boolean failIfExists;
 
@@ -68,23 +71,10 @@ public class DynamicCacheChangeRequest implements Serializable {
      *
      * @param cacheName Cache stop name.
      * @param initiatingNodeId Initiating node ID.
-     * @param stop Stop flag.
      */
-    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId, boolean stop) {
+    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId) {
         this.cacheName = cacheName;
         this.initiatingNodeId = initiatingNodeId;
-
-        this.stop = stop;
-    }
-
-    /**
-     * Constructor means for start requests.
-     *
-     * @param cacheName Cache name.
-     * @param initiatingNodeId Initiating node ID.
-     */
-    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId) {
-        this(cacheName, initiatingNodeId, false);
     }
 
     /**
@@ -130,6 +120,13 @@ public class DynamicCacheChangeRequest implements Serializable {
     }
 
     /**
+     * @param stop New stop flag.
+     */
+    public void stop(boolean stop) {
+        this.stop = stop;
+    }
+
+    /**
      * @return Cache name.
      */
     public String cacheName() {
@@ -220,6 +217,20 @@ public class DynamicCacheChangeRequest implements Serializable {
         this.failIfExists = failIfExists;
     }
 
+    /**
+     * @return Close flag.
+     */
+    public boolean close() {
+        return close;
+    }
+
+    /**
+     * @param close New close flag.
+     */
+    public void close(boolean close) {
+        this.close = close;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(DynamicCacheChangeRequest.class, this, "cacheName", cacheName());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index d9d151c..f2beb0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -68,7 +68,7 @@ public class GridCacheGateway<K, V> {
      *
      * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped.
      */
-    public boolean enterIfNotClosed() {
+    public boolean enterIfNotStopped() {
         onEnter();
 
         // Must unlock in case of unexpected errors to avoid
@@ -89,7 +89,7 @@ public class GridCacheGateway<K, V> {
      *
      * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped.
      */
-    public boolean enterIfNotClosedNoLock() {
+    public boolean enterIfNotStoppedNoLock() {
         onEnter();
 
         return !stopped;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index af87685..4398b4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -156,16 +156,14 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                         // Validate requests to check if event should trigger partition exchange.
                         for (DynamicCacheChangeRequest req : batch.requests()) {
-                            if (cctx.cache().dynamicCacheRegistered(req))
+                            if (cctx.cache().exchangeNeeded(req))
                                 valid.add(req);
                             else
                                 cctx.cache().completeStartFuture(req);
                         }
 
                         if (!F.isEmpty(valid)) {
-                            exchId = exchangeId(n.id(),
-                                affinityTopologyVersion(e),
-                                e.type());
+                            exchId = exchangeId(n.id(), affinityTopologyVersion(e), e.type());
 
                             exchFut = exchangeFuture(exchId, e, valid);
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index de1eac2..bb87a86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1390,10 +1390,16 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @return {@code True} if change request was registered to apply.
      */
     @SuppressWarnings("IfMayBeConditional")
-    public boolean dynamicCacheRegistered(DynamicCacheChangeRequest req) {
+    public boolean exchangeNeeded(DynamicCacheChangeRequest req) {
         DynamicCacheDescriptor desc = registeredCaches.get(maskNull(req.cacheName()));
 
         if (desc != null) {
+            if (req.close()) {
+                assert req.initiatingNodeId() != null : req;
+
+                return true;
+            }
+
             if (desc.deploymentId().equals(req.deploymentId())) {
                 if (req.start())
                     return !desc.cancelled();
@@ -1515,20 +1521,26 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param req Stop request.
      */
     public void blockGateway(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() || req.close();
 
-        // Break the proxy before exchange future is done.
-        IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(req.cacheName()));
+        if (req.stop() || (req.close() && req.initiatingNodeId().equals(ctx.localNodeId()))) {
+            // Break the proxy before exchange future is done.
+            IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(req.cacheName()));
 
-        if (proxy != null)
-            proxy.gate().block();
+            if (proxy != null) {
+                if (req.stop())
+                    proxy.gate().block();
+                else
+                    proxy.closeProxy();
+            }
+        }
     }
 
     /**
      * @param req Request.
      */
     private void stopGateway(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() : req;
 
         // Break the proxy before exchange future is done.
         IgniteCacheProxy<?, ?> proxy = jCacheProxies.remove(maskNull(req.cacheName()));
@@ -1541,7 +1553,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param req Stop request.
      */
     public void prepareCacheStop(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() || req.close() : req;
 
         GridCacheAdapter<?, ?> cache = caches.remove(maskNull(req.cacheName()));
 
@@ -1597,6 +1609,23 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     if (desc != null && desc.cancelled() && desc.deploymentId().equals(req.deploymentId()))
                         registeredCaches.remove(masked, desc);
                 }
+                else if (req.close() && req.initiatingNodeId().equals(ctx.localNodeId())) {
+                    IgniteCacheProxy<?, ?> proxy = jCacheProxies.remove(masked);
+
+                    if (proxy != null) {
+                        if (proxy.context().affinityNode()) {
+                            GridCacheAdapter<?, ?> cache = caches.get(masked);
+
+                            if (cache != null)
+                                jCacheProxies.put(masked, new IgniteCacheProxy(cache.context(), cache, null, false));
+                        }
+                        else {
+                            proxy.context().gate().onStopped();
+
+                            prepareCacheStop(req);
+                        }
+                    }
+                }
 
                 completeStartFuture(req);
             }
@@ -2005,13 +2034,35 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * @param cacheName Cache name to stop.
-     * @return Future that will be completed when cache is stopped.
+     * @param cacheName Cache name to destroy.
+     * @return Future that will be completed when cache is destroyed.
      */
-    public IgniteInternalFuture<?> dynamicStopCache(String cacheName) {
+    public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName) {
         checkEmptyTransactions();
 
-        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId(), true);
+        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId());
+
+        t.stop(true);
+
+        return F.first(initiateCacheChanges(F.asList(t), false));
+    }
+
+
+    /**
+     * @param cacheName Cache name to close.
+     * @return Future that will be completed when cache is closed.
+     */
+    public IgniteInternalFuture<?> dynamicCloseCache(String cacheName) {
+        IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(cacheName));
+
+        if (proxy == null || proxy.proxyClosed())
+            return new GridFinishedFuture<>(); // No-op.
+
+        checkEmptyTransactions();
+
+        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId());
+
+        t.close(true);
 
         return F.first(initiateCacheChanges(F.asList(t), false));
     }
@@ -2031,16 +2082,24 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             DynamicCacheStartFuture fut = new DynamicCacheStartFuture(req.cacheName(), req.deploymentId(), req);
 
             try {
-                if (req.stop()) {
+                if (req.stop() || req.close()) {
                     DynamicCacheDescriptor desc = registeredCaches.get(maskNull(req.cacheName()));
 
                     if (desc == null)
                         // No-op.
                         fut.onDone();
                     else {
+                        assert desc.cacheConfiguration() != null : desc;
+
+                        if (req.close() && desc.cacheConfiguration().getCacheMode() == LOCAL) {
+                            req.close(false);
+
+                            req.stop(true);
+                        }
+
                         IgniteUuid dynamicDeploymentId = desc.deploymentId();
 
-                        assert dynamicDeploymentId != null;
+                        assert dynamicDeploymentId != null : desc;
 
                         // Save deployment ID to avoid concurrent stops.
                         req.deploymentId(dynamicDeploymentId);
@@ -2188,9 +2247,12 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     req.nearCacheConfiguration() != null);
             }
             else {
+                assert req.stop() || req.close() : req;
+
                 if (desc == null) {
-                    // If local node initiated start, fail the start future.
-                    DynamicCacheStartFuture changeFut = (DynamicCacheStartFuture)pendingFuts.get(maskNull(req.cacheName()));
+                    // If local node initiated start, finish future.
+                    DynamicCacheStartFuture changeFut =
+                        (DynamicCacheStartFuture)pendingFuts.get(maskNull(req.cacheName()));
 
                     if (changeFut != null && changeFut.deploymentId().equals(req.deploymentId())) {
                         // No-op.
@@ -2200,9 +2262,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     return;
                 }
 
-                desc.onCancelled();
+                if (req.stop()) {
+                    desc.onCancelled();
 
-                ctx.discovery().removeCacheFilter(req.cacheName());
+                    ctx.discovery().removeCacheFilter(req.cacheName());
+                }
+                else
+                    ctx.discovery().onClientCacheClose(req.cacheName(), req.initiatingNodeId());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 b31b2e8..9767f49 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
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.CacheManager;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.CacheManager;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -171,19 +171,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public CacheMetrics metrics() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().metrics();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public CacheMetrics metrics(ClusterGroup grp) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             List<CacheMetrics> metrics = new ArrayList<>(grp.nodes().size());
@@ -202,19 +206,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             return new CacheMetricsSnapshot(ctx.cache().metrics(), metrics);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public CacheMetricsMXBean mxBean() {
-        CacheOperationContext prev = gate.enter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().mxBean();
         }
         finally {
-            gate.leave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -230,19 +236,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Nullable @Override public Cache.Entry<K, V> randomEntry() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().randomEntry();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             CacheOperationContext prj0 = opCtx != null ? opCtx.withExpiryPolicy(plc) :
@@ -251,7 +261,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             return new IgniteCacheProxy<>(ctx, delegate, prj0, isAsync(), lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -262,7 +272,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withNoRetries() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             boolean noRetries = opCtx != null && opCtx.noRetries();
@@ -280,14 +292,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void loadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -296,7 +310,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     ctx.cache().globalLoadCache(p, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -307,7 +321,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void localLoadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -316,7 +332,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.localLoadCache(p, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -327,7 +343,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Nullable @Override public V getAndPutIfAbsent(K key, V val) throws CacheException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -339,7 +357,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndPutIfAbsent(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -359,13 +377,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public boolean isLocalLocked(K key, boolean byCurrThread) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return byCurrThread ? delegate.isLockedByThread(key) : delegate.isLocked(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -379,7 +399,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         final CacheQuery<Map.Entry<K,V>> qry;
         final CacheQueryFuture<Map.Entry<K,V>> fut;
 
-        boolean isKeepPortable = opCtx != null ? opCtx.isKeepPortable() : false;
+        boolean isKeepPortable = opCtx != null && opCtx.isKeepPortable();
 
         if (filter instanceof ScanQuery) {
             IgniteBiPredicate<K, V> p = ((ScanQuery)filter).getFilter();
@@ -444,11 +464,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * @param local Enforce local.
+     * @param loc Enforce local.
      * @return Local node cluster group.
      */
-    private ClusterGroup projection(boolean local) {
-        if (local || ctx.isLocal() || isReplicatedDataNode())
+    private ClusterGroup projection(boolean loc) {
+        if (loc || ctx.isLocal() || isReplicatedDataNode())
             return ctx.kernalContext().grid().cluster().forLocal();
 
         if (ctx.isReplicated())
@@ -517,7 +537,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <R> QueryCursor<R> query(Query<R> qry) {
         A.notNull(qry, "qry");
 
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.checkSecurity(SecurityPermission.CACHE_READ);
@@ -558,7 +580,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw new CacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -589,7 +611,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localEntries(peekModes);
@@ -598,37 +622,43 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public QueryMetrics queryMetrics() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.context().queries().metrics();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localEvict(Collection<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             delegate.evictAll(keys);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public V localPeek(K key, CachePeekMode... peekModes) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localPeek(key, peekModes, null);
@@ -637,20 +667,22 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localPromote(Set<? extends K> keys) throws CacheException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 delegate.promoteAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -660,7 +692,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public int size(CachePeekMode... peekModes) throws CacheException {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -675,13 +709,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public int localSize(CachePeekMode... peekModes) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localSize(peekModes);
@@ -690,14 +726,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public V get(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -709,7 +747,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.get(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -720,7 +758,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public Map<K, V> getAll(Set<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -732,7 +772,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -743,7 +783,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -755,7 +797,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAllOutTx(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -769,7 +811,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      */
     public Map<K, V> getAll(Collection<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -781,7 +825,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -796,19 +840,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      * @return Entry set.
      */
     public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate... filter) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.entrySetx(filter);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public boolean containsKey(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -820,13 +868,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 return delegate.containsKey(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public boolean containsKeys(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -838,7 +888,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 return delegate.containsKeys(keys);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -848,7 +898,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         boolean replaceExisting,
         @Nullable final CompletionListener completionLsnr
     ) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             IgniteInternalFuture<?> fut = ctx.cache().loadAll(keys, replaceExisting);
@@ -869,14 +921,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             }
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void put(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -896,7 +950,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.put(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -907,7 +961,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndPut(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -919,7 +975,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndPut(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -930,7 +986,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void putAll(Map<? extends K, ? extends V> map) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -939,7 +997,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.putAll(map);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -950,7 +1008,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean putIfAbsent(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -962,7 +1022,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.putIfAbsent(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -973,7 +1033,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean remove(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -985,7 +1047,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.remove(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -996,7 +1058,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean remove(K key, V oldVal) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1008,7 +1072,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.remove(key, oldVal);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1019,7 +1083,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndRemove(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1031,7 +1097,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndRemove(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1042,7 +1108,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean replace(K key, V oldVal, V newVal) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1054,7 +1122,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.replace(key, oldVal, newVal);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1065,7 +1133,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean replace(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1077,7 +1147,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.replace(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1088,7 +1158,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndReplace(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1100,7 +1172,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndReplace(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1111,7 +1183,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void removeAll(Set<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -1120,7 +1194,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.removeAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1130,7 +1204,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public void removeAll() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1142,13 +1218,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clear(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1160,13 +1238,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clearAll(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1178,13 +1258,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clear() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1196,32 +1278,36 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localClear(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             delegate.clearLocally(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localClearAll(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             for (K key : keys)
                 delegate.clearLocally(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1229,7 +1315,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1255,7 +1343,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 }
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1267,7 +1355,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1293,7 +1383,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 }
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1303,10 +1393,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
-                                                                   EntryProcessor<K, V, T> entryProcessor,
-                                                                   Object... args) {
+        EntryProcessor<K, V, T> entryProcessor,
+        Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1318,7 +1410,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(keys, entryProcessor, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1331,7 +1423,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         CacheEntryProcessor<K, V, T> entryProcessor,
         Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1343,7 +1437,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(keys, entryProcessor, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1356,7 +1450,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         Map<? extends K, ? extends EntryProcessor<K, V, T>> map,
         Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1368,7 +1464,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(map, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1394,17 +1490,43 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /** {@inheritDoc} */
+    @Override public void destroy() {
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
+            return;
+
+        IgniteInternalFuture<?> fut;
+
+        try {
+            fut = ctx.kernalContext().cache().dynamicDestroyCache(ctx.name());
+        }
+        finally {
+            onLeave(gate);
+        }
+
+        try {
+            fut.get();
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public void close() {
-        if (!onEnterIfNoClose())
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
             return;
 
         IgniteInternalFuture<?> fut;
 
         try {
-            fut = ctx.kernalContext().cache().dynamicStopCache(ctx.name());
+            fut = ctx.kernalContext().cache().dynamicCloseCache(ctx.name());
         }
         finally {
-            onLeave();
+            onLeave(gate);
         }
 
         try {
@@ -1417,14 +1539,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public boolean isClosed() {
-        if (!onEnterIfNoClose())
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
             return true;
 
         try {
             return ctx.kernalContext().cache().context().closed(ctx);
         }
         finally {
-            onLeave();
+            onLeave(gate);
         }
     }
 
@@ -1448,7 +1572,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public void registerCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.continuousQueries().executeJCacheQuery(lsnrCfg, false);
@@ -1457,13 +1583,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.continuousQueries().cancelJCacheQuery(lsnrCfg);
@@ -1472,19 +1600,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public Iterator<Cache.Entry<K, V>> iterator() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().igniteIterator();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1516,8 +1646,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      *
      * @return Projection for portable objects.
      */
+    @SuppressWarnings("unchecked")
     public <K1, V1> IgniteCache<K1, V1> keepPortable() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             CacheOperationContext opCtx0 =
@@ -1535,7 +1668,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1543,7 +1676,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      * @return Cache with skip store enabled.
      */
     public IgniteCache<K, V> skipStore() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             boolean skip = opCtx != null && opCtx.skipStore();
@@ -1565,7 +1700,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1592,10 +1727,69 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
+     * @return {@code True} if proxy was closed.
+     */
+    public boolean proxyClosed() {
+        return !gate.getClass().equals(GridCacheGateway.class);
+    }
+
+    /**
+     * Closes this proxy instance.
+     */
+    public void closeProxy() {
+        gate = new GridCacheGateway<K, V>(ctx) {
+            @Override public void enter() {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Override public boolean enterIfNotStopped() {
+                return false;
+            }
+
+            @Override public boolean enterIfNotStoppedNoLock() {
+                return false;
+            }
+
+            @Override public void leaveNoLock() {
+                assert false;
+            }
+
+            @Override public void leave() {
+                assert false;
+            }
+
+            @Nullable @Override public CacheOperationContext enter(@Nullable CacheOperationContext opCtx) {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Nullable @Override public CacheOperationContext enterNoLock(@Nullable CacheOperationContext opCtx) {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Override public void leave(CacheOperationContext prev) {
+                assert false;
+            }
+
+            @Override public void leaveNoLock(CacheOperationContext prev) {
+                assert false;
+            }
+
+            @Override public void block() {
+                // No-op.
+            }
+
+            @Override public void onStopped() {
+                // No-op.
+            }
+        };
+    }
+
+    /**
+     * @param gate Cache gateway.
      * @param opCtx Cache operation context to guard.
      * @return Previous projection set on this thread.
      */
-    private CacheOperationContext onEnter(CacheOperationContext opCtx) {
+    private CacheOperationContext onEnter(GridCacheGateway<K, V> gate, CacheOperationContext opCtx) {
         if (lock)
             return gate.enter(opCtx);
         else
@@ -1603,21 +1797,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * On enter.
-     *
+     * @param gate Cache gateway.
      * @return {@code True} if enter successful.
      */
-    private boolean onEnterIfNoClose() {
+    private boolean onEnterIfNoStop(GridCacheGateway<K, V> gate) {
         if (lock)
-            return gate.enterIfNotClosed();
+            return gate.enterIfNotStopped();
         else
-            return gate.enterIfNotClosedNoLock();
+            return gate.enterIfNotStoppedNoLock();
     }
 
     /**
+     * @param gate Cache gateway.
      * @param opCtx Operation context to guard.
      */
-    private void onLeave(CacheOperationContext opCtx) {
+    private void onLeave(GridCacheGateway<K, V> gate, CacheOperationContext opCtx) {
         if (lock)
             gate.leave(opCtx);
         else
@@ -1625,9 +1819,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * On leave.
+     * @param gate Cache gateway.
      */
-    private void onLeave() {
+    private void onLeave(GridCacheGateway<K, V> gate) {
         if (lock)
             gate.leave();
         else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 89b85c4..3b411b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -597,7 +597,9 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
         List<ReaderId> newRdrs = null;
 
         for (int i = 0; i < rdrs.length; i++) {
-            if (!cctx.discovery().alive(rdrs[i].nodeId())) {
+            ClusterNode node = cctx.discovery().getAlive(rdrs[i].nodeId());
+
+            if (node == null || !cctx.discovery().cacheNode(node, cacheName())) {
                 // Node has left and if new list has already been created, just skip.
                 // Otherwise, create new list and add alive nodes.
                 if (newRdrs == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 38a0d55..5701749 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -474,6 +474,9 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                 oldestNode.set(oldest);
 
+                if (!F.isEmpty(reqs))
+                    blockGateways();
+
                 startCaches();
 
                 // True if client node joined or failed.
@@ -489,24 +492,25 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 else {
                     assert discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT : discoEvt;
 
-                    boolean clientOnlyStart = true;
+                    boolean clientOnlyCacheEvt = true;
 
                     for (DynamicCacheChangeRequest req : reqs) {
-                        if (!req.clientStartOnly()) {
-                            clientOnlyStart = false;
+                        if (req.clientStartOnly() || req.close())
+                            continue;
 
-                            break;
-                        }
+                        clientOnlyCacheEvt = false;
+
+                        break;
                     }
 
-                    clientNodeEvt = clientOnlyStart;
+                    clientNodeEvt = clientOnlyCacheEvt;
                 }
 
                 if (clientNodeEvt) {
                     ClusterNode node = discoEvt.eventNode();
 
                     // Client need to initialize affinity for local join event or for stated client caches.
-                    if (!node.isLocal()) {
+                    if (!node.isLocal() || clientCacheClose()) {
                         for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                             if (cacheCtx.isLocal())
                                 continue;
@@ -733,9 +737,6 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 if (log.isDebugEnabled())
                     log.debug("After waiting for partition release future: " + this);
 
-                if (!F.isEmpty(reqs))
-                    blockGateways();
-
                 if (exchId.isLeft())
                     cctx.mvcc().removeExplicitNodeLocks(exchId.nodeId(), exchId.topologyVersion());
 
@@ -839,6 +840,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     }
 
     /**
+     * @return {@code True} if exchange initiated for client cache close.
+     */
+    private boolean clientCacheClose() {
+        return reqs != null && reqs.size() == 1 && reqs.iterator().next().close();
+    }
+
+    /**
      *
      */
     private void dumpPendingObjects() {
@@ -903,7 +911,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
      */
     private void blockGateways() {
         for (DynamicCacheChangeRequest req : reqs) {
-            if (req.stop())
+            if (req.stop() || req.close())
                 cctx.cache().blockGateway(req);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
index 0e848f9..83d19f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
@@ -56,7 +56,7 @@ public class VisorCacheStopTask extends VisorOneNodeTask<String, Void> {
         @Override protected Void run(String cacheName) {
             IgniteCache cache = ignite.cache(cacheName);
 
-            cache.close();
+            cache.destroy();
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
index 467349f..da27fb2 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
@@ -127,13 +127,23 @@ public class IgniteClientNodeAffinityTest extends GridCommonAbstractTest {
 
         ccfg.setNodeFilter(new TestNodesFilter());
 
-        try (IgniteCache<Integer, Integer> cache = client.createCache(ccfg)) {
+        IgniteCache<Integer, Integer> cache = client.createCache(ccfg);
+
+        try {
             checkCache(null, 1);
         }
+        finally {
+            cache.destroy();
+        }
 
-        try (IgniteCache<Integer, Integer> cache = client.createCache(ccfg, new NearCacheConfiguration())) {
+        cache = client.createCache(ccfg, new NearCacheConfiguration());
+
+        try {
             checkCache(null, 1);
         }
+        finally {
+            cache.destroy();
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
index 18b77e0..e51be58 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
@@ -84,8 +84,7 @@ public class IgniteFairAffinityDynamicCacheSelfTest extends GridCommonAbstractTe
             cache.put(i, i);
 
         IgniteInternalFuture<Object> destFut = GridTestUtils.runAsync(new Callable<Object>() {
-            @Override
-            public Object call() throws Exception {
+            @Override public Object call() throws Exception {
                 ignite(0).destroyCache(cache.getName());
 
                 return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
index 0634197..8e53f05 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
@@ -113,12 +113,17 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testAtomicCache() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.ATOMIC);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
+
+        try {
             cache.loadCache(null);
             cache.get(1);
             cache.put(1, 1);
             cache.remove(1);
         }
+        finally {
+            cache.destroy();
+        }
 
         assertEquals(3, loadCacheCnt.get());
         assertEquals(1, loadCnt.get());
@@ -133,12 +138,17 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testTransactionalCache() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.TRANSACTIONAL);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
+
+        try {
             cache.loadCache(null);
             cache.get(1);
             cache.put(1, 1);
             cache.remove(1);
         }
+        finally {
+            cache.destroy();
+        }
 
         assertEquals(3, loadCacheCnt.get());
         assertEquals(1, loadCnt.get());
@@ -153,15 +163,18 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testExplicitTransaction() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.TRANSACTIONAL);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache.put(1, 1);
-                cache.put(2, 2);
-                cache.remove(3);
-                cache.remove(4);
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
 
-                tx.commit();
-            }
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache.put(1, 1);
+            cache.put(2, 2);
+            cache.remove(3);
+            cache.remove(4);
+
+            tx.commit();
+        }
+        finally {
+            cache.destroy();
         }
 
         assertEquals(2, writeCnt.get());
@@ -176,18 +189,20 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
-                cache1.remove(3);
-                cache2.remove(4);
-
-                tx.commit();
-            }
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
+
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
+            cache1.remove(3);
+            cache2.remove(4);
+
+            tx.commit();
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         assertEquals(2, writeCnt.get());
@@ -204,16 +219,18 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
 
-                tx.commit();
-            }
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
+
+            tx.commit();
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         try (Connection conn = DriverManager.getConnection(URL)) {
@@ -232,25 +249,27 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
 
-                tx.commit();
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
 
-                assert false : "Exception was not thrown.";
-            }
-            catch (IgniteException e) {
-                CacheWriterException we = X.cause(e, CacheWriterException.class);
+            tx.commit();
 
-                assertNotNull(we);
+            assert false : "Exception was not thrown.";
+        }
+        catch (IgniteException e) {
+            CacheWriterException we = X.cause(e, CacheWriterException.class);
+
+            assertNotNull(we);
 
-                assertEquals("Expected failure.", we.getMessage());
-            }
+            assertEquals("Expected failure.", we.getMessage());
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         try (Connection conn = DriverManager.getConnection(URL)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
index 7b01f0f..bc6b443 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
@@ -92,31 +92,33 @@ public class GridCacheTxLoadFromStoreOnLockSelfTest extends GridCommonAbstractTe
         cacheCfg.setBackups(backups);
         cacheCfg.setLoadPreviousValue(true);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg)) {
-            for (int i = 0; i < 10; i++)
-                assertEquals((Integer)i, cache.get(i));
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg);
 
-            cache.removeAll();
+        for (int i = 0; i < 10; i++)
+            assertEquals((Integer)i, cache.get(i));
 
-            assertEquals(0, cache.size());
+        cache.removeAll();
 
-            for (TransactionConcurrency conc : TransactionConcurrency.values()) {
-                for (TransactionIsolation iso : TransactionIsolation.values()) {
-                    info("Checking transaction [conc=" + conc + ", iso=" + iso + ']');
+        assertEquals(0, cache.size());
 
-                    try (Transaction tx = ignite(0).transactions().txStart(conc, iso)) {
-                        for (int i = 0; i < 10; i++)
-                            assertEquals("Invalid value for transaction [conc=" + conc + ", iso=" + iso + ']',
-                                (Integer)i, cache.get(i));
+        for (TransactionConcurrency conc : TransactionConcurrency.values()) {
+            for (TransactionIsolation iso : TransactionIsolation.values()) {
+                info("Checking transaction [conc=" + conc + ", iso=" + iso + ']');
 
-                        tx.commit();
-                    }
+                try (Transaction tx = ignite(0).transactions().txStart(conc, iso)) {
+                    for (int i = 0; i < 10; i++)
+                        assertEquals("Invalid value for transaction [conc=" + conc + ", iso=" + iso + ']',
+                            (Integer)i, cache.get(i));
 
-                    cache.removeAll();
-                    assertEquals(0, cache.size());
+                    tx.commit();
                 }
+
+                cache.removeAll();
+                assertEquals(0, cache.size());
             }
         }
+
+        cache.destroy();
     }
 
     /**



[36/50] [abbrv] incubator-ignite git commit: # ignite-929 close does not destroy cache (cherry picked from commit e3fba88)

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
index 1ba24e3..5093af5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
@@ -107,7 +107,7 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
         assertMetrics(cache1);
         assertMetrics(cache2);
 
-        closeCaches();
+        destroyCaches();
     }
 
     /**
@@ -135,7 +135,7 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
         assertMetrics(cache1);
         assertMetrics(cache2);
 
-        closeCaches();
+        destroyCaches();
     }
 
     /**
@@ -157,9 +157,9 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
     /**
      * Closes caches.
      */
-    private void closeCaches() {
-        cache1.close();
-        cache2.close();
+    private void destroyCaches() {
+        cache1.destroy();
+        cache2.destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
index 8c7d33d..f4d7607 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
@@ -149,7 +149,9 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
             cacheMode,
             "Cache");
 
-        try (IgniteCache jcache = grid(0).getOrCreateCache(cfg)) {
+        IgniteCache jcache = grid(0).getOrCreateCache(cfg);
+
+        try {
             GridCacheAdapter<Integer, String> cache = ((IgniteKernal)grid(0)).internalCache(jcache.getName());
 
             Integer key = primaryKey(grid(0).cache(null));
@@ -164,5 +166,8 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
 
             assertEquals(entry.getClass(), entryCls);
         }
+        finally {
+            jcache.destroy();
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
new file mode 100644
index 0000000..20284a8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -0,0 +1,859 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.communication.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.*;
+import javax.cache.CacheManager;
+import javax.cache.configuration.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Checks stop and destroy methods behavior.
+ */
+public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
+    /** */
+    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** key-value used at test. */
+    protected static String KEY_VAL = "1";
+
+    /** cache name 1. */
+    protected static String CACHE_NAME_DHT = "cache";
+
+    /** cache name 2. */
+    protected static String CACHE_NAME_CLIENT = "cache_client";
+
+    /** near cache name. */
+    protected static String CACHE_NAME_NEAR = "cache_near";
+
+    /** local cache name. */
+    protected static String CACHE_NAME_LOC = "cache_local";
+
+    /** */
+    private static volatile boolean stop;
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        startGridsMultiThreaded(gridCount());
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+    }
+
+    /**
+     * @return Grids count to start.
+     */
+    protected int gridCount() {
+        return 3;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration iCfg = super.getConfiguration(gridName);
+
+        if (getTestGridName(2).equals(gridName))
+            iCfg.setClientMode(true);
+
+        ((TcpDiscoverySpi)iCfg.getDiscoverySpi()).setIpFinder(ipFinder);
+        ((TcpDiscoverySpi)iCfg.getDiscoverySpi()).setForceServerMode(true);
+
+        iCfg.setCacheConfiguration();
+
+        TcpCommunicationSpi commSpi = new CountingTxRequestsToClientNodeTcpCommunicationSpi();
+
+        commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass()));
+        commSpi.setTcpNoDelay(true);
+
+        iCfg.setCommunicationSpi(commSpi);
+
+        return iCfg;
+    }
+
+    /**
+     * Helps to count messages.
+     */
+    public static class CountingTxRequestsToClientNodeTcpCommunicationSpi extends TcpCommunicationSpi {
+        /** Counter. */
+        public static AtomicInteger cnt = new AtomicInteger();
+
+        /** Node filter. */
+        public static UUID nodeFilter;
+
+        /** {@inheritDoc} */
+        @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+            super.sendMessage(node, msg);
+
+            if (nodeFilter != null &&
+                node.id().equals(nodeFilter) &&
+                msg instanceof GridIoMessage &&
+                ((GridIoMessage)msg).message() instanceof GridDhtTxPrepareRequest)
+                cnt.incrementAndGet();
+        }
+    }
+
+    /**
+     * @return dht config
+     */
+    private CacheConfiguration getDhtConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_DHT);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * @return client config
+     */
+    private CacheConfiguration getClientConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_CLIENT);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * @return near config
+     */
+    private CacheConfiguration getNearConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_NEAR);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(new NearCacheConfiguration());
+
+        return cfg;
+    }
+
+    /**
+     * @return local config
+     */
+    private CacheConfiguration getLocalConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_LOC);
+        cfg.setCacheMode(LOCAL);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtDoubleDestroy() throws Exception {
+        dhtDestroy();
+
+        dhtDestroy();
+    }
+
+    /**
+     * Test DHT Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void dhtDestroy() throws Exception {
+        grid(0).getOrCreateCache(getDhtConfig());
+
+        assertNull(grid(0).cache(CACHE_NAME_DHT).get(KEY_VAL));
+
+        grid(0).cache(CACHE_NAME_DHT).put(KEY_VAL, KEY_VAL);
+
+        assertEquals(KEY_VAL, grid(0).cache(CACHE_NAME_DHT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(1).cache(CACHE_NAME_DHT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(2).cache(CACHE_NAME_DHT).get(KEY_VAL));
+
+        assertFalse(grid(0).configuration().isClientMode());
+
+        // DHT Destroy. Cache should be removed from each node.
+
+        IgniteCache<Object, Object> cache = grid(0).cache(CACHE_NAME_DHT);
+
+        cache.destroy();
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientDoubleDestroy() throws Exception {
+        clientDestroy();
+
+        clientDestroy();
+    }
+
+    /**
+     * Test Client Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void clientDestroy() throws Exception {
+        grid(0).getOrCreateCache(getClientConfig());
+
+        assertNull(grid(0).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+
+        grid(0).cache(CACHE_NAME_CLIENT).put(KEY_VAL, KEY_VAL);
+
+        assertEquals(KEY_VAL, grid(0).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(1).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(2).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+
+        // DHT Destroy from client node. Cache should be removed from each node.
+
+        assertTrue(grid(2).configuration().isClientMode());
+
+        IgniteCache<Object, Object> cache = grid(2).cache(CACHE_NAME_CLIENT);
+
+        cache.destroy(); // Client node.
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearDoubleDestroy() throws Exception {
+        nearDestroy();
+
+        nearDestroy();
+    }
+
+    /**
+     * Test Near Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void nearDestroy() throws Exception {
+        grid(0).getOrCreateCache(getNearConfig());
+
+        grid(2).getOrCreateNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assertNull(grid(0).cache(CACHE_NAME_NEAR).get(KEY_VAL));
+        assertNull(grid(2).cache(CACHE_NAME_NEAR).get(KEY_VAL));
+
+        grid(2).cache(CACHE_NAME_NEAR).put(KEY_VAL, KEY_VAL);
+        grid(0).cache(CACHE_NAME_NEAR).put(KEY_VAL, "near-test");
+
+        assertEquals("near-test", grid(2).cache(CACHE_NAME_NEAR).localPeek(KEY_VAL));
+
+        // Near cache destroy. Cache should be removed from each node.
+
+        IgniteCache<Object, Object> cache = grid(2).cache(CACHE_NAME_NEAR);
+
+        cache.destroy();
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalDoubleDestroy() throws Exception {
+        localDestroy();
+
+        localDestroy();
+    }
+
+    /**
+     * Test Local Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void localDestroy() throws Exception {
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 0);
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 1);
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 0);
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 1);
+
+        grid(0).cache(CACHE_NAME_LOC).destroy();
+
+        assertNull(grid(0).cache(CACHE_NAME_LOC));
+    }
+
+    /**
+     * Test Dht close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtClose() throws Exception {
+        IgniteCache<Integer, Integer> dhtCache0 = grid(0).getOrCreateCache(getDhtConfig());
+
+        final Integer key = primaryKey(dhtCache0);
+
+        assertNull(dhtCache0.get(key));
+
+        dhtCache0.put(key, key);
+
+        assertEquals(key, dhtCache0.get(key));
+
+        // DHT Close. No-op.
+
+        IgniteCache<Integer, Integer> dhtCache1 = grid(1).cache(CACHE_NAME_DHT);
+        IgniteCache<Integer, Integer> dhtCache2 = grid(2).cache(CACHE_NAME_DHT);
+
+        dhtCache0.close();
+
+        try {
+            dhtCache0.get(key);// Not affected, but can not be taken.
+
+            fail();
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        assertEquals(key, dhtCache1.get(key)); // Not affected.
+        assertEquals(key, dhtCache2.get(key));// Not affected.
+
+        // DHT Creation after closed.
+
+        IgniteCache<Integer, Integer> dhtCache0New = grid(0).cache(CACHE_NAME_DHT);
+
+        assertNotSame(dhtCache0, dhtCache0New);
+
+        assertEquals(key, dhtCache0New.get(key)); // Not affected, can be taken since cache reopened.
+
+        dhtCache2.put(key, key + 1);
+
+        assertEquals((Object)(key + 1), dhtCache0New.get(key));
+
+        // Check close at last node.
+
+        stopAllGrids(true);
+
+        startGrid(0);
+
+        dhtCache0 = grid(0).getOrCreateCache(getDhtConfig());
+
+        assertNull(dhtCache0.get(key));
+
+        dhtCache0.put(key, key);
+
+        assertEquals(key, dhtCache0.get(key));
+
+        // Closing last node.
+        dhtCache0.close();
+
+        try {
+            dhtCache0.get(key);// Can not be taken.
+
+            fail();
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        // Reopening cache.
+        dhtCache0 = grid(0).cache(CACHE_NAME_DHT);
+
+        assertEquals(key, dhtCache0.get(key)); // Entry not loosed.
+    }
+
+    /**
+     * Test Dht close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getDhtConfig())) {
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_DHT);
+                IgniteCache<String, String> cache2 = grid(2).cache(CACHE_NAME_DHT);
+
+                if (i == 0) {
+                    assert cache0.get(KEY_VAL) == null;
+                    assert cache1.get(KEY_VAL) == null;
+                    assert cache2.get(KEY_VAL) == null;
+                }
+                else {
+                    assert cache0.get(KEY_VAL).equals(curVal);
+                    assert cache1.get(KEY_VAL).equals(curVal);
+                    assert cache2.get(KEY_VAL).equals(curVal);
+                }
+
+                curVal = KEY_VAL + curVal;
+
+                cache0.put(KEY_VAL, curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+        }
+    }
+
+    /**
+     * Test Client close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientClose() throws Exception {
+        IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getClientConfig());
+
+        assert cache0.get(KEY_VAL) == null;
+
+        cache0.put(KEY_VAL, KEY_VAL);
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL);
+
+        // DHT Close from client node. Should affect only client node.
+
+        IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_CLIENT);
+        IgniteCache<String, String> cache2 = grid(2).cache(CACHE_NAME_CLIENT);
+
+        assert cache2.get(KEY_VAL).equals(KEY_VAL);
+
+        cache2.close();// Client node.
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL);// Not affected.
+        assert cache1.get(KEY_VAL).equals(KEY_VAL);// Not affected.
+
+        try {
+            cache2.get(KEY_VAL);// Affected.
+
+            assert false;
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        // DHT Creation from client node after closed.
+        IgniteCache<String, String> cache2New = grid(2).cache(CACHE_NAME_CLIENT);
+
+        assertNotSame(cache2, cache2New);
+
+        assert cache2New.get(KEY_VAL).equals(KEY_VAL);
+
+        cache0.put(KEY_VAL, KEY_VAL + "recreated");
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache2New.get(KEY_VAL).equals(KEY_VAL + "recreated");
+    }
+
+    /**
+     * Test Client close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateCache(getClientConfig())) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_CLIENT);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_CLIENT);
+
+                if (i == 0) {
+                    assert cache0.get(KEY_VAL) == null;
+                    assert cache1.get(KEY_VAL) == null;
+                    assert cache2.get(KEY_VAL) == null;
+                }
+                else {
+                    assert cache0.get(KEY_VAL).equals(curVal);
+                    assert cache1.get(KEY_VAL).equals(curVal);
+                    assert cache2.get(KEY_VAL).equals(curVal);
+                }
+
+                curVal = KEY_VAL + curVal;
+
+                cache2.put(KEY_VAL, curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+
+            awaitPartitionMapExchange();
+        }
+    }
+
+    /**
+     * Test Near close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearClose() throws Exception {
+        IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getNearConfig());
+
+        // GridDhtTxPrepareRequest requests to Client node will be counted.
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.nodeFilter = grid(2).context().localNodeId();
+
+        // Near Close from client node.
+
+        IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_NEAR);
+        IgniteCache<String, String> cache2 = grid(2).createNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assert cache2.get(KEY_VAL) == null;
+
+        // Subscribing to events.
+        cache2.put(KEY_VAL, KEY_VAL);
+
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.set(0);
+
+        cache0.put(KEY_VAL, "near-test");
+
+        U.sleep(1000);
+
+        //Ensure near cache was automatically updated.
+        assert CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.get() != 0;
+
+        assert cache2.localPeek(KEY_VAL).equals("near-test");
+
+        cache2.close();
+
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.set(0);
+
+        // Should not produce messages to client node.
+        cache0.put(KEY_VAL, KEY_VAL + 0);
+
+        U.sleep(1000);
+
+        // Ensure near cache was NOT automatically updated.
+        assert CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.get() == 0;
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + 0);// Not affected.
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + 0);// Not affected.
+
+        try {
+            cache2.get(KEY_VAL);// Affected.
+
+            assert false;
+        }
+        catch (IllegalArgumentException | IllegalStateException ignored) {
+            // No-op
+        }
+
+        // Near Creation from client node after closed.
+
+        IgniteCache<String, String> cache2New = grid(2).createNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assertNotSame(cache2, cache2New);
+
+        // Subscribing to events.
+        cache2New.put(KEY_VAL, KEY_VAL);
+
+        assert cache2New.localPeek(KEY_VAL).equals(KEY_VAL);
+
+        cache0.put(KEY_VAL, KEY_VAL + "recreated");
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache2New.localPeek(KEY_VAL).equals(KEY_VAL + "recreated");
+    }
+
+    /**
+     * Test Near close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearCloseWithTry() throws Exception {
+        String curVal = null;
+
+        grid(0).getOrCreateCache(getNearConfig());
+
+        NearCacheConfiguration nearCfg = new NearCacheConfiguration();
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateNearCache(CACHE_NAME_NEAR, nearCfg)) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_NEAR);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_NEAR);
+
+                assert cache2.localPeek(KEY_VAL) == null;
+
+                assert cache0.get(KEY_VAL) == null || cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL) == null || cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL) == null || cache2.get(KEY_VAL).equals(curVal);
+
+                curVal = KEY_VAL + curVal;
+
+                cache2.put(KEY_VAL, curVal);
+
+                assert cache2.localPeek(KEY_VAL).equals(curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+        }
+    }
+
+    /**
+     * Test Local close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalClose() throws Exception {
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 0);
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 1);
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 0);
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 1);
+
+        // Local close. Same as Local destroy.
+
+        IgniteCache<Object, Object> cache = grid(1).cache(CACHE_NAME_LOC);
+
+        cache.close();
+
+        checkUsageFails(cache);
+
+        assertNull(grid(1).cache(CACHE_NAME_LOC));
+
+        // Local creation after closed.
+
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated0");
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated1");
+        grid(2).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated2");
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated0");
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated1");
+        assert grid(2).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated2");
+    }
+
+    /**
+     * Test Local close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateCache(getLocalConfig())) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_LOC);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_LOC);
+
+                assert cache0.get(KEY_VAL) == null;
+                assert cache1.get(KEY_VAL) == null;
+                assert cache2.get(KEY_VAL) == null;
+
+                curVal = KEY_VAL + curVal;
+
+                cache0.put(KEY_VAL, curVal + 1);
+                cache1.put(KEY_VAL, curVal + 2);
+                cache2.put(KEY_VAL, curVal + 3);
+
+                assert cache0.get(KEY_VAL).equals(curVal + 1);
+                assert cache1.get(KEY_VAL).equals(curVal + 2);
+                assert cache2.get(KEY_VAL).equals(curVal + 3);
+            }
+        }
+    }
+
+    /**
+     * Tests concurrent close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testConcurrentCloseSetWithTry() throws Exception {
+        final AtomicInteger a1 = new AtomicInteger();
+        final AtomicInteger a2 = new AtomicInteger();
+        final AtomicInteger a3 = new AtomicInteger();
+        final AtomicInteger a4 = new AtomicInteger();
+
+        Thread t1 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-1");
+
+                closeWithTry(a1, 0);
+            }
+        });
+        Thread t2 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-2");
+
+                closeWithTry(a2, 0);
+            }
+        });
+        Thread t3 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-3");
+
+                closeWithTry(a3, 2);
+            }
+        });
+        Thread t4 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-4");
+
+                closeWithTry(a4, 2);
+            }
+        });
+
+        IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(getDhtConfig());
+
+        cache.close();
+
+        t1.start();
+        t2.start();
+        t3.start();
+        t4.start();
+
+        try {
+            U.sleep(1000);
+        }
+        finally {
+            stop = true;
+        }
+
+        t1.join();
+        t2.join();
+        t3.join();
+        t4.join();
+
+        assert a1.get() > 1;
+        assert a2.get() > 1;
+        assert a3.get() > 1;
+        assert a4.get() > 1;
+
+        checkUsageFails(cache);
+    }
+
+    /**
+     * @param a AtomicInteger.
+     * @param node Node.
+     */
+    public void closeWithTry(AtomicInteger a, int node) {
+        while (!stop) {
+            try (IgniteCache<String, String> cache = grid(node).getOrCreateCache(getDhtConfig())) {
+                a.incrementAndGet();
+
+                assert cache.get(KEY_VAL) == null || cache.get(KEY_VAL).equals(KEY_VAL);
+
+                cache.put(KEY_VAL, KEY_VAL);
+
+                assert cache.get(KEY_VAL).equals(KEY_VAL);
+            }
+        }
+    }
+
+    /**
+     * Tests start -> destroy -> start -> close using CacheManager.
+     */
+    public void testTckStyleCreateDestroyClose() {
+        CacheManager mgr = Caching.getCachingProvider().getCacheManager();
+
+        String cacheName = "cache";
+
+        mgr.createCache(cacheName, new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));
+
+        mgr.destroyCache(cacheName);
+
+        Cache<Integer, String> cache = mgr.createCache(cacheName,
+            new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));
+
+        cache.close();
+
+        cache.close();
+
+        try {
+            cache.get(1);
+
+            fail();
+        }
+        catch (IllegalStateException e) {
+            // No-op;
+        }
+    }
+
+    /**
+     * @param cache Cache.
+     * @throws Exception If failed.
+     */
+    private void checkDestroyed(IgniteCache<Object, Object> cache) throws Exception {
+        checkUsageFails(cache);
+
+        awaitPartitionMapExchange();
+
+        String cacheName = cache.getName();
+
+        for (int i = 0; i < 3; i++)
+            assertNull("Unexpected cache for node: " + i, grid(i).cache(cacheName));
+    }
+
+    /**
+     * @param cache Cache.
+     * @throws Exception If failed.
+     */
+    private void checkUsageFails(IgniteCache<Object, Object> cache) throws Exception {
+        try {
+            cache.get(0);
+
+            fail();
+        }
+        catch (IllegalStateException e) {
+            // No-op.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
index 82667d9..2d52933 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
@@ -163,7 +163,7 @@ public abstract class CacheStoreUsageMultinodeDynamicStartAbstractTest extends C
             cache = srv.cache(null);
 
             if (cache != null)
-                cache.close();
+                cache.destroy();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
index b9acd99..e640f82 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
@@ -88,7 +88,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        ignite.cache(null).close();
+        ignite.cache(null).destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index cd19703..d1f8016 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -175,7 +175,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
         GridTestUtils.runMultiThreaded(new Callable<Object>() {
             @Override public Object call() throws Exception {
-                futs.add(kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME));
+                futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME));
 
                 return null;
             }
@@ -237,7 +237,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             @Override public Object call() throws Exception {
                 IgniteEx kernal = grid(ThreadLocalRandom.current().nextInt(nodeCount()));
 
-                futs.add(kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME));
+                futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME));
 
                 return null;
             }
@@ -300,7 +300,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
         for (int g = 0; g < nodeCount(); g++)
             caches[g] = grid(g).cache(DYNAMIC_CACHE_NAME);
 
-        kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+        kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
         for (int g = 0; g < nodeCount(); g++) {
             final IgniteKernal kernal0 = (IgniteKernal) grid(g);
@@ -353,7 +353,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             }
 
             // Undeploy cache.
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
             startGrid(nodeCount() + 1);
 
@@ -430,7 +430,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                     }, IllegalArgumentException.class, null);
             }
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
             stopGrid(nodeCount() + 1);
             stopGrid(nodeCount());
@@ -483,7 +483,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    IgniteKernal ignite = (IgniteKernal) grid(nodeCount());
+                    IgniteKernal ignite = (IgniteKernal)grid(nodeCount());
 
                     return ignite.getCache(DYNAMIC_CACHE_NAME);
                 }
@@ -497,7 +497,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -539,7 +539,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -585,7 +585,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -638,10 +638,15 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
         }
 
-        try (IgniteCache<Object, Object> ignored = ignite(0).createCache(cfg)) {
+        IgniteCache<Object, Object> cache = ignite(0).createCache(cfg);
+
+        try {
             for (CountDownLatch start : starts)
                 start.await();
         }
+        finally {
+            cache.destroy();
+        }
 
         for (CountDownLatch stop : stops)
             stop.await();
@@ -665,28 +670,29 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             ccfg.setCacheMode(CacheMode.PARTITIONED);
             ccfg.setNodeFilter(NODE_FILTER);
 
-            try (IgniteCache cache = ig.createCache(ccfg, new NearCacheConfiguration())) {
-                assertNotNull(cache);
+            IgniteCache cache = ig.createCache(ccfg, new NearCacheConfiguration());
+            assertNotNull(cache);
 
-                GridCacheAdapter<Object, Object> cacheAdapter =
-                    ((IgniteKernal)ig).internalCache(DYNAMIC_CACHE_NAME);
+            GridCacheAdapter<Object, Object> cacheAdapter =
+                ((IgniteKernal)ig).internalCache(DYNAMIC_CACHE_NAME);
 
-                assertNotNull(cacheAdapter);
-                assertFalse(cacheAdapter.context().affinityNode());
-                assertTrue(cacheAdapter.context().isNear());
+            assertNotNull(cacheAdapter);
+            assertFalse(cacheAdapter.context().affinityNode());
+            assertTrue(cacheAdapter.context().isNear());
 
-                try {
-                    IgniteEx grid = startGrid(nodeCount() + 1);
+            try {
+                IgniteEx grid = startGrid(nodeCount() + 1);
 
-                    // Check that new node sees near node.
-                    GridDiscoveryManager disco = grid.context().discovery();
+                // Check that new node sees near node.
+                GridDiscoveryManager disco = grid.context().discovery();
 
-                    assertTrue(disco.cacheNearNode(disco.node(ig.cluster().localNode().id()),
-                        DYNAMIC_CACHE_NAME));
-                }
-                finally {
-                    stopGrid(nodeCount() + 1);
-                }
+                assertTrue(disco.cacheNearNode(disco.node(ig.cluster().localNode().id()),
+                    DYNAMIC_CACHE_NAME));
+            }
+            finally {
+                cache.destroy();
+
+                stopGrid(nodeCount() + 1);
             }
         }
         finally {
@@ -955,14 +961,14 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
         cfg.setNodeFilter(F.not(NODE_FILTER));
 
-        try (IgniteCache<Object, Object> ignored = ignite(0).createCache(cfg)) {
+        IgniteCache<Object, Object> cache = ignite(0).createCache(cfg);
 
-            final CountDownLatch[] latches = new CountDownLatch[nodeCount()];
+        final CountDownLatch[] latches = new CountDownLatch[nodeCount()];
 
-            IgnitePredicate[] lsnrs = new IgnitePredicate[nodeCount()];
+        IgnitePredicate[] lsnrs = new IgnitePredicate[nodeCount()];
 
-            for (int i = 0; i < nodeCount(); i++) {
-                final int idx = i;
+        for (int i = 0; i < nodeCount(); i++) {
+            final int idx = i;
 
                 latches[i] = new CountDownLatch(1);
                 lsnrs[i] = new IgnitePredicate<CacheEvent>() {
@@ -971,29 +977,30 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                             case EventType.EVT_CACHE_NODES_LEFT:
                                 latches[idx].countDown();
 
-                                break;
+                            break;
 
-                            default:
-                                assert false;
-                        }
+                        default:
+                            assert false;
+                    }
 
-                        assertEquals(DYNAMIC_CACHE_NAME, e.cacheName());
+                    assertEquals(DYNAMIC_CACHE_NAME, e.cacheName());
 
-                        return true;
-                    }
-                };
+                    return true;
+                }
+            };
 
-                ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
-            }
+            ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
+        }
 
-            stopGrid(nodeCount());
+        stopGrid(nodeCount());
 
-            for (CountDownLatch latch : latches)
-                latch.await();
+        for (CountDownLatch latch : latches)
+            latch.await();
 
-            for (int i = 0; i < nodeCount(); i++)
-                ignite(i).events().stopLocalListen(lsnrs[i]);
-        }
+        for (int i = 0; i < nodeCount(); i++)
+            ignite(i).events().stopLocalListen(lsnrs[i]);
+
+        cache.destroy();
     }
 
     /**
@@ -1007,7 +1014,9 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
         try {
             CacheConfiguration cfg = new CacheConfiguration(DYNAMIC_CACHE_NAME);
 
-            try (IgniteCache cache = ignite(0).createCache(cfg)) {
+            IgniteCache cache = ignite(0).createCache(cfg);
+
+            try {
                 for (int i = 0; i < 100; i++) {
                     assertFalse(ignite(0).affinity(DYNAMIC_CACHE_NAME).mapKeyToPrimaryAndBackups(i)
                         .contains(dNode.cluster().localNode()));
@@ -1015,6 +1024,9 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                     cache.put(i, i);
                 }
             }
+            finally {
+                cache.destroy();
+            }
         }
         finally {
             stopGrid(nodeCount());
@@ -1027,23 +1039,25 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAwaitPartitionMapExchange() throws Exception {
-        try (IgniteCache ignored = grid(0).getOrCreateCache(new CacheConfiguration(DYNAMIC_CACHE_NAME))) {
-            awaitPartitionMapExchange();
+        IgniteCache cache = grid(0).getOrCreateCache(new CacheConfiguration(DYNAMIC_CACHE_NAME));
 
-            startGrid(nodeCount());
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        startGrid(nodeCount());
 
-            startGrid(nodeCount() + 1);
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        startGrid(nodeCount() + 1);
 
-            stopGrid(nodeCount() + 1);
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        stopGrid(nodeCount() + 1);
 
-            stopGrid(nodeCount());
-        }
+        awaitPartitionMapExchange();
+
+        stopGrid(nodeCount());
+
+        cache.destroy();
     }
 
     /**
@@ -1084,9 +1098,11 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                 if (iter % 10 == 0)
                     log.info("Cache start/stop iteration: " + iter);
 
-                try (IgniteCache<Object, Object> cache = ignite1.getOrCreateCache("cache-" + iter)) {
-                    assertNotNull(cache);
-                }
+                IgniteCache<Object, Object> cache = ignite1.getOrCreateCache("cache-" + iter);
+
+                assertNotNull(cache);
+
+                cache.destroy();
 
                 iter++;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index d60a0c3..5a51a1b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -498,7 +498,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
         spi1.reset();
         spi2.reset();
 
-        assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache("cache1"));
+        assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1));
 
         if (nearCache)
             ignite2.getOrCreateNearCache(CACHE_NAME1, new NearCacheConfiguration<>());
@@ -507,7 +507,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 1));
 
-        GridCacheAdapter cache = ((IgniteKernal)ignite2).context().cache().context().cache().internalCache("cache1");
+        GridCacheAdapter cache = ((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1);
 
         assertNotNull(cache);
         assertEquals(nearCache, cache.context().isNear());
@@ -533,6 +533,29 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
         spi1.reset();
         spi2.reset();
 
+        AffinityTopologyVersion topVer;
+
+        if (!srvNode) {
+            log.info("Close client cache: " + CACHE_NAME1);
+
+            ignite2.cache(CACHE_NAME1).close();
+
+            assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1));
+
+            waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 2));
+
+            assertEquals(0, spi0.partitionsSingleMessages());
+            assertEquals(0, spi0.partitionsFullMessages());
+            assertEquals(0, spi1.partitionsSingleMessages());
+            assertEquals(0, spi1.partitionsFullMessages());
+            assertEquals(0, spi2.partitionsSingleMessages());
+            assertEquals(0, spi2.partitionsFullMessages());
+
+            topVer = new AffinityTopologyVersion(3, 3);
+        }
+        else
+            topVer = new AffinityTopologyVersion(3, 2);
+
         final String CACHE_NAME2 = "cache2";
 
         ccfg = new CacheConfiguration();
@@ -541,7 +564,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         ignite2.createCache(ccfg);
 
-        waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 2));
+        waitForTopologyUpdate(3, topVer);
 
         assertEquals(0, spi0.partitionsSingleMessages());
         assertEquals(2, spi0.partitionsFullMessages());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
index 3d44600..f4b0d2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
@@ -96,7 +96,7 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         if (cache != null)
-            cache.close();
+            cache.destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
index 12b6458..470ac79 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
@@ -76,15 +76,17 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest
                 while (System.currentTimeMillis() < stopTime) {
                     String cacheName = "cache-" + threadIdx + "-" + (iter % 10);
 
-                    try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName)) {
-                        try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
-                            ((DataStreamerImpl<Object, Object>)stmr).maxRemapCount(0);
+                    IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName);
 
-                            for (int i = 0; i < 1000; i++)
-                                stmr.addData(i, i);
-                        }
+                    try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
+                        ((DataStreamerImpl<Object, Object>)stmr).maxRemapCount(0);
+
+                        for (int i = 0; i < 1000; i++)
+                            stmr.addData(i, i);
                     }
 
+                    cache.destroy();
+
                     iter++;
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 12d2b05..bde3a72 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -131,6 +131,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
 
         suite.addTestSuite(CacheRemoveAllSelfTest.class);
 
+        suite.addTestSuite(CacheStopAndDestroySelfTest.class);
+
         suite.addTestSuite(CacheOffheapMapEntrySelfTest.class);
 
         suite.addTestSuite(CacheJdbcStoreSessionListenerSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
index eea3a9b..701668b0 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
@@ -109,9 +109,9 @@ public class CacheConfigurationP2PTestClient {
             if (cnt != 600)
                 throw new Exception("Unexpected query result: " + cnt);
 
-            cache1.close();
+            cache1.destroy();
 
-            cache2.close();
+            cache2.destroy();
         }
     }
 }


[49/50] [abbrv] incubator-ignite git commit: Merge tag '1.3.1'

Posted by sb...@apache.org.
Merge tag '1.3.1'

community version 1.3.1 release (REV c559692d6b3aa96316dc0c9b2874c67179489a87)

Conflicts:
	examples/pom.xml
	modules/aop/pom.xml
	modules/aws/pom.xml
	modules/clients/pom.xml
	modules/cloud/pom.xml
	modules/codegen/pom.xml
	modules/core/pom.xml
	modules/core/src/main/resources/ignite.properties
	modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
	modules/extdata/p2p/pom.xml
	modules/extdata/uri/modules/uri-dependency/pom.xml
	modules/extdata/uri/pom.xml
	modules/gce/pom.xml
	modules/geospatial/pom.xml
	modules/hadoop/pom.xml
	modules/hibernate/pom.xml
	modules/indexing/pom.xml
	modules/jcl/pom.xml
	modules/jta/pom.xml
	modules/kafka/pom.xml
	modules/log4j/pom.xml
	modules/mesos/pom.xml
	modules/rest-http/pom.xml
	modules/scalar-2.10/pom.xml
	modules/scalar/pom.xml
	modules/schedule/pom.xml
	modules/schema-import/pom.xml
	modules/slf4j/pom.xml
	modules/spark-2.10/pom.xml
	modules/spark/pom.xml
	modules/spring/pom.xml
	modules/ssh/pom.xml
	modules/tools/pom.xml
	modules/urideploy/pom.xml
	modules/visor-console-2.10/pom.xml
	modules/visor-console/pom.xml
	modules/visor-plugins/pom.xml
	modules/web/pom.xml
	modules/yardstick/pom.xml
	pom.xml


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

Branch: refs/heads/ignite-901
Commit: 13e55b2469c3fb00bf7f1726e5ade1594d476c72
Parents: 77da728 c559692
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 16 10:14:58 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 16 10:14:58 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   8 +
 RELEASE_NOTES.txt                               |   2 +
 assembly/LICENSE_FABRIC                         | 317 +++++++++++
 assembly/LICENSE_HADOOP                         | 270 ++++++++++
 assembly/NOTICE_FABRIC                          |  13 +
 assembly/NOTICE_HADOOP                          |  12 +
 assembly/dependencies-fabric.xml                |  13 +
 assembly/dependencies-hadoop.xml                |  12 +
 assembly/dependencies-visor-console.xml         |  20 +-
 assembly/release-base.xml                       |  10 -
 assembly/release-fabric.xml                     |  12 +
 assembly/release-hadoop.xml                     |  12 +
 modules/aop/licenses/aspectj-epl-license.txt    |  69 ---
 modules/apache-license-gen/pom.xml              |  48 ++
 .../src/main/resources/META-INF/licenses.txt.vm |  44 ++
 .../processors/cache/IgniteCacheFutureImpl.java |   6 +
 .../processors/cache/IgniteCacheProxy.java      |  55 +-
 .../util/future/GridFutureChainListener.java    |   4 -
 .../internal/util/future/IgniteFutureImpl.java  |  12 +-
 .../plugin/security/SecuritySubjectType.java    |   3 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  32 ++
 .../geospatial/licenses/jts-lgpl-license.txt    | 165 ------
 .../licenses/hibernate-lgpl-2.1-license.txt     | 174 ------
 modules/indexing/licenses/h2-epl-license.txt    |  69 ---
 modules/mesos/licenses/jetty-epl-license.txt    |  69 ---
 modules/mesos/pom.xml                           |   1 +
 .../apache/ignite/mesos/ClusterProperties.java  |  14 +
 .../apache/ignite/mesos/IgniteScheduler.java    |  26 +-
 modules/rest-http/pom.xml                       |   6 +-
 .../scalar-2.10/licenses/scala-bsd-license.txt  |  18 -
 modules/scalar/licenses/scala-bsd-license.txt   |  18 -
 .../licenses/cron4j-lgpl-2.1-license.txt        | 174 ------
 modules/slf4j/licenses/sl4j-mit-license.txt     |  21 -
 .../spark-2.10/licenses/scala-bsd-license.txt   |  18 -
 modules/spark/licenses/scala-bsd-license.txt    |  18 -
 modules/ssh/licenses/jcraft-revised-bsd.txt     |  28 -
 modules/tools/licenses/jodd-revised-bsd.txt     |  21 -
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 --
 modules/urideploy/pom.xml                       |   6 +-
 .../licenses/jline-bsd-license.txt              |  18 -
 .../licenses/scala-bsd-license.txt              |  18 -
 .../licenses/slf4j-mit-license.txt              |  21 -
 modules/web/pom.xml                             |   6 +-
 modules/yarn/README.txt                         |  28 +
 modules/yarn/licenses/apache-2.0.txt            | 202 +++++++
 modules/yarn/pom.xml                            | 101 ++++
 .../apache/ignite/yarn/ApplicationMaster.java   | 400 ++++++++++++++
 .../apache/ignite/yarn/ClusterProperties.java   | 432 +++++++++++++++
 .../org/apache/ignite/yarn/IgniteContainer.java |  84 +++
 .../org/apache/ignite/yarn/IgniteProvider.java  | 339 ++++++++++++
 .../apache/ignite/yarn/IgniteYarnClient.java    | 178 +++++++
 .../org/apache/ignite/yarn/package-info.java    |  22 +
 .../ignite/yarn/utils/IgniteYarnUtils.java      |  81 +++
 .../main/resources/ignite-default-config.xml    |  35 ++
 .../org/apache/ignite/IgniteYarnTestSuite.java  |  38 ++
 .../yarn/IgniteApplicationMasterSelfTest.java   | 532 +++++++++++++++++++
 parent/pom.xml                                  |  55 ++
 pom.xml                                         |   2 +
 58 files changed, 3420 insertions(+), 1042 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index f8d1ce3,0a8f87c..fb004bf
--- 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
@@@ -61,8 -61,15 +61,16 @@@ import static org.apache.ignite.transac
  /**
   * Full API cache test.
   */
 +@SuppressWarnings("TransientFieldInNonSerializableClass")
  public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
+     /** */
+     public static final CacheEntryProcessor<String, Integer, String> ERR_PROCESSOR =
+         new CacheEntryProcessor<String, Integer, String>() {
+             @Override public String process(MutableEntry<String, Integer> e, Object... args) {
+                 throw new RuntimeException("Failed!");
+             }
+         };
+ 
      /** Increment processor for invoke operations. */
      public static final EntryProcessor<String, Integer, String> INCR_PROCESSOR = new EntryProcessor<String, Integer, String>() {
          @Override public String process(MutableEntry<String, Integer> e, Object... args) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/modules/mesos/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/modules/rest-http/pom.xml
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/modules/web/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/parent/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13e55b24/pom.xml
----------------------------------------------------------------------


[44/50] [abbrv] incubator-ignite git commit: Fixed build.

Posted by sb...@apache.org.
Fixed build.


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

Branch: refs/heads/ignite-901
Commit: ee8820a7dee18759bd94a083e1359cf3ac7088f5
Parents: 8870668
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jul 13 13:47:02 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jul 13 13:47:02 2015 +0300

----------------------------------------------------------------------
 modules/mesos/pom.xml | 1 -
 modules/yarn/pom.xml  | 1 -
 2 files changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee8820a7/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 331083e..a8061ad 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -78,7 +78,6 @@
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
-                    <finalName>${project.artifactId}-${project.version}-full</finalName>
                     <archive>
                         <manifest>
                             <mainClass>org.apache.ignite.mesos.IgniteFramework</mainClass>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee8820a7/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index e87c7df..2679603 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -78,7 +78,6 @@
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
-                    <finalName>${project.artifactId}-${project.version}-full</finalName>
                     <archive>
                         <manifest>
                             <mainClass>org.apache.ignite.yarn.IgniteYarnClient</mainClass>


[07/50] [abbrv] incubator-ignite git commit: #YARN Code cleanup. Added tests.

Posted by sb...@apache.org.
#YARN Code cleanup. Added tests.


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

Branch: refs/heads/ignite-901
Commit: 7e072dc44eacd4ad088901ea7888aa8ccaf7d44a
Parents: 960e19d
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Tue Jun 9 19:02:56 2015 +0300
Committer: nikolay tikhonov <nt...@gridgain.com>
Committed: Tue Jun 9 19:02:56 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   |  31 ++-
 .../yarn/IgniteApplicationMasterSelfTest.java   | 226 ++++++++++++++++++-
 2 files changed, 243 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e072dc4/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 c552ea0..0ef1362 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
@@ -91,7 +91,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
                     Map<String, String> env = new HashMap<>(System.getenv());
 
-                    //env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
+                    env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
 
                     ctx.setEnvironment(env);
 
@@ -284,15 +284,18 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                 TimeUnit.MILLISECONDS.sleep(schedulerTimeout);
             }
         }
+        catch (InterruptedException e) {
+            // Un-register with ResourceManager
+            rmClient.unregisterApplicationMaster(FinalApplicationStatus.KILLED, "", "");
+
+            log.log(Level.WARNING, "Application master killed.");
+        }
         catch (Exception e) {
             // Un-register with ResourceManager
             rmClient.unregisterApplicationMaster(FinalApplicationStatus.FAILED, "", "");
 
-            System.exit(1);
+            log.log(Level.SEVERE, "Application master failed.", e);
         }
-
-        // Un-register with ResourceManager
-        rmClient.unregisterApplicationMaster(FinalApplicationStatus.KILLED, "", "");
     }
 
     /**
@@ -364,4 +367,22 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     public void setSchedulerTimeout(long schedulerTimeout) {
         this.schedulerTimeout = schedulerTimeout;
     }
+
+    /**
+     * Sets file system.
+     * @param fs File system.
+     */
+    public void setFs(FileSystem fs) {
+        this.fs = fs;
+    }
+
+    /**
+     * JUST FOR TESTING!!!
+     *
+     * @return Running containers.
+     */
+    @Deprecated
+    public Map<ContainerId, IgniteContainer> getContainers() {
+        return containers;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e072dc4/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 d865659..abac58e 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
@@ -18,8 +18,9 @@
 package org.apache.ignite.yarn;
 
 import junit.framework.*;
-import org.apache.curator.utils.ThreadUtils;
-import org.apache.hadoop.util.ThreadUtil;
+import org.apache.hadoop.fs.*;
+import org.apache.hadoop.fs.permission.*;
+import org.apache.hadoop.util.*;
 import org.apache.hadoop.yarn.api.protocolrecords.*;
 import org.apache.hadoop.yarn.api.records.*;
 import org.apache.hadoop.yarn.client.api.*;
@@ -27,8 +28,11 @@ import org.apache.hadoop.yarn.client.api.async.*;
 import org.apache.hadoop.yarn.exceptions.*;
 
 import java.io.*;
+import java.net.*;
 import java.nio.*;
 import java.util.*;
+import java.util.concurrent.*;
+import java.util.regex.*;
 
 /**
  * Application master tests.
@@ -52,7 +56,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
         props = new ClusterProperties();
         appMaster = new ApplicationMaster("test", props);
 
-        appMaster.setSchedulerTimeout(100000);
+        appMaster.setSchedulerTimeout(10000);
 
         rmMock.clear();
     }
@@ -82,7 +86,6 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
         }
     }
 
-
     /**
      * @throws Exception If failed.
      */
@@ -98,14 +101,125 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
 
         Thread thread = runAppMaster(appMaster);
 
-        interruptedThread(thread);
-
         List<AMRMClient.ContainerRequest> contRequests = collectRequests(rmMock, 1, 1000);
 
+        interruptedThread(thread);
+
         assertEquals(0, contRequests.size());
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testClusterAllocatedResource() throws Exception {
+        rmMock.availableRes(new MockResource(1024, 2));
+
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(new NMMock());
+
+        appMaster.setFs(new MockFileSystem());
+
+        props.cpusPerNode(8);
+        props.memoryPerNode(5000);
+        props.instances(3);
+
+        // Check that container resources
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 5, 2000)));
+        assertEquals(0, appMaster.getContainers().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 10, 2000)));
+        assertEquals(0, appMaster.getContainers().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 1, 7000)));
+        assertEquals(0, appMaster.getContainers().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 8, 5000)));
+        assertEquals(1, appMaster.getContainers().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 10, 7000)));
+        assertEquals(2, appMaster.getContainers().size());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartReleaseContainer() throws Exception {
+        rmMock.availableRes(new MockResource(1024, 2));
+
+        NMMock nmClient = new NMMock();
+
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(nmClient);
+
+        appMaster.setFs(new MockFileSystem());
+
+        props.cpusPerNode(8);
+        props.memoryPerNode(5000);
+        props.instances(3);
+
+        // Check that container resources
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 5, 2000)));
+        assertEquals(1, rmMock.releasedResources().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 5, 7000)));
+        assertEquals(2, rmMock.releasedResources().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 9, 2000)));
+        assertEquals(3, rmMock.releasedResources().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 8, 5000)));
+        assertEquals(3, rmMock.releasedResources().size());
+        assertEquals(1, nmClient.startedContainer().size());
+    }
+
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testHostnameConstraint() throws Exception {
+        rmMock.availableRes(new MockResource(1024, 2));
+
+        NMMock nmClient = new NMMock();
+
+        appMaster.setRmClient(rmMock);
+        appMaster.setNmClient(nmClient);
+
+        appMaster.setFs(new MockFileSystem());
+
+        props.cpusPerNode(8);
+        props.memoryPerNode(5000);
+        props.instances(3);
+        props.hostnameConstraint(Pattern.compile("ignoreHost"));
+
+        // Check that container resources
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("simple", 8, 5000)));
+        assertEquals(0, rmMock.releasedResources().size());
+        assertEquals(1, nmClient.startedContainer().size());
+
+        appMaster.onContainersAllocated(Collections.singletonList(createContainer("ignoreHost", 8, 5000)));
+        assertEquals(1, rmMock.releasedResources().size());
+        assertEquals(1, nmClient.startedContainer().size());
+    }
+
+    /**
+     * @param host Host.
+     * @param cpu Cpu count.
+     * @param mem Memory.
+     * @return Container.
+     */
+    private Container createContainer(String host, int cpu, int mem) {
+        return Container.newInstance(
+            ContainerId.newContainerId(ApplicationAttemptId.newInstance(ApplicationId.newInstance(0l, 0), 0),
+                ThreadLocalRandom.current().nextLong()),
+            NodeId.newInstance(host, 0),
+            "example.com",
+            new MockResource(mem, cpu),
+            Priority.newInstance(0),
+            null
+        );
+    }
+
+    /**
      * @param rmMock RM mock.
      * @param expectedCnt Expected cnt.
      * @param timeOut Timeout.
@@ -147,7 +261,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
     }
 
     /**
-     * Interrupt thread and wait.
+     * Interrupt thread and join.
      *
      * @param thread Thread.
      */
@@ -165,6 +279,9 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
         private List<AMRMClient.ContainerRequest> contRequests = new ArrayList<>();
 
         /** */
+        private List<ContainerId> releasedConts = new ArrayList<>();
+
+        /** */
         private Resource availableRes;
 
         /** */
@@ -180,6 +297,13 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
         }
 
         /**
+         * @return Released resources.
+         */
+        public List<ContainerId> releasedResources() {
+            return releasedConts;
+        }
+
+        /**
          * Sets resource.
          *
          * @param availableRes Available resource.
@@ -193,6 +317,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
          */
         public void clear() {
             contRequests.clear();
+            releasedConts.clear();
             availableRes = null;
         }
 
@@ -226,7 +351,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
 
         /** {@inheritDoc} */
         @Override public void releaseAssignedContainer(ContainerId containerId) {
-            // No-op.
+            releasedConts.add(containerId);
         }
 
         /** {@inheritDoc} */
@@ -250,13 +375,26 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
      */
     public static class NMMock extends NMClient {
         /** */
-        protected NMMock() {
+        private List<ContainerLaunchContext> startedContainer = new ArrayList<>();
+
+        /** */
+        public NMMock() {
             super("name");
         }
 
+        /**
+         * @return Started containers.
+         */
+        public List<ContainerLaunchContext> startedContainer() {
+            return startedContainer;
+        }
+
         /** {@inheritDoc} */
         @Override public Map<String, ByteBuffer> startContainer(Container container,
             ContainerLaunchContext containerLaunchContext) throws YarnException, IOException {
+
+            startedContainer.add(containerLaunchContext);
+
             return null;
         }
 
@@ -321,4 +459,74 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
             return 0;
         }
     }
+
+    /**
+     * Mock file system.
+     */
+    public static class MockFileSystem extends FileSystem {
+        /** */
+        public MockFileSystem() {
+        }
+
+        /** {@inheritDoc} */
+        @Override public Path makeQualified(Path path) {
+            return new Path("/test/path");
+        }
+
+        /** {@inheritDoc} */
+        @Override public FileStatus getFileStatus(Path f) throws IOException {
+            return new FileStatus();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException {
+            return false;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Path getWorkingDirectory() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setWorkingDirectory(Path new_dir) {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException {
+            return new FileStatus[0];
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean delete(Path f, boolean recursive) throws IOException {
+            return false;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean rename(Path src, Path dst) throws IOException {
+            return false;
+        }
+
+        /** {@inheritDoc} */
+        @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize,
+            short replication, long blockSize, Progressable progress) throws IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public URI getUri() {
+            return null;
+        }
+    }
 }


[28/50] [abbrv] incubator-ignite git commit: Fixed review notes.

Posted by sb...@apache.org.
Fixed review notes.


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

Branch: refs/heads/ignite-901
Commit: 7e0aef7f061e393406a1bdafb62530f5d5bb8d43
Parents: f627976
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 17:53:46 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 17:53:46 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   |  5 +-
 .../apache/ignite/yarn/ClusterProperties.java   | 22 +++-----
 .../org/apache/ignite/yarn/IgniteContainer.java |  4 +-
 .../org/apache/ignite/yarn/IgniteProvider.java  | 58 ++++++--------------
 .../apache/ignite/yarn/IgniteYarnClient.java    |  5 +-
 5 files changed, 33 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/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 9169178..0d1fc53 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
@@ -74,7 +74,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
-     * @param
+     * @param ignitePath Hdfs path to ignite.
+     * @param props Cluster properties.
      */
     public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
         this.conf = new YarnConfiguration();
@@ -146,7 +147,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
     /**
      * @param cont Container.
-     * @return {@code True} if
+     * @return {@code True} if container satisfies requirements.
      */
     private boolean checkContainer(Container cont) {
         // Check limit on running nodes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/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 a2d88c0..e7bdc84 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
@@ -69,13 +69,10 @@ public class ClusterProperties {
     private double nodeCnt = DEFAULT_IGNITE_NODE_COUNT;
 
     /** */
-    public static final String IGNITE_VERSION = "IGNITE_VERSION";
-
-    /** */
-    public static final String DEFAULT_IGNITE_VERSION = "latest";
+    public static final String IGNITE_URL = "IGNITE_URL";
 
     /** Ignite version. */
-    private String igniteVer = DEFAULT_IGNITE_VERSION;
+    private String igniteUrl = null;
 
     /** */
     public static final String IGNITE_WORKING_DIR = "IGNITE_WORKING_DIR";
@@ -152,7 +149,6 @@ public class ClusterProperties {
         return clusterName;
     }
 
-
     /**
      * @return CPU count limit.
      */
@@ -209,8 +205,8 @@ public class ClusterProperties {
     /**
      * @return Ignite version.
      */
-    public String igniteVer() {
-        return igniteVer;
+    public String igniteUrl() {
+        return igniteUrl;
     }
 
     /**
@@ -256,14 +252,14 @@ public class ClusterProperties {
     }
 
     /**
-     * @return Licence path.
+     * @return Ignite hdfs path.
      */
     public String ignitePath() {
         return ignitePath;
     }
 
     /**
-     * @return Licence path.
+     * @return Jvm opts.
      */
     public String jvmOpts() {
         return jvmOpts;
@@ -298,7 +294,7 @@ public class ClusterProperties {
             prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, DEFAULT_MEM_PER_NODE);
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
 
-            prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
+            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);
@@ -338,7 +334,7 @@ public class ClusterProperties {
         prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, DEFAULT_MEM_PER_NODE);
         prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, DEFAULT_IGNITE_NODE_COUNT);
 
-        prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
+        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);
@@ -376,7 +372,7 @@ public class ClusterProperties {
         envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
-        envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
+        envs.put(IGNITE_URL, toEnvVal(igniteUrl));
         envs.put(IGNITE_PATH, toEnvVal(ignitePath));
         envs.put(LICENCE_PATH, toEnvVal(licencePath));
         envs.put(IGNITE_JVM_OPTS, toEnvVal(jvmOpts));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
index 313e9e1..c3cec52 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -77,9 +77,7 @@ public class IgniteContainer {
         return mem;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     @Override public String toString() {
         return "IgniteTask [host=" + nodeId.getHost() + ", cpuCores=" + cpuCores + ", mem=" + mem + ']';
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index 253752d..a5d655d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -33,9 +33,6 @@ public class IgniteProvider {
     public static final String DOWNLOAD_LINK = "http://tiny.cc/updater/download_community.php";
 
     /** */
-    public static final String DIRECT_DOWNLOAD_LINK = "http://www.gridgain.com/media/gridgain-community-fabric-";
-
-    /** */
     private ClusterProperties props;
 
     /** */
@@ -175,44 +172,19 @@ public class IgniteProvider {
      * @return Ignite.
      */
     public Path getIgnite(String version) throws Exception {
-        File folder = checkDownloadFolder();
-
-        // Check to hdfs contains required ignite version.
-        List<String> hdfsFiles = findIgnites(fs, props.igniteReleasesDir());
-
-        if (hdfsFiles != null && !hdfsFiles.isEmpty()) {
-            for (String fileName : hdfsFiles) {
-                if (fileName.equals("gridgain-community-fabric-" + version + ".zip"))
-                    return new Path(formatPath(props.igniteReleasesDir(), version));
-            }
-        }
-
-        // Check local fs.
-        List<String> localFiles = findIgnites(folder);
-
-        if (localFiles != null) {
-            for (String fileName : localFiles) {
-                if (fileName.equals("gridgain-community-fabric-" + version + ".zip")) {
-                    Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
-
-                    fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
-
-                    return dst;
-                }
-            }
-        }
+        checkDownloadFolder();
 
         // Download ignite.
-        downloadIgnite(version);
+        String fileName = downloadIgnite(version);
 
-        Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
+        Path dst = new Path(props.igniteReleasesDir() + File.separator + fileName);
 
-        fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
+        if (!fs.exists(dst))
+            fs.copyFromLocalFile(new Path(props.igniteLocalWorkDir() + File.separator + fileName), dst);
 
         return dst;
     }
 
-
     /**
      * @param folder folder
      * @param version version
@@ -265,23 +237,26 @@ public class IgniteProvider {
     }
 
     /**
-     * @param version The current latest version.
-     * @return Ignite archive.
+     * @param igniteUrl Url to ignite.
+     * @return Ignite file name.
      */
-    private String downloadIgnite(String version) {
+    private String downloadIgnite(String igniteUrl) {
         try {
-            URL url = new URL(DIRECT_DOWNLOAD_LINK + version + ".zip");
+            URL url = new URL(igniteUrl);
 
             HttpURLConnection conn = (HttpURLConnection)url.openConnection();
 
             int code = conn.getResponseCode();
 
             if (code == 200) {
-                checkDownloadFolder();
-
                 String fileName = fileName(url.toString());
 
-                FileOutputStream outFile = new FileOutputStream(props.igniteLocalWorkDir() + File.separator + fileName);
+                String filePath = props.igniteLocalWorkDir() + File.separator + fileName;
+
+                if (new File(filePath).exists())
+                    return fileName;
+
+                FileOutputStream outFile = new FileOutputStream(filePath);
 
                 outFile.getChannel().transferFrom(Channels.newChannel(conn.getInputStream()), 0, Long.MAX_VALUE);
 
@@ -306,6 +281,9 @@ public class IgniteProvider {
         if (!file.exists())
             file.mkdirs();
 
+        if (!file.exists())
+            throw new RuntimeException("Couldn't create local directory! Path: " + file.toURI());
+
         return file;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 299f028..78e262d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -154,11 +154,10 @@ public class IgniteYarnClient {
     private static Path getIgnite(ClusterProperties props, FileSystem fileSystem) throws Exception {
         IgniteProvider provider = new IgniteProvider(props, fileSystem);
 
-        if (props.igniteVer() == null
-            || props.igniteVer().equalsIgnoreCase(ClusterProperties.DEFAULT_IGNITE_VERSION))
+        if (props.igniteUrl() == null)
             return provider.getIgnite();
         else
-            return provider.getIgnite(props.igniteVer());
+            return provider.getIgnite(props.igniteUrl());
     }
 
     /**