Repository: incubator-ignite Updated Branches: refs/heads/ignite-45 7deb14632 -> 41d6c97df
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java deleted file mode 100644 index 5336620..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java +++ /dev/null @@ -1,129 +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.misc.deployment; - -import org.apache.ignite.*; -import org.apache.ignite.compute.*; -import org.apache.ignite.examples.*; -import org.jetbrains.annotations.*; - -import java.io.*; -import java.util.*; - -/** - * Demonstrates how to explicitly deploy a task. Note that - * it is very rare when you would need such functionality as tasks are - * auto-deployed on demand first time you execute them. So in most cases - * you would just apply any of the {@code Ignite.execute(...)} methods directly. - * However, sometimes a task is not in local class path, so you may not even - * know the code it will execute, but you still need to execute it. For example, - * you have two independent components in the system, and one loads the task - * classes from some external source and deploys it; then another component - * can execute it just knowing the name of the task. - * <p> - * Also note that for simplicity of the example, the task we execute is - * in system classpath, so even in this case the deployment step is unnecessary. - * <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 DeploymentExample { - /** Name of the deployed task. */ - static final String TASK_NAME = "ExampleTask"; - - /** - * 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(">>> Deployment example started."); - - // This task will be deployed on local node and then peer-loaded - // onto remote nodes on demand. For this example this task is - // available on the classpath, however in real life that may not - // always be the case. In those cases you should use explicit - // 'IgniteCompute.localDeployTask(Class, ClassLoader) apply and - // then use 'IgniteCompute.execute(String, Object)' method - // passing your task name as first parameter. - ignite.compute().localDeployTask(ExampleTask.class, ExampleTask.class.getClassLoader()); - - for (Map.Entry<String, Class<? extends ComputeTask<?, ?>>> e : ignite.compute().localTasks().entrySet()) - System.out.println(">>> Found locally deployed task [alias=" + e.getKey() + ", taskCls=" + e.getValue()); - - // Execute the task passing its name as a parameter. The system will find - // the deployed task by its name and execute it. - ignite.compute().execute(TASK_NAME, null); - - // Execute the task passing class name as a parameter. The system will find - // the deployed task by its class name and execute it. - // g.compute().execute(ExampleTask.class.getName(), null).get(); - - // Undeploy task - ignite.compute().undeployTask(TASK_NAME); - - System.out.println(); - System.out.println(">>> Finished executing Ignite Direct Deployment Example."); - System.out.println(">>> Check participating nodes output."); - } - } - - /** - * Example task used to demonstrate direct task deployment through API. - * For this example this task as available on the classpath, however - * in real life that may not always be the case. In those cases - * you should use explicit {@link IgniteCompute#localDeployTask(Class, ClassLoader)} apply and - * then use {@link IgniteCompute#execute(String, Object)} - * method passing your task name as first parameter. - * <p> - * Note that this task specifies explicit task name. Task name is optional - * and is added here for demonstration purpose. If not provided, it will - * default to the task class name. - */ - @ComputeTaskName(TASK_NAME) - public static class ExampleTask extends ComputeTaskSplitAdapter<String, Object> { - /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int clusterSize, String arg) { - Collection<ComputeJob> jobs = new ArrayList<>(clusterSize); - - for (int i = 0; i < clusterSize; i++) { - jobs.add(new ComputeJobAdapter() { - @Nullable @Override public Serializable execute() { - System.out.println(">>> Executing deployment example job on this node."); - - // This job does not return any result. - return null; - } - }); - } - - return jobs; - } - - /** {@inheritDoc} */ - @Override public Object reduce(List<ComputeJobResult> results) { - return null; - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/package-info.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/package-info.java b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/package-info.java deleted file mode 100644 index 44b0f79..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/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. --> - * Deployment examples for direct deployments. - */ -package org.apache.ignite.examples.misc.deployment; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java deleted file mode 100644 index 497872a..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java +++ /dev/null @@ -1,92 +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.misc.lifecycle; - -import org.apache.ignite.*; -import org.apache.ignite.configuration.*; -import org.apache.ignite.lifecycle.*; -import org.apache.ignite.resources.*; - -import static org.apache.ignite.lifecycle.LifecycleEventType.*; - -/** - * This example shows how to provide your own {@link LifecycleBean} implementation - * to be able to hook into Ignite lifecycle. The {@link LifecycleExampleBean} bean - * will output occurred lifecycle events to the console. - * <p> - * This example does not require remote nodes to be started. - */ -public final class LifecycleExample { - /** - * Executes example. - * - * @param args Command line arguments, none required. - * @throws IgniteException If example execution failed. - */ - public static void main(String[] args) throws IgniteException { - System.out.println(); - System.out.println(">>> Lifecycle example started."); - - // Create new configuration. - IgniteConfiguration cfg = new IgniteConfiguration(); - - LifecycleExampleBean bean = new LifecycleExampleBean(); - - // Provide lifecycle bean to configuration. - cfg.setLifecycleBeans(bean); - - try (Ignite ignite = Ignition.start(cfg)) { - // Make sure that lifecycle bean was notified about ignite startup. - assert bean.isStarted(); - } - - // Make sure that lifecycle bean was notified about ignite stop. - assert !bean.isStarted(); - } - - /** - * Simple {@link LifecycleBean} implementation that outputs event type when it is occurred. - */ - public static class LifecycleExampleBean implements LifecycleBean { - /** Auto-inject ignite instance. */ - @IgniteInstanceResource - private Ignite ignite; - - /** Started flag. */ - private boolean isStarted; - - /** {@inheritDoc} */ - @Override public void onLifecycleEvent(LifecycleEventType evt) { - System.out.println(); - System.out.println(">>> Lifecycle event occurred: " + evt); - System.out.println(">>> Ignite name: " + ignite.name()); - - if (evt == AFTER_NODE_START) - isStarted = true; - else if (evt == AFTER_NODE_STOP) - isStarted = false; - } - - /** - * @return {@code True} if ignite has been started. - */ - public boolean isStarted() { - return isStarted; - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/package-info.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/package-info.java b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/package-info.java deleted file mode 100644 index f830165..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/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 write and use lifecycle beans. - */ -package org.apache.ignite.examples.misc.lifecycle; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/package-info.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/package-info.java b/examples/src/main/java/org/apache/ignite/examples/misc/package-info.java deleted file mode 100644 index 616f24f..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/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. --> - * Contains examples taht are common across all editions. - */ -package org.apache.ignite.examples.misc; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java deleted file mode 100644 index 69c84f4..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java +++ /dev/null @@ -1,88 +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.misc.springbean; - -import org.apache.ignite.*; -import org.apache.ignite.examples.*; -import org.springframework.context.support.*; - -import java.util.concurrent.*; - -/** - * Demonstrates a simple use of Ignite configured with Spring. - * <p> - * String "Hello World." is printed out by Callable passed into - * the executor service provided by Ignite. This statement could be printed - * out on any node in the cluster. - * <p> - * The major point of this example is to show ignite injection by Spring - * framework. Ignite bean is described in {@code spring-bean.xml} file and instantiated - * by Spring context. Once application completed its execution Spring will - * apply ignite bean destructor and stop the 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 SpringBeanExample { - /** - * Executes example. - * - * @param args Command line arguments, none required. - * @throws Exception If example execution failed. - */ - public static void main(String[] args) throws Exception { - System.out.println(); - System.out.println(">>> Spring bean example started."); - - // Initialize Spring factory. - ClassPathXmlApplicationContext ctx = - new ClassPathXmlApplicationContext("org/apache/ignite/examples/misc/springbean/spring-bean.xml"); - - try { - // Get ignite from Spring (note that local cluster node is already started). - Ignite ignite = (Ignite)ctx.getBean("mySpringBean"); - - // Execute any method on the retrieved ignite instance. - ExecutorService exec = ignite.executorService(); - - Future<String> res = exec.submit(new Callable<String>() { - @Override public String call() throws Exception { - System.out.println("Hello world!"); - - return null; - } - }); - - // Wait for callable completion. - res.get(); - - System.out.println(">>>"); - System.out.println(">>> Finished executing Ignite \"Spring bean\" example."); - System.out.println(">>> You should see printed out of 'Hello world' on one of the nodes."); - System.out.println(">>> Check all nodes for output (this node is also part of the cluster)."); - System.out.println(">>>"); - } - finally { - // Stop local cluster node. - ctx.destroy(); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/package-info.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/package-info.java b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/package-info.java deleted file mode 100644 index 42e83bb..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/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. --> - * HelloWorld example that accesses ignite started directly from Spring bean. - */ -package org.apache.ignite.examples.misc.springbean; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/spring-bean.xml ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/spring-bean.xml b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/spring-bean.xml deleted file mode 100644 index 393b9cf..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/spring-bean.xml +++ /dev/null @@ -1,70 +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. ---> - -<!-- - Command line (default) ignite configuration. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> - <description>Main Spring file for ignite configuration.</description> - - <!-- Example of bean definition with given configuration. --> - <bean id="mySpringBean" class="org.apache.ignite.IgniteSpringBean"> - <property name="configuration"> - <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> - <!-- Set to true to enable ignite-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> - - <!-- Enable task execution events for examples. --> - <property name="includeEventTypes"> - <util:constant static-field="org.apache.ignite.events.EventType.EVTS_TASK_EXECUTION"/> - </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"> - <!-- 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> - </property> - </bean> -</beans> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/package-info.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/package-info.java b/examples/src/main/java/org/apache/ignite/examples/package-info.java deleted file mode 100644 index 5825225..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/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 ignite functionality. - */ -package org.apache.ignite.examples; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java b/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java deleted file mode 100644 index c8786cf..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java +++ /dev/null @@ -1,167 +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.servicegrid; - -import org.apache.ignite.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.examples.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.resources.*; - -import java.util.*; - -/** - * Example that demonstrates how to deploy distributed services in Ignite. - * Distributed services are especially useful when deploying singletons on the ignite, - * be that cluster-singleton, or per-node-singleton, etc... - * <p> - * To start remote nodes, you must run {@link ExampleNodeStartup} in another JVM - * which will start node with {@code examples/config/example-ignite.xml} configuration. - * <p> - * NOTE:<br/> - * Starting {@code ignite.sh} directly will not work, as distributed services - * cannot be peer-deployed and classes must be on the classpath for every node. - */ -public class ServicesExample { - /** - * 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")) { - ClusterGroup rmts = ignite.cluster().forRemotes(); - - if (rmts.nodes().isEmpty()) { - System.err.println(">>>"); - System.err.println(">>> Must start at least one remote node using " + - ExampleNodeStartup.class.getSimpleName() + '.'); - System.err.println(">>>"); - - return; - } - - IgniteServices svcs = ignite.services(rmts); - - try { - // Deploy cluster singleton. - svcs.deployClusterSingleton("myClusterSingletonService", new SimpleMapServiceImpl()); - - // Deploy node singleton. - svcs.deployNodeSingleton("myNodeSingletonService", new SimpleMapServiceImpl()); - - // Deploy 2 instances, regardless of number nodes. - svcs.deployMultiple("myMultiService", new SimpleMapServiceImpl(), 2 /*total number*/, 0 /*0 for unlimited*/); - - // Example for using a service proxy - // to access a remotely deployed service. - serviceProxyExample(ignite); - - // Example for auto-injecting service proxy - // into remote closure execution. - serviceInjectionExample(ignite); - } - finally { - // Undeploy all services. - ignite.services().cancelAll(); - } - } - } - - /** - * Simple example to demonstrate service proxy invocation of a remotely deployed service. - * - * @param ignite Ignite instance. - * @throws Exception If failed. - */ - private static void serviceProxyExample(Ignite ignite) throws Exception { - System.out.println(">>>"); - System.out.println(">>> Starting service proxy example."); - System.out.println(">>>"); - - // Get a sticky proxy for node-singleton map service. - SimpleMapService<Integer, String> mapSvc = ignite.services().serviceProxy("myNodeSingletonService", SimpleMapService.class, true); - - int cnt = 10; - - // Each service invocation will go over a proxy to some remote node. - // Since service proxy is sticky, we will always be contacting the same remote node. - for (int i = 0; i < cnt; i++) - mapSvc.put(i, Integer.toString(i)); - - // Get size from remotely deployed service instance. - int mapSize = mapSvc.size(); - - System.out.println("Map service size: " + mapSize); - - if (mapSize != cnt) - throw new Exception("Invalid map size [expected=" + cnt + ", actual=" + mapSize + ']'); - } - - /** - * Simple example to demonstrate how to inject service proxy into distributed closures. - * - * @param ignite Ignite instance. - * @throws Exception If failed. - */ - private static void serviceInjectionExample(Ignite ignite) throws Exception { - System.out.println(">>>"); - System.out.println(">>> Starting service injection example."); - System.out.println(">>>"); - - // Get a sticky proxy for cluster-singleton map service. - SimpleMapService<Integer, String> mapSvc = ignite.services().serviceProxy("myClusterSingletonService", SimpleMapService.class, true); - - int cnt = 10; - - // Each service invocation will go over a proxy to the remote cluster-singleton instance. - for (int i = 0; i < cnt; i++) - mapSvc.put(i, Integer.toString(i)); - - // Broadcast closure to every node. - final Collection<Integer> mapSizes = ignite.compute().broadcast(new SimpleClosure()); - - System.out.println("Closure execution result: " + mapSizes); - - // Since we invoked the same cluster-singleton service instance - // from all the remote closure executions, they should all return - // the same size equal to 'cnt' value. - for (int mapSize : mapSizes) - if (mapSize != cnt) - throw new Exception("Invalid map size [expected=" + cnt + ", actual=" + mapSize + ']'); - } - - /** - * Simple closure to demonstrate auto-injection of the service proxy. - */ - private static class SimpleClosure implements IgniteCallable<Integer> { - // Auto-inject service proxy. - @ServiceResource(serviceName = "myClusterSingletonService", proxyInterface = SimpleMapService.class) - private transient SimpleMapService mapSvc; - - /** {@inheritDoc} */ - @Override public Integer call() throws Exception { - int mapSize = mapSvc.size(); - - System.out.println("Executing closure [mapSize=" + mapSize + ']'); - - return mapSize; - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapService.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapService.java b/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapService.java deleted file mode 100644 index 5e32bd2..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapService.java +++ /dev/null @@ -1,49 +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.servicegrid; - -/** - * Simple map service. - */ -public interface SimpleMapService<K, V> { - /** - * Puts key-value pair into map. - * - * @param key Key. - * @param val Value. - */ - void put(K key, V val); - - /** - * Gets value based on key. - * - * @param key Key. - * @return Value. - */ - V get(K key); - - /** - * Clears map. - */ - void clear(); - - /** - * @return Map size. - */ - int size(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapServiceImpl.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapServiceImpl.java b/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapServiceImpl.java deleted file mode 100644 index 5e6a9e7..0000000 --- a/examples/src/main/java/org/apache/ignite/examples/servicegrid/SimpleMapServiceImpl.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.servicegrid; - -import org.apache.ignite.services.*; - -import java.util.*; -import java.util.concurrent.*; - -/** - * Simple service which loops infinitely and prints out a counter. - */ -public class SimpleMapServiceImpl<K, V> implements Service, SimpleMapService<K, V> { - /** Serial version UID. */ - private static final long serialVersionUID = 0L; - - /** Underlying cache map. */ - private Map<K, V> map; - - /** {@inheritDoc} */ - @Override public void put(K key, V val) { - map.put(key, val); - } - - /** {@inheritDoc} */ - @Override public V get(K key) { - return map.get(key); - } - - /** {@inheritDoc} */ - @Override public void clear() { - map.clear(); - } - - /** {@inheritDoc} */ - @Override public int size() { - return map.size(); - } - - /** {@inheritDoc} */ - @Override public void cancel(ServiceContext ctx) { - System.out.println("Service was cancelled: " + ctx.name()); - } - - /** {@inheritDoc} */ - @Override public void init(ServiceContext ctx) throws Exception { - System.out.println("Service was initialized: " + ctx.name()); - - map = new ConcurrentHashMap<>(); - } - - /** {@inheritDoc} */ - @Override public void execute(ServiceContext ctx) throws Exception { - System.out.println("Executing distributed service: " + ctx.name()); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java index 11f8bc7..9a48966 100644 --- a/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.*; +import org.apache.ignite.examples.java7.computegrid.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java index 14af44f..38c2cf6 100644 --- a/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java @@ -21,6 +21,10 @@ import org.apache.ignite.examples.datagrid.*; import org.apache.ignite.examples.datagrid.starschema.*; import org.apache.ignite.examples.datagrid.store.*; import org.apache.ignite.examples.datastructures.*; +import org.apache.ignite.examples.java7.datagrid.*; +import org.apache.ignite.examples.java7.datagrid.starschema.*; +import org.apache.ignite.examples.java7.datagrid.store.*; +import org.apache.ignite.examples.java7.datastructures.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java index 5b46e98..d145fe0 100644 --- a/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.datagrid.store.*; +import org.apache.ignite.examples.java7.datagrid.store.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java index e348124..dd79cb8 100644 --- a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.failover.*; +import org.apache.ignite.examples.java7.computegrid.failover.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/ComputeClusterGroupsExampleSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/ComputeClusterGroupsExampleSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ComputeClusterGroupsExampleSelfTest.java index 6bde3f5..2bbf243 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ComputeClusterGroupsExampleSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ComputeClusterGroupsExampleSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.*; +import org.apache.ignite.examples.java7.computegrid.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java index 2556224..6876415 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.*; +import org.apache.ignite.examples.java7.computegrid.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java index 0597c4f..18500ab 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.*; +import org.apache.ignite.examples.java7.computegrid.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java index 6ef54c9..a6f69af 100644 --- a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.misc.deployment.*; import org.apache.ignite.examples.misc.deployment.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java index 496b556..a365350 100644 --- a/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.events.*; +import org.apache.ignite.examples.java7.events.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleMultiNodeSelfTest.java index 29a85b8..b12d07e 100644 --- a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleMultiNodeSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.datagrid.hibernate.*; +import org.apache.ignite.examples.java7.datagrid.hibernate.*; /** * Multi-node test for {@link HibernateL2CacheExample}. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java index 6fa1b13..3dcdb65 100644 --- a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.datagrid.hibernate.*; +import org.apache.ignite.examples.java7.datagrid.hibernate.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java index 8365b00..81b1104 100644 --- a/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.igfs.*; +import org.apache.ignite.examples.java7.igfs.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java index eb66ac3..98b4ea4 100644 --- a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.misc.lifecycle.*; import org.apache.ignite.examples.misc.lifecycle.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java index 573999e..9ef0b45 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.misc.client.memcache.*; import org.apache.ignite.examples.misc.client.memcache.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java index 79a8da5..4bb031a 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.misc.client.memcache.*; import org.apache.ignite.examples.misc.client.memcache.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java index 0932b47..b42ae84 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.messaging.*; import org.apache.ignite.examples.messaging.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java index f42151f..8a3da4c 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.montecarlo.*; +import org.apache.ignite.examples.java7.computegrid.montecarlo.*; import org.apache.ignite.testframework.junits.common.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java index 6465d40..6b26866 100644 --- a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.examples; +import org.apache.ignite.examples.java7.misc.springbean.*; import org.apache.ignite.examples.misc.springbean.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be0e755b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java ---------------------------------------------------------------------- diff --git a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java index 01bb254..b4be694 100644 --- a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.examples; import org.apache.ignite.examples.computegrid.*; +import org.apache.ignite.examples.java7.computegrid.*; import org.apache.ignite.testframework.junits.common.*; /**