http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java index cca28af..a503e1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java @@ -136,6 +136,8 @@ public class IgniteCacheTestSuite4 extends TestSuite { suite.addTestSuite(CacheReadOnlyTransactionalClientSelfTest.class); + suite.addTestSuite(IgniteCacheManyClientsTest.class); + return suite; } }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java index 1d3bfcd..ff86bda 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java @@ -38,10 +38,12 @@ public class IgniteSpiCommunicationSelfTestSuite extends TestSuite { suite.addTest(new TestSuite(GridTcpCommunicationSpiTcpSelfTest.class)); suite.addTest(new TestSuite(GridTcpCommunicationSpiTcpNoDelayOffSelfTest.class)); + suite.addTest(new TestSuite(GridTcpCommunicationSpiShmemSelfTest.class)); suite.addTest(new TestSuite(GridTcpCommunicationSpiStartStopSelfTest.class)); suite.addTest(new TestSuite(GridTcpCommunicationSpiMultithreadedSelfTest.class)); + suite.addTest(new TestSuite(GridTcpCommunicationSpiMultithreadedShmemTest.class)); suite.addTest(new TestSuite(GridTcpCommunicationSpiConfigSelfTest.class)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/pom.xml ---------------------------------------------------------------------- diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml index 6910093..ac0f9f0 100644 --- a/modules/hadoop/pom.xml +++ b/modules/hadoop/pom.xml @@ -96,6 +96,7 @@ <dependency> <groupId>org.gridgain</groupId> <artifactId>ignite-shmem</artifactId> + <scope>test</scope> <version>1.0.0</version> </dependency> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java index 91f926d..0394aaa 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java @@ -31,6 +31,8 @@ import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; +import org.apache.ignite.spi.communication.*; +import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; @@ -186,6 +188,7 @@ public abstract class HadoopIgfs20FileSystemAbstractSelfTest extends IgfsCommonA cfg.setFileSystemConfiguration(igfsCfg); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); cfg.setLocalHost(U.getLocalHost().getHostAddress()); + cfg.setCommunicationSpi(communicationSpi()); G.start(cfg); } @@ -211,6 +214,7 @@ public abstract class HadoopIgfs20FileSystemAbstractSelfTest extends IgfsCommonA cfg.setFileSystemConfiguration(igfsConfiguration(gridName)); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); cfg.setLocalHost("127.0.0.1"); + cfg.setCommunicationSpi(communicationSpi()); return cfg; } @@ -270,6 +274,15 @@ public abstract class HadoopIgfs20FileSystemAbstractSelfTest extends IgfsCommonA return cfg; } + /** @return Communication SPI. */ + private CommunicationSpi communicationSpi() { + TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); + + commSpi.setSharedMemoryPort(-1); + + return commSpi; + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { G.stopAll(true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java index b089995..8c33679 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java @@ -31,6 +31,8 @@ import org.apache.ignite.internal.processors.hadoop.igfs.*; import org.apache.ignite.internal.processors.igfs.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.spi.communication.*; +import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; @@ -279,6 +281,8 @@ public class HadoopSecondaryFileSystemConfigurationTest extends IgfsCommonAbstra cfg.setFileSystemConfiguration(igfsCfg); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); + cfg.setCommunicationSpi(communicationSpi()); + G.start(cfg); } @@ -314,6 +318,7 @@ public class HadoopSecondaryFileSystemConfigurationTest extends IgfsCommonAbstra cfg.setCacheConfiguration(cacheConfiguration()); cfg.setFileSystemConfiguration(fsConfiguration(gridName)); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); + cfg.setCommunicationSpi(communicationSpi()); return cfg; } @@ -371,6 +376,15 @@ public class HadoopSecondaryFileSystemConfigurationTest extends IgfsCommonAbstra return cfg; } + /** @return Communication SPI. */ + private CommunicationSpi communicationSpi() { + TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); + + commSpi.setSharedMemoryPort(-1); + + return commSpi; + } + /** * Case #SecondaryFileSystemProvider(null, path) * http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java index 7cea968..a89e586 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java @@ -25,6 +25,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.hadoop.fs.v2.*; import org.apache.ignite.internal.processors.igfs.*; import org.apache.ignite.internal.util.typedef.*; +import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; @@ -197,6 +198,12 @@ public class IgniteHadoopFileSystemHandshakeSelfTest extends IgfsCommonAbstractT cfg.setDiscoverySpi(discoSpi); + TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); + + commSpi.setSharedMemoryPort(-1); + + cfg.setCommunicationSpi(commSpi); + CacheConfiguration metaCacheCfg = defaultCacheConfiguration(); metaCacheCfg.setName("replicated"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java index 2c17ba9..6773366 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java @@ -26,6 +26,7 @@ import org.apache.ignite.internal.processors.igfs.*; import org.apache.ignite.internal.util.ipc.shmem.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; @@ -86,6 +87,12 @@ public class IgniteHadoopFileSystemIpcCacheSelfTest extends IgfsCommonAbstractTe cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); + TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); + + commSpi.setSharedMemoryPort(-1); + + cfg.setCommunicationSpi(commSpi); + cnt++; return cfg; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java index e8a0a6f..a3c9bde 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.igfs.*; import org.apache.ignite.hadoop.fs.v2.IgniteHadoopFileSystem; import org.apache.ignite.internal.processors.hadoop.fs.*; +import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; @@ -104,6 +105,12 @@ public abstract class HadoopAbstractSelfTest extends GridCommonAbstractTest { cfg.setHadoopConfiguration(hadoopConfiguration(gridName)); + TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); + + commSpi.setSharedMemoryPort(-1); + + cfg.setCommunicationSpi(commSpi); + TcpDiscoverySpi discoSpi = (TcpDiscoverySpi)cfg.getDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java index 200da77..5e27c24 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java @@ -592,7 +592,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { * @throws SQLException If failed. */ private static List<GridQueryFieldMetadata> meta(ResultSetMetaData rsMeta) throws SQLException { - ArrayList<GridQueryFieldMetadata> meta = new ArrayList<>(rsMeta.getColumnCount()); + List<GridQueryFieldMetadata> meta = new ArrayList<>(rsMeta.getColumnCount()); for (int i = 1; i <= rsMeta.getColumnCount(); i++) { String schemaName = rsMeta.getSchemaName(i); @@ -771,8 +771,13 @@ public class IgniteH2Indexing implements GridQueryIndexing { } /** {@inheritDoc} */ - @Override public QueryCursor<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery qry) { - return rdcQryExec.query(cctx, qry); + @Override public Iterable<List<?>> queryTwoStep(final GridCacheContext<?,?> cctx, final GridCacheTwoStepQuery qry, + final boolean keepCacheObj) { + return new Iterable<List<?>>() { + @Override public Iterator<List<?>> iterator() { + return rdcQryExec.query(cctx, qry, keepCacheObj); + } + }; } /** {@inheritDoc} */ @@ -802,25 +807,30 @@ public class IgniteH2Indexing implements GridQueryIndexing { final QueryCursor<List<?>> res = queryTwoStep(cctx, fqry); - final Iterator<List<?>> iter0 = res.iterator(); + final Iterable<Cache.Entry<K, V>> converted = new Iterable<Cache.Entry<K, V>>() { + @Override public Iterator<Cache.Entry<K, V>> iterator() { + final Iterator<List<?>> iter0 = res.iterator(); - Iterator<Cache.Entry<K,V>> iter = new Iterator<Cache.Entry<K,V>>() { - @Override public boolean hasNext() { - return iter0.hasNext(); - } + return new Iterator<Cache.Entry<K,V>>() { + @Override public boolean hasNext() { + return iter0.hasNext(); + } - @Override public Cache.Entry<K,V> next() { - List<?> l = iter0.next(); + @Override public Cache.Entry<K,V> next() { + List<?> l = iter0.next(); - return new CacheEntryImpl<>((K)l.get(0),(V)l.get(1)); - } + return new CacheEntryImpl<>((K)l.get(0),(V)l.get(1)); + } - @Override public void remove() { - throw new UnsupportedOperationException(); + @Override public void remove() { + throw new UnsupportedOperationException(); + } + }; } }; - return new QueryCursorImpl<Cache.Entry<K,V>>(iter) { + // No metadata for SQL queries. + return new QueryCursorImpl<Cache.Entry<K,V>>(converted) { @Override public void close() { res.close(); } @@ -844,7 +854,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { } GridCacheTwoStepQuery twoStepQry; - Collection<GridQueryFieldMetadata> meta; + List<GridQueryFieldMetadata> meta; try { twoStepQry = GridSqlQuerySplitter.split((JdbcPreparedStatement)stmt, qry.getArgs(), qry.isCollocated()); @@ -863,7 +873,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { twoStepQry.pageSize(qry.getPageSize()); - QueryCursorImpl<List<?>> cursor = (QueryCursorImpl<List<?>>)queryTwoStep(cctx, twoStepQry); + QueryCursorImpl<List<?>> cursor = new QueryCursorImpl<>(queryTwoStep(cctx, twoStepQry, cctx.keepPortable())); cursor.fieldsMeta(meta); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java index 50c30a5..11054b7 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java @@ -269,7 +269,7 @@ public class GridReduceQueryExecutor { * @param qry Query. * @return Cursor. */ - public QueryCursor<List<?>> query(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery qry) { + public Iterator<List<?>> query(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery qry, boolean keepPortable) { long qryReqId = reqIdGen.incrementAndGet(); QueryRun r = new QueryRun(); @@ -356,7 +356,7 @@ public class GridReduceQueryExecutor { // dropTable(r.conn, tbl.getName()); TODO } - return new QueryCursorImpl<>(new GridQueryCacheObjectsIterator(new Iter(res), cctx, cctx.keepPortable())); + return new GridQueryCacheObjectsIterator(new Iter(res), cctx, keepPortable); } catch (IgniteCheckedException | InterruptedException | RuntimeException e) { U.closeQuiet(r.conn); @@ -381,7 +381,7 @@ public class GridReduceQueryExecutor { * @return Cursor for plans. * @throws IgniteCheckedException if failed. */ - private QueryCursor<List<?>> explainPlan(JdbcConnection c, String space, GridCacheTwoStepQuery qry) + private Iterator<List<?>> explainPlan(JdbcConnection c, String space, GridCacheTwoStepQuery qry) throws IgniteCheckedException { List<List<?>> lists = new ArrayList<>(); @@ -403,7 +403,7 @@ public class GridReduceQueryExecutor { lists.add(F.asList(getPlan(rs))); - return new QueryCursorImpl<>(lists.iterator()); + return lists.iterator(); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java new file mode 100644 index 0000000..b7f5fa8 --- /dev/null +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java @@ -0,0 +1,408 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache; + +import org.apache.ignite.*; +import org.apache.ignite.cache.*; +import org.apache.ignite.cluster.*; +import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.*; +import org.apache.ignite.internal.managers.communication.*; +import org.apache.ignite.internal.processors.affinity.*; +import org.apache.ignite.internal.processors.cache.distributed.dht.*; +import org.apache.ignite.internal.processors.cache.query.*; +import org.apache.ignite.internal.util.typedef.*; +import org.apache.ignite.lang.*; +import org.apache.ignite.plugin.extensions.communication.*; +import org.apache.ignite.spi.*; +import org.apache.ignite.spi.communication.tcp.*; +import org.apache.ignite.spi.discovery.tcp.*; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; +import org.apache.ignite.testframework.junits.common.*; + +import java.util.*; +import java.util.concurrent.*; +import java.util.concurrent.atomic.*; + +/** + * Tests partition scan query fallback. + */ +public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractTest { + /** Grid count. */ + private static final int GRID_CNT = 3; + + /** Keys count. */ + private static final int KEYS_CNT = 5000; + + /** Ip finder. */ + private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); + + /** Backups. */ + private int backups; + + /** Cache mode. */ + private CacheMode cacheMode; + + /** Client mode. */ + private volatile boolean clientMode; + + /** Expected first node ID. */ + private static UUID expNodeId; + + /** Expected fallback node ID. */ + private static UUID expFallbackNodeId; + + /** Communication SPI factory. */ + private CommunicationSpiFactory commSpiFactory; + + /** Latch. */ + private static CountDownLatch latch; + + /** Test entries. */ + private Map<Integer, Map<Integer, Integer>> entries = new HashMap<>(); + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setClientMode(clientMode); + + TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); + discoSpi.setIpFinder(IP_FINDER); + discoSpi.setForceServerMode(true); + cfg.setDiscoverySpi(discoSpi); + + cfg.setCommunicationSpi(commSpiFactory.create()); + + CacheConfiguration ccfg = defaultCacheConfiguration(); + ccfg.setCacheMode(cacheMode); + ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); + ccfg.setBackups(backups); + ccfg.setNearConfiguration(null); + + cfg.setCacheConfiguration(ccfg); + + return cfg; + } + + /** + * Scan should perform on the local node. + * + * @throws Exception If failed. + */ + public void testScanLocal() throws Exception { + cacheMode = CacheMode.PARTITIONED; + backups = 0; + commSpiFactory = new TestLocalCommunicationSpiFactory(); + + try { + Ignite ignite = startGrids(GRID_CNT); + + IgniteCacheProxy<Integer, Integer> cache = fillCache(ignite); + + int part = anyLocalPartition(cache.context()); + + CacheQuery<Map.Entry<Integer, Integer>> qry = cache.context().queries().createScanQuery(null, part, false); + + doTestScanQuery(qry); + } + finally { + stopAllGrids(); + } + } + + /** + * Scan should perform on the remote node. + * + * @throws Exception If failed. + */ + public void testScanRemote() throws Exception { + cacheMode = CacheMode.PARTITIONED; + backups = 0; + commSpiFactory = new TestRemoteCommunicationSpiFactory(); + + try { + Ignite ignite = startGrids(GRID_CNT); + + IgniteCacheProxy<Integer, Integer> cache = fillCache(ignite); + + IgniteBiTuple<Integer, UUID> tup = remotePartition(cache.context()); + + int part = tup.get1(); + + expNodeId = tup.get2(); + + CacheQuery<Map.Entry<Integer, Integer>> qry = cache.context().queries().createScanQuery(null, part, false); + + doTestScanQuery(qry); + } + finally { + stopAllGrids(); + } + } + + /** + * Scan should try first remote node and fallbacks to second remote node. + * + * @throws Exception If failed. + */ + public void testScanFallback() throws Exception { + cacheMode = CacheMode.PARTITIONED; + backups = 1; + commSpiFactory = new TestFallbackCommunicationSpiFactory(); + + final Set<Integer> candidates = new TreeSet<>(); + + final AtomicBoolean test = new AtomicBoolean(false); + + for(int j = 0; j < 2; j++) { + clientMode = true; + + latch = new CountDownLatch(1); + + try { + final Ignite ignite0 = startGrid(0); + + clientMode = false; + + final IgniteEx ignite1 = startGrid(1); + final IgniteEx ignite2 = startGrid(2); + startGrid(3); + + if (test.get()) { + expNodeId = ignite1.localNode().id(); + expFallbackNodeId = ignite2.localNode().id(); + } + + final IgniteCacheProxy<Integer, Integer> cache = fillCache(ignite0); + + if (!test.get()) { + candidates.addAll(localPartitions(ignite1)); + + candidates.retainAll(localPartitions(ignite2)); + } + + Runnable run = new Runnable() { + @Override public void run() { + try { + startGrid(4); + startGrid(5); + + awaitPartitionMapExchange(); + + if (!test.get()) { + candidates.removeAll(localPartitions(ignite1)); + + F.retain(candidates, false, localPartitions(ignite2)); + } + + latch.countDown(); + } + catch (Exception e) { + e.printStackTrace(); + } + + } + }; + + int part; + CacheQuery<Map.Entry<Integer, Integer>> qry = null; + + if (test.get()) { + part = F.first(candidates); + + qry = cache.context().queries().createScanQuery(null, part, false); + } + + new Thread(run).start(); + + if (test.get()) + doTestScanQuery(qry); + else + latch.await(); + } + finally { + test.set(true); + + stopAllGrids(); + } + } + } + + /** + * @param ignite Ignite. + */ + protected IgniteCacheProxy<Integer, Integer> fillCache(Ignite ignite) { + IgniteCacheProxy<Integer, Integer> cache = + (IgniteCacheProxy<Integer, Integer>)ignite.<Integer, Integer>cache(null); + + for (int i = 0; i < KEYS_CNT; i++) { + cache.put(i, i); + + int part = cache.context().affinity().partition(i); + + Map<Integer, Integer> partEntries = entries.get(part); + + if (partEntries == null) + entries.put(part, partEntries = new HashMap<>()); + + partEntries.put(i, i); + } + + return cache; + } + + /** + * @param qry Query. + */ + protected void doTestScanQuery( + CacheQuery<Map.Entry<Integer, Integer>> qry) throws IgniteCheckedException { + CacheQueryFuture<Map.Entry<Integer, Integer>> fut = qry.execute(); + + Collection<Map.Entry<Integer, Integer>> expEntries = fut.get(); + + for (Map.Entry<Integer, Integer> e : expEntries) { + Map<Integer, Integer> map = entries.get(((GridCacheQueryAdapter)qry).partition()); + + if (map == null) + assertTrue(expEntries.isEmpty()); + else + assertEquals(map.get(e.getKey()), e.getValue()); + } + } + + /** + * @param cctx Cctx. + */ + private static int anyLocalPartition(GridCacheContext<?, ?> cctx) { + return F.first(cctx.topology().localPartitions()).id(); + } + + /** + * @param cctx Cctx. + */ + private IgniteBiTuple<Integer, UUID> remotePartition(final GridCacheContext cctx) { + ClusterNode node = F.first(cctx.kernalContext().grid().cluster().forRemotes().nodes()); + + GridCacheAffinityManager affMgr = cctx.affinity(); + + AffinityTopologyVersion topVer = affMgr.affinityTopologyVersion(); + + Set<Integer> parts = affMgr.primaryPartitions(node.id(), topVer); + + return new IgniteBiTuple<>(F.first(parts), node.id()); + } + + /** + * @param ignite Ignite. + */ + private Set<Integer> localPartitions(Ignite ignite) { + GridCacheContext cctx = ((IgniteCacheProxy)ignite.cache(null)).context(); + + Collection<GridDhtLocalPartition> owningParts = F.view(cctx.topology().localPartitions(), + new IgnitePredicate<GridDhtLocalPartition>() { + @Override public boolean apply(GridDhtLocalPartition part) { + return part.state() == GridDhtPartitionState.OWNING; + } + }); + + return new HashSet<>(F.transform(owningParts, new IgniteClosure<GridDhtLocalPartition, Integer>() { + @Override public Integer apply(GridDhtLocalPartition part) { + return part.id(); + } + })); + } + + /** + * Factory for tests specific communication SPI. + */ + private interface CommunicationSpiFactory { + /** + * Creates communication SPI instance. + */ + TcpCommunicationSpi create(); + } + + /** + * + */ + private static class TestLocalCommunicationSpiFactory implements CommunicationSpiFactory { + /** {@inheritDoc} */ + @Override public TcpCommunicationSpi create() { + return new TcpCommunicationSpi() { + @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException { + Object origMsg = ((GridIoMessage)msg).message(); + + if (origMsg instanceof GridCacheQueryRequest) + fail(); //should use local node + + super.sendMessage(node, msg); + } + }; + } + } + + /** + * + */ + private static class TestRemoteCommunicationSpiFactory implements CommunicationSpiFactory { + /** {@inheritDoc} */ + @Override public TcpCommunicationSpi create() { + return new TcpCommunicationSpi() { + @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException { + Object origMsg = ((GridIoMessage)msg).message(); + + if (origMsg instanceof GridCacheQueryRequest) + assertEquals(expNodeId, node.id()); + + super.sendMessage(node, msg); + } + }; + } + } + + /** + * + */ + private static class TestFallbackCommunicationSpiFactory implements CommunicationSpiFactory { + /** {@inheritDoc} */ + @Override public TcpCommunicationSpi create() { + return new TcpCommunicationSpi() { + @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException { + Object origMsg = ((GridIoMessage)msg).message(); + + if (origMsg instanceof GridCacheQueryRequest) { + if (latch.getCount() > 0) + assertEquals(expNodeId, node.id()); + else + assertEquals(expFallbackNodeId, node.id()); + + try { + latch.await(); + } + catch (InterruptedException e) { + throw new IgniteSpiException(e); + } + } + + super.sendMessage(node, msg); + } + }; + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java index bc45d1e..40c40a5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java @@ -129,9 +129,17 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { q.addMapQuery("_cnts_", "select count(*) x from \"partitioned\".FactPurchase where ? = ?", 2, 2); - Object cnt = qryProc.queryTwoStep(cache, q).getAll().iterator().next().get(0); + Iterator<List<?>> it = qryProc.queryTwoStep(cache, q).iterator(); - assertEquals(10L, cnt); + try { + Object cnt = it.next().get(0); + + assertEquals(10L, cnt); + } + finally { + if (it instanceof AutoCloseable) + ((AutoCloseable)it).close(); + } } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java index 6224cb9..0d45711 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java @@ -27,6 +27,7 @@ import org.apache.ignite.events.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.distributed.replicated.*; import org.apache.ignite.internal.processors.cache.query.*; +import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.tostring.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; @@ -61,6 +62,9 @@ import static org.junit.Assert.*; * Various tests for cache queries. */ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstractTest { + /** Key count. */ + private static final int KEY_CNT = 5000; + /** Cache store. */ private static TestStore store = new TestStore(); @@ -639,6 +643,48 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac } /** + * @throws Exception In case of error. + */ + public void testScanPartitionQuery() throws Exception { + IgniteCache<Integer, Integer> cache = ignite.cache(null); + + GridCacheContext cctx = ((IgniteCacheProxy)cache).context(); + + Map<Integer, Map<Integer, Integer>> entries = new HashMap<>(); + + for (int i = 0; i < KEY_CNT; i++) { + cache.put(i, i); + + int part = cctx.affinity().partition(i); + + Map<Integer, Integer> partEntries = entries.get(part); + + if (partEntries == null) + entries.put(part, partEntries = new HashMap<>()); + + partEntries.put(i, i); + } + + for (int i = 0; i < cctx.affinity().partitions(); i++) { + ScanQuery<Integer, Integer> scan = new ScanQuery<>(i); + + Collection<Cache.Entry<Integer, Integer>> actual = cache.query(scan).getAll(); + + Map<Integer, Integer> exp = entries.get(i); + + int size = exp == null ? 0 : exp.size(); + + assertEquals("Failed for partition: " + i, size, actual.size()); + + if (exp == null) + assertTrue(actual.isEmpty()); + else + for (Cache.Entry<Integer, Integer> entry : actual) + assertTrue(entry.getValue().equals(exp.get(entry.getKey()))); + } + } + + /** * JUnit. * * @throws Exception In case of error. @@ -942,6 +988,28 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + public void testFieldsQueryMetadata() throws Exception { + IgniteCache<UUID, Person> cache = ignite.cache(null); + + for (int i = 0; i < 100; i++) + cache.put(UUID.randomUUID(), new Person("name-" + i, (i + 1) * 100)); + + QueryCursor<List<?>> cur = cache.query(new SqlFieldsQuery("select name, salary from Person where name like ?") + .setArgs("name-")); + + assertTrue(cur instanceof QueryCursorEx); + + QueryCursorEx<List<?>> curEx = (QueryCursorEx<List<?>>)cur; + + List<GridQueryFieldMetadata> meta = curEx.fieldsMeta(); + + assertNotNull(meta); + assertEquals(2, meta.size()); + } + + /** + * @throws Exception If failed. + */ private void checkSqlQueryEvents() throws Exception { final CountDownLatch execLatch = new CountDownLatch(cacheMode() == REPLICATED ? 1 : gridCount()); @@ -1044,11 +1112,13 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac for (int i = 0; i < 20; i++) cache.put(i, i); - QueryCursor<Cache.Entry<Integer, Integer>> q = cache.query(new ScanQuery<>(new IgniteBiPredicate<Integer,Integer>() { + IgniteBiPredicate<Integer, Integer> filter = new IgniteBiPredicate<Integer, Integer>() { @Override public boolean apply(Integer k, Integer v) { return k >= 10; } - })); + }; + + QueryCursor<Cache.Entry<Integer, Integer>> q = cache.query(new ScanQuery<>(filter)); q.getAll(); @@ -1183,7 +1253,8 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac * @return {@code true} if index has a table for given class. * @throws IgniteCheckedException If failed. */ - private boolean hasIndexTable(Class<?> cls, GridCacheQueryManager<Object, Object> qryMgr) throws IgniteCheckedException { + private boolean hasIndexTable(Class<?> cls, GridCacheQueryManager<Object, Object> qryMgr) + throws IgniteCheckedException { return qryMgr.size(cls) != -1; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java index cfc8f2c..0815dc6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java @@ -70,6 +70,8 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite { suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class); suite.addTestSuite(GridCacheQuerySerializationSelfTest.class); + // Scan queries. + suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class); // Fields queries. suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/scalar-2.10/README.txt ---------------------------------------------------------------------- diff --git a/modules/scalar-2.10/README.txt b/modules/scalar-2.10/README.txt new file mode 100644 index 0000000..535a193 --- /dev/null +++ b/modules/scalar-2.10/README.txt @@ -0,0 +1,4 @@ +Apache Ignite Scalar Module +--------------------------- + +Apache Ignite Scalar module to be build with Scala 2.10. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/scalar-2.10/licenses/apache-2.0.txt ---------------------------------------------------------------------- diff --git a/modules/scalar-2.10/licenses/apache-2.0.txt b/modules/scalar-2.10/licenses/apache-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/modules/scalar-2.10/licenses/apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/scalar-2.10/licenses/scala-bsd-license.txt ---------------------------------------------------------------------- diff --git a/modules/scalar-2.10/licenses/scala-bsd-license.txt b/modules/scalar-2.10/licenses/scala-bsd-license.txt new file mode 100644 index 0000000..b2be111 --- /dev/null +++ b/modules/scalar-2.10/licenses/scala-bsd-license.txt @@ -0,0 +1,18 @@ +Copyright (c) 2002-2014 EPFL +Copyright (c) 2011-2014 Typesafe, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS âAS ISâ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/scalar-2.10/pom.xml ---------------------------------------------------------------------- diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml new file mode 100644 index 0000000..e3d6125 --- /dev/null +++ b/modules/scalar-2.10/pom.xml @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- + POM file. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-parent</artifactId> + <version>1</version> + <relativePath>../../parent</relativePath> + </parent> + + <artifactId>ignite-scalar_2.10</artifactId> + <version>1.1.1-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>2.10.4</version> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-spring</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-indexing</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.scalatest</groupId> + <artifactId>scalatest_2.10</artifactId> + <version>2.2.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + + <build> + <sourceDirectory>../scalar/src/main/scala</sourceDirectory> + + <resources> + <resource> + <directory>../scalar/src/main/scala</directory> + <excludes> + <exclude>**/*.scala</exclude> + </excludes> + </resource> + </resources> + + <testResources> + <testResource> + <directory>../scalar/src/test/scala</directory> + <excludes> + <exclude>**/*.scala</exclude> + </excludes> + </testResource> + </testResources> + + <plugins> + <plugin> + <groupId>net.alchim31.maven</groupId> + <artifactId>scala-maven-plugin</artifactId> + </plugin> + </plugins> + + <!-- TODO IGNITE-956 FIX scaladocs plugins--> + <!--<plugin>--> + <!--<groupId>org.apache.maven.plugins</groupId>--> + <!--<artifactId>maven-antrun-plugin</artifactId>--> + <!--<version>1.7</version>--> + <!--<dependencies>--> + <!--<dependency>--> + <!--<groupId>org.apache.ignite</groupId>--> + <!--<artifactId>ignite-tools</artifactId>--> + <!--<version>${project.version}</version>--> + <!--</dependency>--> + <!--</dependencies>--> + <!--<executions>--> + <!--<execution>--> + <!--<id>scaladoc-postprocessing</id>--> + <!--<goals>--> + <!--<goal>run</goal>--> + <!--</goals>--> + <!--<phase>prepare-package</phase>--> + <!--<configuration>--> + <!--<target>--> + <!--<copy todir="target/site/scaladocs">--> + <!--<fileset dir="../../assembly/docfiles">--> + <!--<include name="img/**" />--> + <!--<include name="*.js" />--> + <!--</fileset>--> + <!--</copy>--> + + <!--<taskdef name="doctask" classname="org.apache.ignite.tools.ant.beautifier.GridJavadocAntTask" />--> + + <!--<doctask css="dotted" dir="target/site/scaladocs" verify="false">--> + <!--<include name="**/*.html" />--> + <!--</doctask>--> + + <!--<property name="footer">--> + <!--<![CDATA[--> + <!--<table style="padding: 0px 10px 10px 10px; width: 100%" border="0">--> + <!--<tr>--> + <!--<td>--> + <!--<nobr>Ignite™ - Scalar DSL, ver. <strong>${project.version}</strong></nobr>--> + <!--<br>--> + <!--<a target=_blank href="https://incubator.apache.org/projects/ignite.html"><nobr>2015 Copyright © Apache Software Foundation</nobr></a>--> + <!--</td>--> + <!--</tr>--> + <!--</table>--> + <!--]]>--> + <!--</property>--> + + <!--<replace dir="target/site/scaladocs" token="<!--FOOTER-->" value="${footer}">--> + <!--<include name="**/*.html" />--> + <!--</replace>--> + + <!--<replace dir="target/site/scaladocs">--> + <!--<replacetoken>src="package.html"</replacetoken>--> + <!--<replacevalue>src=org/apache/ignite/scalar/scalar$.html</replacevalue>--> + <!--<include name="**/index.html" />--> + <!--</replace>--> + + <!--<replace dir="target/site/scaladocs">--> + <!--<replacetoken>location.replace("package.html")</replacetoken>--> + <!--<replacevalue>location.replace("org/apache/ignite/scalar/scalar$.html")</replacevalue>--> + <!--<include name="**/index.js" />--> + <!--</replace>--> + + <!--<replace dir="target/site/scaladocs">--> + <!--<replacetoken>docs.scala-lang.org/overviews/scaladoc/usage.html#members</replacetoken>--> + <!--<replacevalue>docs.scala-lang.org/overviews/scaladoc/interface.html</replacevalue>--> + <!--<fileset dir="target/site/scaladocs" />--> + <!--</replace>--> + + <!--<replaceregexp byline="true" flags="im" encoding="UTF-8">--> + <!--<regexp pattern="(<dt>Attributes</dt><dd>protected\[)<a.+>(.+)</a>(\]\s+</dd>)" />--> + <!--<substitution expression="\1\2\3" />--> + <!--<fileset dir="target/site/scaladocs" />--> + <!--</replaceregexp>--> + + <!--<zip destfile="target/ignite-scalar-${project.version}-javadoc.jar" basedir="target/site/scaladocs" encoding="UTF-8" />--> + <!--</target>--> + <!--</configuration>--> + <!--</execution>--> + <!--</executions>--> + <!--</plugin>--> + <!--</plugins>--> + </build> +</project> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/spark-2.10/README.txt ---------------------------------------------------------------------- diff --git a/modules/spark-2.10/README.txt b/modules/spark-2.10/README.txt new file mode 100644 index 0000000..29d3930 --- /dev/null +++ b/modules/spark-2.10/README.txt @@ -0,0 +1,4 @@ +Apache Ignite Spark Module +--------------------------- + +Apache Ignite Spark module to be build with Scala 2.10. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/spark-2.10/licenses/apache-2.0.txt ---------------------------------------------------------------------- diff --git a/modules/spark-2.10/licenses/apache-2.0.txt b/modules/spark-2.10/licenses/apache-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/modules/spark-2.10/licenses/apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/spark-2.10/licenses/scala-bsd-license.txt ---------------------------------------------------------------------- diff --git a/modules/spark-2.10/licenses/scala-bsd-license.txt b/modules/spark-2.10/licenses/scala-bsd-license.txt new file mode 100644 index 0000000..b2be111 --- /dev/null +++ b/modules/spark-2.10/licenses/scala-bsd-license.txt @@ -0,0 +1,18 @@ +Copyright (c) 2002-2014 EPFL +Copyright (c) 2011-2014 Typesafe, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. Neither the name of the EPFL nor the names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS âAS ISâ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/spark-2.10/pom.xml ---------------------------------------------------------------------- diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml new file mode 100644 index 0000000..2547f7c --- /dev/null +++ b/modules/spark-2.10/pom.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- + POM file. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-parent</artifactId> + <version>1</version> + <relativePath>../../parent</relativePath> + </parent> + + <artifactId>ignite-spark_2.10</artifactId> + <version>1.1.1-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>2.10.4</version> + </dependency> + + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-core_2.10</artifactId> + <version>1.3.1</version> + </dependency> + + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-sql_2.10</artifactId> + <version>1.3.1</version> + </dependency> + + <!-- Test dependencies --> + + <dependency> + <groupId>org.scalatest</groupId> + <artifactId>scalatest_2.10</artifactId> + <version>2.2.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-indexing</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <sourceDirectory>../spark/src/main/scala</sourceDirectory> + + <resources> + <resource> + <directory>../spark/src/main/scala</directory> + <excludes> + <exclude>**/*.scala</exclude> + </excludes> + </resource> + </resources> + + <testResources> + <testResource> + <directory>../spark/src/test/scala</directory> + <excludes> + <exclude>**/*.scala</exclude> + </excludes> + </testResource> + </testResources> + + <plugins> + <plugin> + <groupId>net.alchim31.maven</groupId> + <artifactId>scala-maven-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5d007e3/modules/spark/README.txt ---------------------------------------------------------------------- diff --git a/modules/spark/README.txt b/modules/spark/README.txt new file mode 100644 index 0000000..589a050 --- /dev/null +++ b/modules/spark/README.txt @@ -0,0 +1,8 @@ +Apache Ignite Spark Module +--------------------------- + +Apache Ignite provides an implementation of Spark RDD abstraction which enables easy access to Ignite caches. +Ignite RDD does not keep it's state in the memory of the Spark application and provides a view of the corresponding +Ignite cache. Depending on the chosen deployment mode this state may exist only during the lifespan of the Spark +application (embedded mode) or may exist outside of the Spark application (standalone mode), allowing seamless +sharing of the state between multiple Spark jobs. \ No newline at end of file