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/10/19 10:55:04 UTC

[1/2] ignite git commit: IGNITE-1653 fixes

Repository: ignite
Updated Branches:
  refs/heads/master bc6bf5fcd -> 50cf42a31


http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/ComputeScheduleExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/ComputeScheduleExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/ComputeScheduleExample.java
deleted file mode 100644
index 8c85a3e..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/ComputeScheduleExample.java
+++ /dev/null
@@ -1,68 +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.examples.java8.misc.schedule;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.scheduler.SchedulerFuture;
-
-/**
- * Demonstrates a cron-based {@link Runnable} execution scheduling.
- * Test runnable object broadcasts a phrase to all cluster nodes every minute
- * three times with initial scheduling delay equal to five seconds.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeScheduleExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println("Compute schedule example started.");
-
-            // Schedule output message every minute.
-            SchedulerFuture<?> fut = ignite.scheduler().scheduleLocal(() ->
-                ignite.compute().broadcast(() -> {
-                    System.out.println();
-                    System.out.println("Howdy! :)");
-
-                    return "Howdy! :)";
-                }),
-                "{5, 3} * * * * *" // Cron expression.
-            );
-
-            while (!fut.isDone())
-                System.out.println(">>> Invocation result: " + fut.get());
-
-            System.out.println();
-            System.out.println(">>> Schedule future is done and has been unscheduled.");
-            System.out.println(">>> Check all nodes for hello message output.");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/package-info.java
deleted file mode 100644
index 42132f1..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/misc/schedule/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates usage of cron-based scheduler.
- */
-package org.apache.ignite.examples.java8.misc.schedule;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamTransformerExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamTransformerExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamTransformerExample.java
deleted file mode 100644
index 538c4eb..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamTransformerExample.java
+++ /dev/null
@@ -1,101 +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.examples.java8.streaming;
-
-import java.util.List;
-import java.util.Random;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-import org.apache.ignite.stream.StreamTransformer;
-
-/**
- * Stream random numbers into the streaming cache.
- * To start the example, you should:
- * <ul>
- *     <li>Start a few nodes using {@link ExampleNodeStartup} or by starting remote nodes as specified below.</li>
- *     <li>Start streaming using {@link StreamTransformerExample}.</li>
- * </ul>
- * <p>
- * You should start remote nodes by running {@link ExampleNodeStartup} in another JVM.
- */
-public class StreamTransformerExample {
-    /** Random number generator. */
-    private static final Random RAND = new Random();
-
-    /** Range within which to generate numbers. */
-    private static final int RANGE = 1000;
-
-    public static void main(String[] args) throws Exception {
-        // Mark this cluster member as client.
-        Ignition.setClientMode(true);
-
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            if (!ExamplesUtils.hasServerNodes(ignite))
-                return;
-
-            CacheConfiguration<Integer, Long> cfg = new CacheConfiguration<>("randomNumbers");
-
-            // Index key and value.
-            cfg.setIndexedTypes(Integer.class, Long.class);
-
-            // Auto-close cache at the end of the example.
-            try (IgniteCache<Integer, Long> stmCache = ignite.getOrCreateCache(cfg)) {
-                try (IgniteDataStreamer<Integer, Long> stmr = ignite.dataStreamer(stmCache.getName())) {
-                    // Allow data updates.
-                    stmr.allowOverwrite(true);
-
-                    // Configure data transformation to count random numbers added to the stream.
-                    stmr.receiver(StreamTransformer.from((e, arg) -> {
-                        // Get current count.
-                        Long val = e.getValue();
-
-                        // Increment count by 1.
-                        e.setValue(val == null ? 1L : val + 1);
-
-                        return null;
-                    }));
-
-                    // Stream 10 million of random numbers into the streamer cache.
-                    for (int i = 1; i <= 10_000_000; i++) {
-                        stmr.addData(RAND.nextInt(RANGE), 1L);
-
-                        if (i % 500_000 == 0)
-                            System.out.println("Number of tuples streamed into Ignite: " + i);
-                    }
-                }
-
-                // Query top 10 most popular numbers every.
-                SqlFieldsQuery top10Qry = new SqlFieldsQuery("select _key, _val from Long order by _val desc limit 10");
-
-                // Execute queries.
-                List<List<?>> top10 = stmCache.query(top10Qry).getAll();
-
-                System.out.println("Top 10 most popular numbers:");
-
-                // Print top 10 words.
-                ExamplesUtils.printQueryResults(top10);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamVisitorExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamVisitorExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamVisitorExample.java
deleted file mode 100644
index cef9f2f..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/StreamVisitorExample.java
+++ /dev/null
@@ -1,172 +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.examples.java8.streaming;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Random;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-import org.apache.ignite.stream.StreamVisitor;
-
-/**
- * Stream random numbers into the streaming cache.
- * To start the example, you should:
- * <ul>
- *     <li>Start a few nodes using {@link ExampleNodeStartup} or by starting remote nodes as specified below.</li>
- *     <li>Start streaming using {@link StreamVisitorExample}.</li>
- * </ul>
- * <p>
- * You should start remote nodes by running {@link ExampleNodeStartup} in another JVM.
- */
-public class StreamVisitorExample {
-    /** Random number generator. */
-    private static final Random RAND = new Random();
-
-    /** The list of instruments. */
-    private static final String[] INSTRUMENTS = {"IBM", "GOOG", "MSFT", "GE", "EBAY", "YHOO", "ORCL", "CSCO", "AMZN", "RHT"};
-
-    /** The list of initial instrument prices. */
-    private static final double[] INITIAL_PRICES = {194.9, 893.49, 34.21, 23.24, 57.93, 45.03, 44.41, 28.44, 378.49, 69.50};
-
-    public static void main(String[] args) throws Exception {
-        // Mark this cluster member as client.
-        Ignition.setClientMode(true);
-
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            if (!ExamplesUtils.hasServerNodes(ignite))
-                return;
-
-            // Market data cache with default configuration.
-            CacheConfiguration<String, Double> mktDataCfg = new CacheConfiguration<>("marketTicks");
-
-            // Financial instrument cache configuration.
-            CacheConfiguration<String, Instrument> instCfg = new CacheConfiguration<>("instCache");
-
-            // Index key and value for querying financial instruments.
-            // Note that Instrument class has @QuerySqlField annotation for secondary field indexing.
-            instCfg.setIndexedTypes(String.class, Instrument.class);
-
-            // Auto-close caches at the end of the example.
-            try (
-                IgniteCache<String, Double> mktCache = ignite.getOrCreateCache(mktDataCfg);
-                IgniteCache<String, Instrument> instCache = ignite.getOrCreateCache(instCfg)
-            ) {
-                try (IgniteDataStreamer<String, Double> mktStmr = ignite.dataStreamer(mktCache.getName())) {
-                    // Note that we receive market data, but do not populate 'mktCache' (it remains empty).
-                    // Instead we update the instruments in the 'instCache'.
-                    // Since both, 'instCache' and 'mktCache' use the same key, updates are collocated.
-                    mktStmr.receiver(StreamVisitor.from((cache, e) -> {
-                        String symbol = e.getKey();
-                        Double tick = e.getValue();
-
-                        Instrument inst = instCache.get(symbol);
-
-                        if (inst == null)
-                            inst = new Instrument(symbol);
-
-                        // Don't populate market cache, as we don't use it for querying.
-                        // Update cached instrument based on the latest market tick.
-                        inst.update(tick);
-
-                        instCache.put(symbol, inst);
-                    }));
-
-                    // Stream 10 million market data ticks into the system.
-                    for (int i = 1; i <= 10_000_000; i++) {
-                        int idx = RAND.nextInt(INSTRUMENTS.length);
-
-                        // Use gaussian distribution to ensure that
-                        // numbers closer to 0 have higher probability.
-                        double price = round2(INITIAL_PRICES[idx] + RAND.nextGaussian());
-
-                        mktStmr.addData(INSTRUMENTS[idx], price);
-
-                        if (i % 500_000 == 0)
-                            System.out.println("Number of tuples streamed into Ignite: " + i);
-                    }
-                }
-
-                // Select top 3 best performing instruments.
-                SqlFieldsQuery top3qry = new SqlFieldsQuery(
-                    "select symbol, (latest - open) from Instrument order by (latest - open) desc limit 3");
-
-                // Execute queries.
-                List<List<?>> top3 = instCache.query(top3qry).getAll();
-
-                System.out.println("Top performing financial instruments: ");
-
-                // Print top 10 words.
-                ExamplesUtils.printQueryResults(top3);
-            }
-        }
-    }
-
-    /**
-     * Rounds double value to two significant signs.
-     *
-     * @param val value to be rounded.
-     * @return rounded double value.
-     */
-    private static double round2(double val) {
-        return Math.floor(100 * val + 0.5) / 100;
-    }
-
-    /**
-     * Financial instrument.
-     */
-    public static class Instrument implements Serializable {
-        /** Instrument symbol. */
-        @QuerySqlField(index = true)
-        private final String symbol;
-
-        /** Open price. */
-        @QuerySqlField(index = true)
-        private double open;
-
-        /** Close price. */
-        @QuerySqlField(index = true)
-        private double latest;
-
-        /**
-         * @param symbol Symbol.
-         */
-        public Instrument(String symbol) {
-            this.symbol = symbol;
-        }
-
-        /**
-         * Updates this instrument based on the latest market tick price.
-         *
-         * @param price Latest price.
-         */
-        public void update(double price) {
-            if (open == 0)
-                open = price;
-
-            this.latest = price;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/package-info.java
deleted file mode 100644
index d215d2f..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/streaming/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates usage of data streamer.
- */
-package org.apache.ignite.examples.java8.streaming;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples/config/hibernate/README.txt
----------------------------------------------------------------------
diff --git a/examples/config/hibernate/README.txt b/examples/config/hibernate/README.txt
deleted file mode 100644
index 5b7ab29..0000000
--- a/examples/config/hibernate/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Hibernate L2 Cache Configuration Example
-----------------------------------------
-
-This folder contains example-hibernate-L2-cache.xml file that demonstrates
-how to configure Hibernate to use Apache Ignite cache as an L2 cache provider.
-
-This file is also used in Hibernate example located in org.apache.ignite.examples.datagrid.hibernate
-package.

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples/config/hibernate/example-hibernate-L2-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/hibernate/example-hibernate-L2-cache.xml b/examples/config/hibernate/example-hibernate-L2-cache.xml
deleted file mode 100644
index 3248946..0000000
--- a/examples/config/hibernate/example-hibernate-L2-cache.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-
-
-<!DOCTYPE hibernate-configuration PUBLIC
-    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
-    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
-
-<!--
-    Configuration file for HibernateL2CacheExample.
--->
-
-<hibernate-configuration>
-    <session-factory>
-        <!-- Database connection settings -->
-        <property name="connection.url">jdbc:h2:mem:example;DB_CLOSE_DELAY=-1</property>
-
-        <!-- Drop and re-create the database schema on startup. -->
-        <property name="hbm2ddl.auto">create</property>
-
-        <!-- Enable L2 cache. -->
-        <property name="cache.use_second_level_cache">true</property>
-
-        <!-- Enable query cache. -->
-        <property name="cache.use_query_cache">true</property>
-
-        <!-- Generate L2 cache statistics. -->
-        <property name="generate_statistics">true</property>
-
-        <!-- Specify Ignite as L2 cache provider. -->
-        <property name="cache.region.factory_class">org.apache.ignite.cache.hibernate.HibernateRegionFactory</property>
-
-        <!-- Specify connection release mode. -->
-        <property name="connection.release_mode">on_close</property>
-
-        <!-- Set default L2 cache access type. -->
-        <property name="org.apache.ignite.hibernate.default_access_type">READ_ONLY</property>
-
-        <!-- Specify the entity classes for mapping. -->
-        <mapping class="org.apache.ignite.examples.datagrid.hibernate.User"/>
-        <mapping class="org.apache.ignite.examples.datagrid.hibernate.Post"/>
-
-        <!-- Per-class L2 cache settings. -->
-        <class-cache class="org.apache.ignite.examples.datagrid.hibernate.User" usage="read-only"/>
-        <class-cache class="org.apache.ignite.examples.datagrid.hibernate.Post" usage="read-only"/>
-        <collection-cache collection="org.apache.ignite.examples.datagrid.hibernate.User.posts" usage="read-only"/>
-    </session-factory>
-</hibernate-configuration>

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7b8763f..6eeb006 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,6 +147,72 @@
         </profile>
 
         <profile>
+            <id>lgpl</id>
+            <modules>
+                <module>modules/hibernate</module>
+                <module>modules/geospatial</module>
+                <module>modules/schedule</module>
+            </modules>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.apache.resources</groupId>
+                                <artifactId>apache-source-release-assembly-descriptor</artifactId>
+                                <version>1.0.4</version>
+                            </dependency>
+                        </dependencies>
+                        <executions>
+                            <execution>
+                                <id>release-lgpl</id>
+                                <phase>prepare-package</phase>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <configuration>
+                                    <descriptors>
+                                        <descriptor>assembly/release-${ignite.edition}-lgpl.xml</descriptor>
+                                    </descriptors>
+                                    <finalName>release-package</finalName>
+                                    <appendAssemblyId>false</appendAssemblyId>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <inherited>false</inherited>
+                        <executions>
+                            <execution>
+                                <id>release-postprocessing-lgpl</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <target>
+                                        <replaceregexp file="${basedir}/target/release-package/examples-lgpl/pom.xml"
+                                                       byline="true">
+                                            <regexp pattern="to_be_replaced_by_ignite_version"/>
+                                            <substitution expression="${project.version}"/>
+                                        </replaceregexp>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>release</id>
             <activation>
                 <activeByDefault>true</activeByDefault>
@@ -459,72 +525,6 @@
         </profile>
 
         <profile>
-            <id>lgpl</id>
-            <modules>
-                <module>modules/hibernate</module>
-                <module>modules/geospatial</module>
-                <module>modules/schedule</module>
-            </modules>
-
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <dependencies>
-                            <dependency>
-                                <groupId>org.apache.apache.resources</groupId>
-                                <artifactId>apache-source-release-assembly-descriptor</artifactId>
-                                <version>1.0.4</version>
-                            </dependency>
-                        </dependencies>
-                        <executions>
-                            <execution>
-                                <id>release-lgpl</id>
-                                <phase>prepare-package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>assembly/release-${ignite.edition}-lgpl.xml</descriptor>
-                                    </descriptors>
-                                    <finalName>release-package</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <version>1.7</version>
-                        <inherited>false</inherited>
-                        <executions>
-                            <execution>
-                                <id>release-postprocessing-lgpl</id>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                                <phase>package</phase>
-                                <configuration>
-                                    <target>
-                                        <replaceregexp file="${basedir}/target/release-package/examples-lgpl/pom.xml"
-                                                       byline="true">
-                                            <regexp pattern="to_be_replaced_by_ignite_version"/>
-                                            <substitution expression="${project.version}"/>
-                                        </replaceregexp>
-                                    </target>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
             <id>examples</id>
             <modules>
                 <module>examples</module>


[2/2] ignite git commit: IGNITE-1653 fixes

Posted by sb...@apache.org.
IGNITE-1653 fixes


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

Branch: refs/heads/master
Commit: 50cf42a3137fe31c00177042eb65001253aad518
Parents: bc6bf5f
Author: Anton Vinogradov <av...@apache.org>
Authored: Mon Oct 19 11:54:49 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Mon Oct 19 11:54:49 2015 +0300

----------------------------------------------------------------------
 examples-lgpl/config/filesystem/README.txt      |   8 -
 examples-lgpl/config/filesystem/core-site.xml   |  42 -----
 .../config/filesystem/example-igfs.xml          | 151 ----------------
 examples-lgpl/config/servlet/README.txt         |   8 -
 examples-lgpl/config/servlet/WEB-INF/web.xml    |  36 ----
 .../java8/cluster/ClusterGroupExample.java      |  86 ----------
 .../examples/java8/cluster/package-info.java    |  22 ---
 .../java8/computegrid/ComputeAsyncExample.java  |  75 --------
 .../computegrid/ComputeBroadcastExample.java    | 102 -----------
 .../computegrid/ComputeCallableExample.java     |  75 --------
 .../computegrid/ComputeClosureExample.java      |  71 --------
 .../computegrid/ComputeRunnableExample.java     |  64 -------
 .../java8/computegrid/package-info.java         |  22 ---
 .../java8/datagrid/CacheAffinityExample.java    | 137 ---------------
 .../java8/datagrid/CacheApiExample.java         | 105 -----------
 .../java8/datagrid/CacheAsyncApiExample.java    |  85 ---------
 .../examples/java8/datagrid/package-info.java   |  22 ---
 .../IgniteExecutorServiceExample.java           |  70 --------
 .../java8/datastructures/package-info.java      |  22 ---
 .../examples/java8/events/EventsExample.java    | 135 ---------------
 .../examples/java8/events/package-info.java     |  22 ---
 .../java8/messaging/MessagingExample.java       | 166 ------------------
 .../messaging/MessagingPingPongExample.java     | 113 ------------
 .../examples/java8/messaging/package-info.java  |  22 ---
 .../misc/schedule/ComputeScheduleExample.java   |  68 --------
 .../java8/misc/schedule/package-info.java       |  22 ---
 .../streaming/StreamTransformerExample.java     | 101 -----------
 .../java8/streaming/StreamVisitorExample.java   | 172 -------------------
 .../examples/java8/streaming/package-info.java  |  22 ---
 examples/config/hibernate/README.txt            |   8 -
 .../hibernate/example-hibernate-L2-cache.xml    |  64 -------
 pom.xml                                         | 132 +++++++-------
 32 files changed, 66 insertions(+), 2184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/config/filesystem/README.txt
----------------------------------------------------------------------
diff --git a/examples-lgpl/config/filesystem/README.txt b/examples-lgpl/config/filesystem/README.txt
deleted file mode 100644
index 4f6ae88..0000000
--- a/examples-lgpl/config/filesystem/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-FileSystem Configuration Example
---------------------------------
-
-This folder contains configuration files for IgniteFs examples located in
-org.apache.ignite.examples.igfs package.
-
-- example-igfs.xml file is used to start Apache Ignite nodes with IgniteFS configured
-- core-site.xml file is used to run Hadoop FS driver over IgniteFs

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/config/filesystem/core-site.xml
----------------------------------------------------------------------
diff --git a/examples-lgpl/config/filesystem/core-site.xml b/examples-lgpl/config/filesystem/core-site.xml
deleted file mode 100644
index a7a027c..0000000
--- a/examples-lgpl/config/filesystem/core-site.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-
-<!--
-  ~  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.
-  -->
-
-<!--
-    Example configuration of the Hadoop FS driver over Ignite FS API.
-    Copy this file into '$HADOOP_HOME/conf/core-site.xml'.
--->
-<configuration>
-    <property>
-        <name>fs.default.name</name>
-        <value>igfs:///</value>
-    </property>
-
-    <property>
-        <!-- FS driver class for the 'igfs://' URIs. -->
-        <name>fs.igfs.impl</name>
-        <value>org.apache.ignite.hadoop.fs.v1.IgniteHadoopFileSystem</value>
-    </property>
-
-    <property>
-        <!-- FS driver class for the 'igfs://' URIs in Hadoop2.x -->
-        <name>fs.AbstractFileSystem.igfs.impl</name>
-        <value>org.apache.ignite.hadoop.fs.v2.IgniteHadoopFileSystem</value>
-    </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/config/filesystem/example-igfs.xml
----------------------------------------------------------------------
diff --git a/examples-lgpl/config/filesystem/example-igfs.xml b/examples-lgpl/config/filesystem/example-igfs.xml
deleted file mode 100644
index d009d46..0000000
--- a/examples-lgpl/config/filesystem/example-igfs.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one or more
-  ~  contributor license agreements.  See the NOTICE file distributed with
-  ~  this work for additional information regarding copyright ownership.
-  ~  The ASF licenses this file to You under the Apache License, Version 2.0
-  ~  (the "License"); you may not use this file except in compliance with
-  ~  the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  -->
-
-<!--
-    Ignite Spring configuration file to startup ignite cache.
-
-    When starting a standalone node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/filesystem/example-igfs.xml
-
-    When starting Ignite from Java IDE, pass path to this file into Ignition:
-    Ignition.start("examples/config/filesystem/example-igfs.xml");
--->
-<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">
-
-    <!--
-        Optional description.
-    -->
-    <description>
-        Spring file for ignite configuration with client available endpoints.
-    </description>
-
-    <!--
-        Initialize property configurer so we can reference environment variables.
-    -->
-    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/>
-        <property name="searchSystemEnvironment" value="true"/>
-    </bean>
-
-    <!--
-        Configuration below demonstrates how to setup a IgniteFs node with file data.
-    -->
-    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <!-- Set to true to enable cluster-aware class loading for examples, default is false. -->
-        <property name="peerClassLoadingEnabled" value="true"/>
-
-        <property name="marshaller">
-            <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
-                <!-- Set to false to allow non-serializable objects in examples, default is true. -->
-                <property name="requireSerializable" value="false"/>
-            </bean>
-        </property>
-
-        <property name="fileSystemConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.FileSystemConfiguration">
-                    <property name="name" value="igfs"/>
-                    <property name="metaCacheName" value="igfs-meta"/>
-                    <property name="dataCacheName" value="igfs-data"/>
-
-                    <!-- Must correlate with cache affinity mapper. -->
-                    <property name="blockSize" value="#{128 * 1024}"/>
-                    <property name="perNodeBatchSize" value="512"/>
-                    <property name="perNodeParallelBatchCount" value="16"/>
-
-                    <!-- Set number of prefetch blocks. -->
-                    <property name="prefetchBlocks" value="32"/>
-
-                    <!--
-                        Example of configured IPC loopback endpoint.
-                    -->
-                    <!--
-                    <property name="ipcEndpointConfiguration">
-                        <bean class="org.apache.ignite.igfs.IgfsIpcEndpointConfiguration">
-                            <property name="type" value="TCP" />
-                        </bean>
-                    </property>
-                    -->
-
-                    <!--
-                        Example of configured shared memory endpoint.
-                    -->
-                    <!--
-                    <property name="ipcEndpointConfiguration">
-                        <bean class="org.apache.ignite.igfs.IgfsIpcEndpointConfiguration">
-                            <property name="type" value="SHMEM" />
-                        </bean>
-                    </property>
-                    -->
-                </bean>
-            </list>
-        </property>
-
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="igfs-data"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-                    <property name="backups" value="0"/>
-                    <property name="affinityMapper">
-                        <bean class="org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper">
-                            <!-- Haw many blocks in row will be stored on the same node. -->
-                            <constructor-arg value="512"/>
-                        </bean>
-                    </property>
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="igfs-meta"/>
-                    <property name="cacheMode" value="REPLICATED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-                </bean>
-            </list>
-        </property>
-
-        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <!--
-                        Ignition provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
-                        to our documentation: http://apacheignite.readme.io/docs/cluster-config
-                    -->
-                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
-                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500..47509</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-            </bean>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/config/servlet/README.txt
----------------------------------------------------------------------
diff --git a/examples-lgpl/config/servlet/README.txt b/examples-lgpl/config/servlet/README.txt
deleted file mode 100644
index 20d4b90..0000000
--- a/examples-lgpl/config/servlet/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Servlet Configuration Example
------------------------------
-
-This folder contains web.xml file that demonstrates how to configure any servlet container
-to start a Apache Ignite node inside a Web application.
-
-For more information on available configuration properties, etc. refer to our documentation:
-http://apacheignite.readme.io/docs/web-session-clustering

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/config/servlet/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/examples-lgpl/config/servlet/WEB-INF/web.xml b/examples-lgpl/config/servlet/WEB-INF/web.xml
deleted file mode 100644
index de4b3a0..0000000
--- a/examples-lgpl/config/servlet/WEB-INF/web.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-  -->
-
-<!--
-    Example web.xml to startup Ignite from Servlet container, like Tomcat.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                             http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
-         version="3.0">
-    <context-param>
-        <param-name>IgniteConfigurationFilePath</param-name>
-        <param-value>config/default-config.xml</param-value>
-    </context-param>
-
-    <listener>
-        <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class>
-    </listener>
-</web-app>

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/ClusterGroupExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/ClusterGroupExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/ClusterGroupExample.java
deleted file mode 100644
index caea8a7..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/ClusterGroupExample.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.examples.java8.cluster;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCluster;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cluster.ClusterGroup;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-
-/**
- * Demonstrates new functional APIs.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ClusterGroupExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
-                return;
-
-            System.out.println();
-            System.out.println("Compute example started.");
-
-            IgniteCluster cluster = ignite.cluster();
-
-            // Say hello to all nodes in the cluster, including local node.
-            sayHello(ignite, cluster);
-
-            // Say hello to all remote nodes.
-            sayHello(ignite, cluster.forRemotes());
-
-            // Pick random node out of remote nodes.
-            ClusterGroup randomNode = cluster.forRemotes().forRandom();
-
-            // Say hello to a random node.
-            sayHello(ignite, randomNode);
-
-            // Say hello to all nodes residing on the same host with random node.
-            sayHello(ignite, cluster.forHost(randomNode.node()));
-
-            // Say hello to all nodes that have current CPU load less than 50%.
-            sayHello(ignite, cluster.forPredicate(n -> n.metrics().getCurrentCpuLoad() < 0.5));
-        }
-    }
-
-    /**
-     * Print 'Hello' message on remote nodes.
-     *
-     * @param ignite Ignite.
-     * @param grp Cluster group.
-     * @throws IgniteException If failed.
-     */
-    private static void sayHello(Ignite ignite, final ClusterGroup grp) throws IgniteException {
-        // Print out hello message on all cluster nodes.
-        ignite.compute(grp).broadcast(
-            () -> System.out.println(">>> Hello Node: " + grp.ignite().cluster().localNode().id()));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/package-info.java
deleted file mode 100644
index b96e98a..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/cluster/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Cluster group example.
- */
-package org.apache.ignite.examples.java8.cluster;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeAsyncExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeAsyncExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeAsyncExample.java
deleted file mode 100644
index 8d9cc64..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeAsyncExample.java
+++ /dev/null
@@ -1,75 +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.examples.java8.computegrid;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCompute;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.lang.IgniteRunnable;
-
-/**
- * Demonstrates a simple use of {@link IgniteRunnable}.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeAsyncExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println("Compute asynchronous example started.");
-
-            // Enable asynchronous mode.
-            IgniteCompute compute = ignite.compute().withAsync();
-
-            Collection<IgniteFuture<?>> futs = new ArrayList<>();
-
-            // Iterate through all words in the sentence and create runnable jobs.
-            for (final String word : "Print words using runnable".split(" ")) {
-                // Execute runnable on some node.
-                compute.run(() -> {
-                    System.out.println();
-                    System.out.println(">>> Printing '" + word + "' on this node from ignite job.");
-                });
-
-                futs.add(compute.future());
-            }
-
-            // Wait for completion of all futures.
-            futs.forEach(IgniteFuture::get);
-
-            System.out.println();
-            System.out.println(">>> Finished printing words using runnable execution.");
-            System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeBroadcastExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeBroadcastExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeBroadcastExample.java
deleted file mode 100644
index 1aed33b..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeBroadcastExample.java
+++ /dev/null
@@ -1,102 +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.examples.java8.computegrid;
-
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-
-/**
- * Demonstrates broadcasting computations within cluster.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeBroadcastExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Compute broadcast example started.");
-
-            // Print hello message on all nodes.
-            hello(ignite);
-
-            // Gather system info from all nodes.
-            gatherSystemInfo(ignite);
-       }
-    }
-
-    /**
-     * Print 'Hello' message on all nodes.
-     *
-     * @param ignite Ignite instance.
-     * @throws IgniteException If failed.
-     */
-    private static void hello(Ignite ignite) throws IgniteException {
-        // Print out hello message on all nodes.
-        ignite.compute().broadcast(() -> {
-            System.out.println();
-            System.out.println(">>> Hello Node! :)");
-        });
-
-        System.out.println();
-        System.out.println(">>> Check all nodes for hello message output.");
-    }
-
-    /**
-     * Gather system info from all nodes and print it out.
-     *
-     * @param ignite Ignite instance.
-     * @throws IgniteException if failed.
-     */
-    private static void gatherSystemInfo(Ignite ignite) throws IgniteException {
-        // Gather system info from all nodes.
-        Collection<String> res = ignite.compute().broadcast(() -> {
-            System.out.println();
-            System.out.println("Executing task on node: " + ignite.cluster().localNode().id());
-
-            return "Node ID: " + ignite.cluster().localNode().id() + "\n" +
-                "OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " +
-                System.getProperty("os.arch") + "\n" +
-                "User: " + System.getProperty("user.name") + "\n" +
-                "JRE: " + System.getProperty("java.runtime.name") + " " +
-                System.getProperty("java.runtime.version");
-        });
-
-        // Print result.
-        System.out.println();
-        System.out.println("Nodes system information:");
-        System.out.println();
-
-        res.forEach(r -> {
-            System.out.println(r);
-            System.out.println();
-        });
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeCallableExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeCallableExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeCallableExample.java
deleted file mode 100644
index cadb447..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeCallableExample.java
+++ /dev/null
@@ -1,75 +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.examples.java8.computegrid;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteCallable;
-
-/**
- * Demonstrates using of {@link IgniteCallable} job execution on the cluster.
- * <p>
- * This example takes a sentence composed of multiple words and counts number of non-space
- * characters in the sentence by having each compute job count characters in each individual
- * word.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeCallableExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Compute callable example started.");
-
-            Collection<IgniteCallable<Integer>> calls = new ArrayList<>();
-
-            // Iterate through all words in the sentence and create callable jobs.
-            for (String word : "Count characters using callable".split(" ")) {
-                calls.add(() -> {
-                    System.out.println();
-                    System.out.println(">>> Printing '" + word + "' on this node from ignite job.");
-
-                    return word.length();
-                });
-            }
-
-            // Execute collection of callables on the ignite.
-            Collection<Integer> res = ignite.compute().call(calls);
-
-            int sum = res.stream().mapToInt(i -> i).sum();
-
-            System.out.println();
-            System.out.println(">>> Total number of characters in the phrase is '" + sum + "'.");
-            System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeClosureExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeClosureExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeClosureExample.java
deleted file mode 100644
index c4d3c94..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeClosureExample.java
+++ /dev/null
@@ -1,71 +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.examples.java8.computegrid;
-
-import java.util.Arrays;
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-
-/**
- * Demonstrates a simple use of Ignite with reduce closure.
- * <p>
- * This example splits a phrase into collection of words, computes their length on different
- * nodes and then computes total amount of non-whitespaces characters in the phrase.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeClosureExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Compute closure example started.");
-
-            // Execute closure on all cluster nodes.
-            Collection<Integer> res = ignite.compute().apply(
-                (String word) -> {
-                    System.out.println();
-                    System.out.println(">>> Printing '" + word + "' on this node from ignite job.");
-
-                    // Return number of letters in the word.
-                    return word.length();
-                },
-                // Job parameters. Ignite will create as many jobs as there are parameters.
-                Arrays.asList("Count characters using closure".split(" "))
-            );
-
-            int sum = res.stream().mapToInt(i -> i).sum();
-
-            System.out.println();
-            System.out.println(">>> Total number of characters in the phrase is '" + sum + "'.");
-            System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeRunnableExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeRunnableExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeRunnableExample.java
deleted file mode 100644
index acb9893..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/ComputeRunnableExample.java
+++ /dev/null
@@ -1,64 +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.examples.java8.computegrid;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCompute;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteRunnable;
-
-/**
- * Demonstrates a simple use of {@link IgniteRunnable}.
- * <p>
- * Remote nodes should always be 0started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class ComputeRunnableExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println("Compute runnable example started.");
-
-            IgniteCompute compute = ignite.compute();
-
-            // Iterate through all words in the sentence and create runnable jobs.
-            for (final String word : "Print words using runnable".split(" ")) {
-                // Execute runnable on some node.
-                compute.run(() -> {
-                    System.out.println();
-                    System.out.println(">>> Printing '" + word + "' on this node from ignite job.");
-                });
-            }
-
-            System.out.println();
-            System.out.println(">>> Finished printing words using runnable execution.");
-            System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/package-info.java
deleted file mode 100644
index cda49ef..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/computegrid/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Basic examples for computational ignite functionality.
- */
-package org.apache.ignite.examples.java8.computegrid;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
deleted file mode 100644
index f4a3b03..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
+++ /dev/null
@@ -1,137 +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.examples.java8.datagrid;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCluster;
-import org.apache.ignite.IgniteCompute;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteRunnable;
-
-/**
- * This example demonstrates the simplest code that populates the distributed cache
- * and co-locates simple closure execution with each key. The goal of this particular
- * example is to provide the simplest code example of this logic.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
- * start node with {@code examples/config/example-ignite.xml} configuration.
- */
-public final class CacheAffinityExample {
-    /** Cache name. */
-    private static final String CACHE_NAME = CacheAffinityExample.class.getSimpleName();
-
-    /** Number of keys. */
-    private static final int KEY_CNT = 20;
-
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Cache affinity example started.");
-
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cfg)) {
-                for (int i = 0; i < KEY_CNT; i++)
-                    cache.put(i, Integer.toString(i));
-
-                // Co-locates jobs with data using IgniteCompute.affinityRun(...) method.
-                visitUsingAffinityRun();
-
-                // Co-locates jobs with data using IgniteCluster.mapKeysToNodes(...) method.
-                visitUsingMapKeysToNodes();
-            }
-        }
-    }
-
-    /**
-     * Collocates jobs with keys they need to work on using
-     * {@link IgniteCompute#affinityRun(String, Object, IgniteRunnable)} method.
-     */
-    private static void visitUsingAffinityRun() {
-        Ignite ignite = Ignition.ignite();
-
-        final IgniteCache<Integer, String> cache = ignite.cache(CACHE_NAME);
-
-        for (int i = 0; i < KEY_CNT; i++) {
-            int key = i;
-
-            // This runnable will execute on the remote node where
-            // data with the given key is located. Since it will be co-located
-            // we can use local 'peek' operation safely.
-            ignite.compute().affinityRun(CACHE_NAME, key,
-                () -> System.out.println("Co-located using affinityRun [key= " + key + ", value=" + cache.localPeek(key) + ']'));
-        }
-    }
-
-    /**
-     * Collocates jobs with keys they need to work on using {@link IgniteCluster#mapKeysToNodes(String, Collection)}
-     * method. The difference from {@code affinityRun(...)} method is that here we process multiple keys
-     * in a single job.
-     */
-    private static void visitUsingMapKeysToNodes() {
-        final Ignite ignite = Ignition.ignite();
-
-        Collection<Integer> keys = new ArrayList<>(KEY_CNT);
-
-        for (int i = 0; i < KEY_CNT; i++)
-            keys.add(i);
-
-        // Map all keys to nodes.
-        Map<ClusterNode, Collection<Integer>> mappings = ignite.cluster().mapKeysToNodes(CACHE_NAME, keys);
-
-        for (Map.Entry<ClusterNode, Collection<Integer>> mapping : mappings.entrySet()) {
-            ClusterNode node = mapping.getKey();
-
-            final Collection<Integer> mappedKeys = mapping.getValue();
-
-            if (node != null) {
-                // Bring computations to the nodes where the data resides (i.e. collocation).
-                ignite.compute(ignite.cluster().forNode(node)).run(() -> {
-                    IgniteCache<Integer, String> cache = ignite.cache(CACHE_NAME);
-
-                    // Peek is a local memory lookup, however, value should never be 'null'
-                    // as we are co-located with node that has a given key.
-                    for (Integer key : mappedKeys)
-                        System.out.println("Co-located using mapKeysToNodes [key= " + key +
-                            ", value=" + cache.localPeek(key) + ']');
-                });
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheApiExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheApiExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheApiExample.java
deleted file mode 100644
index 1891a35..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheApiExample.java
+++ /dev/null
@@ -1,105 +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.examples.java8.datagrid;
-
-import java.util.concurrent.ConcurrentMap;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-
-/**
- * This example demonstrates some of the cache rich API capabilities.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
- * start node with {@code examples/config/example-ignite.xml} configuration.
- */
-public class CacheApiExample {
-    /** Cache name. */
-    private static final String CACHE_NAME = CacheApiExample.class.getSimpleName();
-
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Cache API example started.");
-
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cfg)) {
-                // Demonstrate atomic map operations.
-                atomicMapOperations(cache);
-            }
-        }
-    }
-
-    /**
-     * Demonstrates cache operations similar to {@link ConcurrentMap} API. Note that
-     * cache API is a lot richer than the JDK {@link ConcurrentMap}.
-     *
-     * @throws IgniteException If failed.
-     */
-    private static void atomicMapOperations(final IgniteCache<Integer, String> cache) throws IgniteException {
-        System.out.println();
-        System.out.println(">>> Cache atomic map operation examples.");
-
-        // Put and return previous value.
-        String v = cache.getAndPut(1, "1");
-        assert v == null;
-
-        // Put and do not return previous value (all methods ending with 'x' return boolean).
-        // Performs better when previous value is not needed.
-        cache.put(2, "2");
-
-        // Put-if-absent.
-        boolean b1 = cache.putIfAbsent(4, "4");
-        boolean b2 = cache.putIfAbsent(4, "44");
-        assert b1 && !b2;
-
-        // Invoke - assign new value based on previous value.
-        cache.put(6, "6");
-
-        cache.invoke(6, (entry, args) -> {
-            String val = entry.getValue();
-
-            entry.setValue(val + "6"); // Set new value based on previous value.
-
-            return null;
-        });
-
-        // Replace.
-        cache.put(7, "7");
-        b1 = cache.replace(7, "7", "77");
-        b2 = cache.replace(7, "7", "777");
-        assert b1 & !b2;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAsyncApiExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAsyncApiExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAsyncApiExample.java
deleted file mode 100644
index b457b27..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAsyncApiExample.java
+++ /dev/null
@@ -1,85 +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.examples.java8.datagrid;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteFuture;
-
-/**
- * This example demonstrates some of the cache rich API capabilities.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
- * start node with {@code examples/config/example-ignite.xml} configuration.
- */
-public class CacheAsyncApiExample {
-    /** Cache name. */
-    private static final String CACHE_NAME = CacheAsyncApiExample.class.getSimpleName();
-
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Cache asynchronous API example started.");
-
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cfg)) {
-                // Enable asynchronous mode.
-                IgniteCache<Integer, String> asyncCache = cache.withAsync();
-
-                Collection<IgniteFuture<?>> futs = new ArrayList<>();
-
-                // Execute several puts asynchronously.
-                for (int i = 0; i < 10; i++) {
-                    asyncCache.put(i, String.valueOf(i));
-
-                    futs.add(asyncCache.future());
-                }
-
-                // Wait for completion of all futures.
-                futs.forEach(IgniteFuture::get);
-
-                // Execute get operation asynchronously.
-                asyncCache.get(1);
-
-                // Asynchronously wait for result.
-                asyncCache.<String>future().listen(fut ->
-                    System.out.println("Get operation completed [value=" + fut.get() + ']'));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/package-info.java
deleted file mode 100644
index 0bd86a0..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datagrid/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates data ignite cache usage.
- */
-package org.apache.ignite.examples.java8.datagrid;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/IgniteExecutorServiceExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/IgniteExecutorServiceExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/IgniteExecutorServiceExample.java
deleted file mode 100644
index 0155144..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/IgniteExecutorServiceExample.java
+++ /dev/null
@@ -1,70 +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.examples.java8.datastructures;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.TimeUnit;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteRunnable;
-
-/**
- * Simple example to demonstrate usage of distributed executor service provided by Ignite.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public final class IgniteExecutorServiceExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws Exception If example execution failed.
-     */
-    @SuppressWarnings({"TooBroadScope"})
-    public static void main(String[] args) throws Exception {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Compute executor service example started.");
-
-            // Get ignite-enabled executor service.
-            ExecutorService exec = ignite.executorService();
-
-            // Iterate through all words in the sentence and create callable jobs.
-            for (final String word : "Print words using runnable".split(" ")) {
-                // Execute runnable on some node.
-                exec.submit((IgniteRunnable)() -> {
-                    System.out.println();
-                    System.out.println(">>> Printing '" + word + "' on this node from ignite job.");
-                });
-            }
-
-            exec.shutdown();
-
-            // Wait for all jobs to complete (0 means no limit).
-            exec.awaitTermination(0, TimeUnit.MILLISECONDS);
-
-            System.out.println();
-            System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/package-info.java
deleted file mode 100644
index 86f3423..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/datastructures/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates using of blocking and non-blocking queues and atomic data structures.
- */
-package org.apache.ignite.examples.java8.datastructures;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/EventsExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/EventsExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/EventsExample.java
deleted file mode 100644
index df2d52b..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/EventsExample.java
+++ /dev/null
@@ -1,135 +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.examples.java8.events;
-
-import java.util.UUID;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.compute.ComputeTaskSession;
-import org.apache.ignite.events.TaskEvent;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.lang.IgniteBiPredicate;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.lang.IgniteRunnable;
-import org.apache.ignite.resources.TaskSessionResource;
-
-import static org.apache.ignite.events.EventType.EVTS_TASK_EXECUTION;
-
-/**
- * Demonstrates event consume API that allows to register event listeners on remote nodes.
- * Note that ignite events are disabled by default and must be specifically enabled,
- * just like in {@code examples/config/example-ignite.xml} file.
- * <p>
- * Remote nodes should always be started with configuration: {@code 'ignite.sh examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start
- * node with {@code examples/config/example-ignite.xml} configuration.
- */
-public class EventsExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws Exception If example execution failed.
-     */
-    public static void main(String[] args) throws Exception {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Events API example started.");
-
-            // Listen to events happening on local node.
-            localListen();
-
-            // Listen to events happening on all cluster nodes.
-            remoteListen();
-
-            // Wait for a while while callback is notified about remaining puts.
-            Thread.sleep(1000);
-        }
-    }
-
-    /**
-     * Listen to events that happen only on local node.
-     *
-     * @throws IgniteException If failed.
-     */
-    private static void localListen() throws IgniteException {
-        System.out.println();
-        System.out.println(">>> Local event listener example.");
-
-        Ignite ignite = Ignition.ignite();
-
-        IgnitePredicate<TaskEvent> lsnr = evt -> {
-            System.out.println("Received task event [evt=" + evt.name() + ", taskName=" + evt.taskName() + ']');
-
-            return true; // Return true to continue listening.
-        };
-
-        // Register event listener for all local task execution events.
-        ignite.events().localListen(lsnr, EVTS_TASK_EXECUTION);
-
-        // Generate task events.
-        ignite.compute().withName("example-event-task").run(() -> System.out.println("Executing sample job."));
-
-        // Unsubscribe local task event listener.
-        ignite.events().stopLocalListen(lsnr);
-    }
-
-    /**
-     * Listen to events coming from all cluster nodes.
-     *
-     * @throws IgniteException If failed.
-     */
-    private static void remoteListen() throws IgniteException {
-        System.out.println();
-        System.out.println(">>> Remote event listener example.");
-
-        // This optional local callback is called for each event notification
-        // that passed remote predicate listener.
-        IgniteBiPredicate<UUID, TaskEvent> locLsnr = (nodeId, evt) -> {
-            // Remote filter only accepts tasks whose name being with "good-task" prefix.
-            assert evt.taskName().startsWith("good-task");
-
-            System.out.println("Received task event [evt=" + evt.name() + ", taskName=" + evt.taskName());
-
-            return true; // Return true to continue listening.
-        };
-
-        // Remote filter which only accepts tasks whose name begins with "good-task" prefix.
-        IgnitePredicate<TaskEvent> rmtLsnr = evt -> evt.taskName().startsWith("good-task");
-
-        Ignite ignite = Ignition.ignite();
-
-        // Register event listeners on all nodes to listen for task events.
-        ignite.events().remoteListen(locLsnr, rmtLsnr, EVTS_TASK_EXECUTION);
-
-        // Generate task events.
-        for (int i = 0; i < 10; i++) {
-            ignite.compute().withName(i < 5 ? "good-task-" + i : "bad-task-" + i).run(new IgniteRunnable() {
-                // Auto-inject task session.
-                @TaskSessionResource
-                private ComputeTaskSession ses;
-
-                @Override public void run() {
-                    System.out.println("Executing sample job for task: " + ses.getTaskName());
-                }
-            });
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/package-info.java
deleted file mode 100644
index b402e78..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/events/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates events management API.
- */
-package org.apache.ignite.examples.java8.events;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
deleted file mode 100644
index 8b88708..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
+++ /dev/null
@@ -1,166 +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.examples.java8.messaging;
-
-import java.util.concurrent.CountDownLatch;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteMessaging;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cluster.ClusterGroup;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-
-/**
- * Example that demonstrates how to exchange messages between nodes. Use such
- * functionality for cases when you need to communicate to other nodes outside
- * of ignite task.
- * <p>
- * To run this example you must have at least one remote node started.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public final class MessagingExample {
-    /** Number of messages. */
-    private static final int MESSAGES_NUM = 10;
-
-    /** Message topics. */
-    private enum TOPIC { ORDERED, UNORDERED }
-
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws Exception {
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2)) {
-                System.out.println();
-                System.out.println(">>> Please start at least 2 cluster nodes to run example.");
-                System.out.println();
-
-                return;
-            }
-
-            System.out.println();
-            System.out.println(">>> Messaging example started.");
-
-            // Group for remote nodes.
-            ClusterGroup rmtGrp = ignite.cluster().forRemotes();
-
-            // Listen for messages from remote nodes to make sure that they received all the messages.
-            int msgCnt = rmtGrp.nodes().size() * MESSAGES_NUM;
-
-            CountDownLatch orderedLatch = new CountDownLatch(msgCnt);
-            CountDownLatch unorderedLatch = new CountDownLatch(msgCnt);
-
-            localListen(ignite.message(ignite.cluster().forLocal()), orderedLatch, unorderedLatch);
-
-            // Register listeners on all cluster nodes.
-            startListening(ignite, ignite.message(rmtGrp));
-
-            // Send unordered messages to all remote nodes.
-            for (int i = 0; i < MESSAGES_NUM; i++)
-                ignite.message(rmtGrp).send(TOPIC.UNORDERED, Integer.toString(i));
-
-            System.out.println(">>> Finished sending unordered messages.");
-
-            // Send ordered messages to all remote nodes.
-            for (int i = 0; i < MESSAGES_NUM; i++)
-                ignite.message(rmtGrp).sendOrdered(TOPIC.ORDERED, Integer.toString(i), 0);
-
-            System.out.println(">>> Finished sending ordered messages.");
-            System.out.println(">>> Check output on all nodes for message printouts.");
-            System.out.println(">>> Will wait for messages acknowledgements from all remote nodes.");
-
-            orderedLatch.await();
-            unorderedLatch.await();
-
-            System.out.println(">>> Messaging example finished.");
-        }
-    }
-
-    /**
-     * Start listening to messages on remote cluster nodes.
-     *
-     * @param ignite Ignite.
-     * @param imsg Ignite messaging.
-     * @throws IgniteException If failed.
-     */
-    private static void startListening(final Ignite ignite, IgniteMessaging imsg) throws IgniteException {
-        // Add ordered message listener.
-        imsg.remoteListen(TOPIC.ORDERED, (nodeId, msg) -> {
-            System.out.println("Received ordered message [msg=" + msg + ", fromNodeId=" + nodeId + ']');
-
-            try {
-                ignite.message(ignite.cluster().forNodeId(nodeId)).send(TOPIC.ORDERED, msg);
-            }
-            catch (IgniteException e) {
-                e.printStackTrace();
-            }
-
-            return true; // Return true to continue listening.
-        });
-
-        // Add unordered message listener.
-        imsg.remoteListen(TOPIC.UNORDERED, (nodeId, msg) -> {
-            System.out.println("Received unordered message [msg=" + msg + ", fromNodeId=" + nodeId + ']');
-
-            try {
-                ignite.message(ignite.cluster().forNodeId(nodeId)).send(TOPIC.UNORDERED, msg);
-            }
-            catch (IgniteException e) {
-                e.printStackTrace();
-            }
-
-            return true; // Return true to continue listening.
-        });
-    }
-
-    /**
-     * Listen for messages from remote nodes.
-     *
-     * @param imsg Ignite messaging.
-     * @param orderedLatch Latch for ordered messages acks.
-     * @param unorderedLatch Latch for unordered messages acks.
-     */
-    private static void localListen(
-        IgniteMessaging imsg,
-        final CountDownLatch orderedLatch,
-        final CountDownLatch unorderedLatch
-    ) {
-        imsg.localListen(TOPIC.ORDERED, (nodeId, msg) -> {
-            orderedLatch.countDown();
-
-            // Return true to continue listening, false to stop.
-            return orderedLatch.getCount() > 0;
-        });
-
-        imsg.localListen(TOPIC.UNORDERED, (nodeId, msg) -> {
-            unorderedLatch.countDown();
-
-            // Return true to continue listening, false to stop.
-            return unorderedLatch.getCount() > 0;
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingPingPongExample.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingPingPongExample.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingPingPongExample.java
deleted file mode 100644
index b19b476..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingPingPongExample.java
+++ /dev/null
@@ -1,113 +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.examples.java8.messaging;
-
-import java.util.concurrent.CountDownLatch;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cluster.ClusterGroup;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-
-/**
- * Demonstrates simple message exchange between local and remote nodes.
- * <p>
- * To run this example you must have at least one remote node started.
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will start node
- * with {@code examples/config/example-ignite.xml} configuration.
- */
-public class MessagingPingPongExample {
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws Exception If example execution failed.
-     */
-    public static void main(String[] args) throws Exception {
-        // Game is played over the default ignite.
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
-                return;
-
-            System.out.println();
-            System.out.println(">>> Messaging ping-pong example started.");
-
-            // Pick random remote node as a partner.
-            ClusterGroup nodeB = ignite.cluster().forRemotes().forRandom();
-
-            // Note that both nodeA and nodeB will always point to
-            // same nodes regardless of whether they were implicitly
-            // serialized and deserialized on another node as part of
-            // anonymous closure's state during its remote execution.
-
-            // Set up remote player.
-            ignite.message(nodeB).remoteListen(null, (nodeId, rcvMsg) -> {
-                System.out.println("Received message [msg=" + rcvMsg + ", sender=" + nodeId + ']');
-
-                if ("PING".equals(rcvMsg)) {
-                    ignite.message(ignite.cluster().forNodeId(nodeId)).send(null, "PONG");
-
-                    return true; // Continue listening.
-                }
-
-                return false; // Unsubscribe.
-            });
-
-            int MAX_PLAYS = 10;
-
-            final CountDownLatch cnt = new CountDownLatch(MAX_PLAYS);
-
-            // Set up local player.
-            ignite.message().localListen(null, (nodeId, rcvMsg) -> {
-                System.out.println("Received message [msg=" + rcvMsg + ", sender=" + nodeId + ']');
-
-                if (cnt.getCount() == 1) {
-                    ignite.message(ignite.cluster().forNodeId(nodeId)).send(null, "STOP");
-
-                    cnt.countDown();
-
-                    return false; // Stop listening.
-                }
-                else if ("PONG".equals(rcvMsg))
-                    ignite.message(ignite.cluster().forNodeId(nodeId)).send(null, "PING");
-                else
-                    throw new IgniteException("Received unexpected message: " + rcvMsg);
-
-                cnt.countDown();
-
-                return true; // Continue listening.
-            });
-
-            // Serve!
-            ignite.message(nodeB).send(null, "PING");
-
-            // Wait til the game is over.
-            try {
-                cnt.await();
-            }
-            catch (InterruptedException e) {
-                System.err.println("Hm... let us finish the game!\n" + e);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/50cf42a3/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/package-info.java
----------------------------------------------------------------------
diff --git a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/package-info.java b/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/package-info.java
deleted file mode 100644
index 75180cf..0000000
--- a/examples-lgpl/src/main/java8/org/apache/ignite/examples/java8/messaging/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Demonstrates how to exchange messages between nodes.
- */
-package org.apache.ignite.examples.java8.messaging;
\ No newline at end of file