Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BCE9A200C50 for ; Fri, 24 Mar 2017 15:11:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BB5E7160B96; Fri, 24 Mar 2017 14:11:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B28AA160BB8 for ; Fri, 24 Mar 2017 15:11:53 +0100 (CET) Received: (qmail 26692 invoked by uid 500); 24 Mar 2017 14:11:52 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 25481 invoked by uid 99); 24 Mar 2017 14:11:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2017 14:11:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3EC78E00EE; Fri, 24 Mar 2017 14:11:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Fri, 24 Mar 2017 14:12:29 -0000 Message-Id: <0992ff7758664528a2f768e4ac3b377a@git.apache.org> In-Reply-To: <3bd7e77b3a664d7c897675fd6f10c021@git.apache.org> References: <3bd7e77b3a664d7c897675fd6f10c021@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [39/50] [abbrv] ignite git commit: Merge branch master ignite-2.0 to ignite-3477 archived-at: Fri, 24 Mar 2017 14:11:56 -0000 http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java index 59f5c21,b0d3850..e663768 --- 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 @@@ -59,6 -59,8 +59,7 @@@ import org.apache.ignite.IgniteCheckedE import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; -import org.apache.ignite.cache.CacheMemoryMode; + import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; @@@ -88,9 -85,9 +89,10 @@@ import org.apache.ignite.internal.proce import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshallable; import org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; +import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator; import org.apache.ignite.internal.processors.query.GridRunningQueryInfo; + import org.apache.ignite.internal.processors.query.GridRunningQueryInfo; import org.apache.ignite.internal.processors.query.GridQueryCancel; import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata; import org.apache.ignite.internal.processors.query.GridQueryFieldsResult; @@@ -1895,97 -1898,7 +1894,84 @@@ public class IgniteH2Indexing implement return schema.spaceName; } - /** {@inheritDoc} */ - @Override public void rebuildIndexes(@Nullable String spaceName, GridQueryTypeDescriptor type) { - TableDescriptor tbl = tableDescriptor(spaceName, type); - - if (tbl == null) - return; - - if (tbl.schema.offheap != null) - throw new UnsupportedOperationException("Index rebuilding is not supported when off-heap memory is used"); - - tbl.tbl.rebuildIndexes(); - } - /** + * Rebuild indexes from hash index. + * + * @param spaceName Space name. + * @param type Type descriptor. + * @throws IgniteCheckedException If failed. + */ + @Override public void rebuildIndexesFromHash(@Nullable String spaceName, + GridQueryTypeDescriptor type) throws IgniteCheckedException { + TableDescriptor tbl = tableDescriptor(spaceName, type); + + if (tbl == null) + return; + + assert tbl.tbl != null; + + assert tbl.tbl.rebuildFromHashInProgress(); + + H2PkHashIndex hashIdx = tbl.pkHashIdx; + + Cursor cursor = hashIdx.find((Session)null, null, null); + + int cacheId = CU.cacheId(tbl.schema.ccfg.getName()); + + GridCacheContext cctx = ctx.cache().context().cacheContext(cacheId); + + while (cursor.next()) { + CacheDataRow dataRow = (CacheDataRow)cursor.get(); + + boolean done = false; + + while (!done) { + GridCacheEntryEx entry = cctx.cache().entryEx(dataRow.key()); + + try { + synchronized (entry) { + // TODO : How to correctly get current value and link here? + + GridH2Row row = tbl.tbl.rowDescriptor().createRow(entry.key(), entry.partition(), + dataRow.value(), entry.version(), entry.expireTime()); + + row.link(dataRow.link()); + + List indexes = tbl.tbl.getAllIndexes(); + + for (int i = 2; i < indexes.size(); i++) { + Index idx = indexes.get(i); + + if (idx instanceof H2TreeIndex) + ((H2TreeIndex)idx).put(row); + } + + done = true; + } + } + catch (GridCacheEntryRemovedException e) { + // No-op + } + } + + } + + tbl.tbl.markRebuildFromHashInProgress(false); + } + + /** {@inheritDoc} */ + @Override public void markForRebuildFromHash(@Nullable String spaceName, GridQueryTypeDescriptor type) { + TableDescriptor tbl = tableDescriptor(spaceName, type); + + if (tbl == null) + return; + + assert tbl.tbl != null; + + tbl.tbl.markRebuildFromHashInProgress(true); + } + + /** * Gets size (for tests only). * * @param spaceName Space name. @@@ -2292,7 -2203,7 +2278,7 @@@ } /** {@inheritDoc} */ - @Override public void registerCache(GridCacheContext cctx, CacheConfiguration ccfg) - @Override public void registerCache(String spaceName, GridCacheContext cctx, CacheConfiguration ccfg) ++ @Override public void registerCache(String spaceName, GridCacheContext cctx, CacheConfiguration ccfg) throws IgniteCheckedException { String schema = schemaNameFromCacheConf(ccfg); @@@ -2321,18 -2232,14 +2307,18 @@@ dropSchema(schema); } catch (IgniteCheckedException e) { - U.error(log, "Failed to drop schema on cache stop (will ignore): " + U.maskName(ccfg.getName()), e); + U.error(log, "Failed to drop schema on cache stop (will ignore): " + U.maskName(spaceName), e); } + for (TableDescriptor tblDesc : rmv.tbls.values()) + for (Index idx : tblDesc.tbl.getIndexes()) + idx.close(null); + for (Iterator> it = twoStepCache.entrySet().iterator(); - it.hasNext();) { + it.hasNext(); ) { Map.Entry e = it.next(); - if (F.eq(e.getKey().space, ccfg.getName())) + if (F.eq(e.getKey().space, spaceName)) it.remove(); } } @@@ -2936,9 -2812,9 +2922,9 @@@ cols = treeIndexColumns(cols, keyCol, affCol); - idxs.add(createTreeIndex(name, tbl, false, cols)); + idxs.add(createSortedIndex(cacheId, name, tbl, false, cols, idx.inlineSize())); } - else if (idx.type() == GEO_SPATIAL) + else if (idx.type() == QueryIndexType.GEOSPATIAL) idxs.add(createH2SpatialIndex(tbl, name, cols.toArray(new IndexColumn[cols.size()]))); else throw new IllegalStateException("Index type: " + idx.type()); http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java index 00db055,1ebfd60..67e294a --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java @@@ -190,17 -200,7 +190,7 @@@ public abstract class GridH2IndexBase e } /** - * If the index supports rebuilding it has to creates its own copy. - * - * @return Rebuilt copy. - * @throws InterruptedException If interrupted. - */ - public GridH2IndexBase rebuild() throws InterruptedException { - return this; - } - - /** - * Put row if absent. + * Puts row. * * @param row Row. * @return Existing row or {@code null}. http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java index 0dd4182,287e1e0..60eecd8 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java @@@ -684,53 -631,6 +684,20 @@@ public class GridH2Table extends TableB return res; } + /** - * Rebuilds all indexes of this table. - */ - public void rebuildIndexes() { - if (!snapshotEnabled) - return; - - Lock l = lock(true, Long.MAX_VALUE); - - ArrayList idxs0 = new ArrayList<>(idxs); - - try { - snapshotIndexes(null); // Allow read access while we are rebuilding indexes. - - for (int i = 2, len = idxs.size(); i < len; i++) { - GridH2IndexBase newIdx = index(i).rebuild(); - - idxs.set(i, newIdx); - - if (i == 2) // ScanIndex at 0 and actualSnapshot can contain references to old indexes, reset them. - idxs.set(0, new ScanIndex(newIdx, index(1))); - } - } - catch (InterruptedException e) { - throw new IgniteInterruptedException(e); - } - finally { - releaseSnapshots0(idxs0); - - unlock(l); - } - } - - /** + * + */ + public void markRebuildFromHashInProgress(boolean value) { + rebuildFromHashInProgress = value; + } + + /** + * + */ + public boolean rebuildFromHashInProgress() { + return rebuildFromHashInProgress; + } + /** {@inheritDoc} */ @Override public Index addIndex(Session ses, String s, int i, IndexColumn[] idxCols, IndexType idxType, boolean b, String s1) { http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java index aaf8310,99392f7..9180b89 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java @@@ -498,109 -503,4 +497,76 @@@ public class GridH2TreeIndex extends Gr throw new IllegalStateException(); } } + - /** {@inheritDoc} */ - @Override public GridH2TreeIndex rebuild() throws InterruptedException { - IndexColumn[] cols = getIndexColumns(); - - GridH2TreeIndex idx = new GridH2TreeIndex(getName(), getTable(), - getIndexType().isUnique(), F.asList(cols), segments.length); - - Thread thread = Thread.currentThread(); - - long j = 0; - - for (int i = 0; i < segments.length; i++) { - try { - GridCursor cursor = segments[i].find(null, null); - - while(cursor.next()) { - GridH2Row row = cursor.get(); - - // Check for interruptions every 1024 iterations. - if ((++j & 1024) == 0 && thread.isInterrupted()) - throw new InterruptedException(); - - idx.put(row); - } - } - catch (IgniteCheckedException e) { - throw DbException.convert(e); - } - } - - return idx; - } - + /** + * Adapter from {@link NavigableMap} to {@link IgniteTree}. + */ + private static final class IgniteNavigableMapTree implements IgniteTree, Cloneable { + /** Tree. */ + private final NavigableMap tree; + + /** + * @param tree Tree. + */ + private IgniteNavigableMapTree(NavigableMap tree) { + this.tree = tree; + } + + /** {@inheritDoc} */ + @Override public void invoke(GridSearchRowPointer key, Object x, InvokeClosure c) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + @Override public GridH2Row put(GridH2Row val) { + return tree.put(val, val); + } + + /** {@inheritDoc} */ + @Override public GridH2Row findOne(GridSearchRowPointer key) { + return tree.get(key); + } + + /** {@inheritDoc} */ + @Override public GridCursor find(GridSearchRowPointer lower, GridSearchRowPointer upper) + throws IgniteCheckedException { + + Collection rows; + + if (lower == null && upper == null) + rows = tree.values(); + else if (lower != null && upper == null) + rows = tree.tailMap(lower).values(); + else if (lower == null) + rows = tree.headMap(upper).values(); + else + rows = tree.subMap(lower, false, upper, false).values(); + + return new GridCursorIteratorWrapper<>(rows.iterator()); + } + + /** {@inheritDoc} */ + @Override public GridH2Row remove(GridSearchRowPointer key) { + return tree.remove(key); + } + + /** {@inheritDoc} */ + @Override public long size() { + return tree.size(); + } + + /** {@inheritDoc} */ + @Override public IgniteNavigableMapTree clone() { + IgniteNavigableMapTree cp; + + try { + cp = (IgniteNavigableMapTree)super.clone(); + } + catch (final CloneNotSupportedException e) { + throw DbException.convert(e); + } + + return new IgniteNavigableMapTree(cp.tree); + } + } } http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java index 5fd088f,c35eebb..b73bb96 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java @@@ -24,9 -25,7 +25,8 @@@ import org.apache.ignite.cache.QueryInd import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.processors.cache.CacheObject; import org.apache.ignite.internal.processors.cache.CacheObjectContext; +import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.processors.query.GridQueryIndexDescriptor; - import org.apache.ignite.internal.processors.query.GridQueryIndexType; import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor; import org.apache.ignite.internal.util.GridAtomicLong; import org.apache.ignite.internal.util.GridCloseableIteratorAdapter; http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java index daa5246,347043f..0f62b4b --- 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 @@@ -113,10 -112,10 +113,7 @@@ import static org.apache.ignite.interna * Reduce query executor. */ public class GridReduceQueryExecutor { - /** Thread pool to process query messages. */ - public static final byte QUERY_POOL = GridIoPolicy.SYSTEM_POOL; - /** */ - private static final IgniteProductVersion DISTRIBUTED_JOIN_SINCE = IgniteProductVersion.fromString("1.7.0"); - - /** */ private static final String MERGE_INDEX_UNSORTED = "merge_scan"; /** */ http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java index 99fc741,d896c08..6f9d6b5 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java @@@ -90,9 -92,17 +90,9 @@@ public class GridCacheOffHeapAndSwapSel /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - /** - * Creates a SwapSpaceSpi. - * @return the Spi - */ - protected SwapSpaceSpi spi() { - return new FileSwapSpaceSpi(); - } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi disco = new TcpDiscoverySpi(); http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java index 016b3db,846f700..2c083fb --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java @@@ -71,9 -73,17 +71,9 @@@ public class GridCacheOffHeapSelfTest e /** PeerClassLoadingLocalClassPathExclude enable. */ private boolean excluded; - /** - * Creates a SwapSpaceSpi. - * @return the Spi - */ - protected SwapSpaceSpi spi() { - return new FileSwapSpaceSpi(); - } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi disco = new TcpDiscoverySpi(); http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java index e927e50,80541ff..1740fe9 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java @@@ -265,74 -293,85 +265,95 @@@ public abstract class IgniteCacheAbstra assert String.class.getName().equals(fields.get("NAME")); - fields = meta.fields("Organization"); - - assert fields != null; - assertEquals("Fields: " + fields, 5, fields.size()); - - if (binaryMarshaller) { - assert Object.class.getName().equals(fields.get("_VAL")); - assert Integer.class.getName().equals(fields.get("ID")); - } - else { - assert Organization.class.getName().equals(fields.get("_VAL")); - assert int.class.getName().equals(fields.get("ID")); - } - - assert String.class.getName().equals(fields.get("_KEY")); - assert String.class.getName().equals(fields.get("NAME")); - - fields = meta.fields("String"); - - assert fields != null; - assert fields.size() == 2; - assert String.class.getName().equals(fields.get("_KEY")); - assert String.class.getName().equals(fields.get("_VAL")); - - fields = meta.fields("Integer"); - - assert fields != null; - assert fields.size() == 2; - assert Integer.class.getName().equals(fields.get("_KEY")); - assert Integer.class.getName().equals(fields.get("_VAL")); - Collection indexes = meta.indexes("Person"); + assertNotNull("Indexes should be defined", indexes); assertEquals(2, indexes.size()); + + Iterator it = indexes.iterator(); + + Collection indFlds = it.next().fields(); + + assertNotNull("Fields for first index should be defined", indFlds); + assertEquals("First index should have one field", indFlds.size(), 1); + + Iterator indFldIt = indFlds.iterator(); + + assertEquals(indFldIt.next(), "AGE"); + + indFlds = it.next().fields(); + + assertNotNull("Fields for second index should be defined", indFlds); + assertEquals("Second index should have one field", indFlds.size(), 1); + + indFldIt = indFlds.iterator(); + + assertEquals(indFldIt.next(), "ORGID"); + } + else if (orgCache.getName().equals(meta.cacheName())) { + assertEquals("Invalid types size", 1, types.size()); + assert types.contains("Organization"); + + if (binaryMarshaller) + assert Object.class.getName().equals(meta.valueClass("Organization")); + else + assert Organization.class.getName().equals(meta.valueClass("Organization")); + + assert String.class.getName().equals(meta.keyClass("Organization")); + + Map fields = meta.fields("Organization"); + + assert fields != null; + assertEquals("Fields: " + fields, 5, fields.size()); - wasNull = true; + if (binaryMarshaller) { + assert Object.class.getName().equals(fields.get("_VAL")); + assert Integer.class.getName().equals(fields.get("ID")); + } + else { + assert Organization.class.getName().equals(fields.get("_VAL")); + assert int.class.getName().equals(fields.get("ID")); + } + + assert String.class.getName().equals(fields.get("_KEY")); + assert String.class.getName().equals(fields.get("NAME")); } - else if (CACHE.equals(meta.cacheName())) - wasNamed = true; - else if (EMPTY_CACHE.equals(meta.cacheName())) { - assert meta.types().isEmpty(); + else if (intCache.getName().equals(meta.cacheName())) { + assertEquals("Invalid types size", 1, types.size()); + assert types.contains("Integer"); + + assert Integer.class.getName().equals(meta.valueClass("Integer")); + assert Integer.class.getName().equals(meta.keyClass("Integer")); - wasEmpty = true; + Map fields = meta.fields("Integer"); + + assert fields != null; + assert fields.size() == 2; + assert Integer.class.getName().equals(fields.get("_KEY")); + assert Integer.class.getName().equals(fields.get("_VAL")); } - else if (CACHE_NO_PRIMITIVES.equals(meta.cacheName())) - wasNoPrimitives = true; - else if (CACHE_COMPLEX_KEYS.equals(meta.cacheName())) - wasComplexKeys = true; - } + else if (strCache.getName().equals(meta.cacheName())) { + assertEquals("Invalid types size", 1, types.size()); + assert types.contains("String"); + + assert String.class.getName().equals(meta.valueClass("String")); + assert String.class.getName().equals(meta.keyClass("String")); + + Map fields = meta.fields("String"); - assert wasNull; - assert wasNamed; - assert wasEmpty; - assert wasNoPrimitives; - assert wasComplexKeys; + assert fields != null; + assert fields.size() == 2; + assert String.class.getName().equals(fields.get("_KEY")); + assert String.class.getName().equals(fields.get("_VAL")); + } + else if (meta.cacheName() == null) + assertTrue("Invalid types size", types.isEmpty()); + else + fail("Unknown cache: " + meta.cacheName()); + } } finally { - ((IgniteKernal)grid(0)).getCache(null).remove(new GridCacheInternalKeyImpl("LONG")); + ((IgniteKernal)grid(0)).getCache(intCache.getName()).remove(new GridCacheInternalKeyImpl("LONG")); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java index 426a3ef,209ab02..82e83ca --- 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 @@@ -145,86 -146,102 +145,101 @@@ public abstract class IgniteCacheAbstra c.setDiscoverySpi(new TcpDiscoverySpi().setForceServerMode(true).setIpFinder(ipFinder)); - if (gridName.startsWith("client")) - // Otherwise noop swap space will be chosen on Windows. - c.setSwapSpaceSpi(new FileSwapSpaceSpi()); - - if (!igniteInstanceName.startsWith("client")) { - CacheConfiguration[] ccs = new CacheConfiguration[2]; ++ if (igniteInstanceName.startsWith("client")) + c.setClientMode(true); - for (int i = 0; i < ccs.length; i++) { - CacheConfiguration cc = defaultCacheConfiguration(); + return c; + } - if (i > 0) - cc.setName("c" + i); + /** + * @return cache configuration + */ + protected CacheConfiguration cacheConfiguration() { + CacheConfiguration cc = defaultCacheConfiguration(); - cc.setCacheMode(cacheMode()); - cc.setAtomicityMode(atomicityMode()); - cc.setNearConfiguration(nearCacheConfiguration()); - cc.setWriteSynchronizationMode(FULL_SYNC); - cc.setCacheStoreFactory(new StoreFactory()); - cc.setReadThrough(true); - cc.setWriteThrough(true); - cc.setLoadPreviousValue(true); - cc.setRebalanceMode(SYNC); - cc.setSwapEnabled(true); - cc.setSqlFunctionClasses(SqlFunctions.class); - cc.setIndexedTypes( - BadHashKeyObject.class, Byte.class, - ObjectValue.class, Long.class, - Integer.class, Integer.class, - Integer.class, String.class, - Integer.class, ObjectValue.class, - String.class, ObjectValueOther.class, - Integer.class, ArrayObject.class, - Key.class, GridCacheQueryTestValue.class, - UUID.class, Person.class, - IgniteCacheReplicatedQuerySelfTest.CacheKey.class, IgniteCacheReplicatedQuerySelfTest.CacheValue.class, - Long.class, EnumObject.class - ); + cc.setCacheMode(cacheMode()); + cc.setAtomicityMode(atomicityMode()); + cc.setNearConfiguration(nearCacheConfiguration()); + cc.setWriteSynchronizationMode(FULL_SYNC); + cc.setCacheStoreFactory(new StoreFactory()); + cc.setReadThrough(true); + cc.setWriteThrough(true); + cc.setLoadPreviousValue(true); + cc.setRebalanceMode(SYNC); + cc.setSqlFunctionClasses(SqlFunctions.class); - List entityList = new ArrayList<>(); + List entityList = new ArrayList<>(); - QueryEntity qryEntity = new QueryEntity(); + QueryEntity qryEntity = new QueryEntity(); - qryEntity.setKeyType(Integer.class.getName()); - qryEntity.setValueType(Type1.class.getName()); - qryEntity.addQueryField("id", Integer.class.getName(), null); - qryEntity.addQueryField("name", String.class.getName(), null); - qryEntity.setTableName("Type2"); - qryEntity.setIndexes(Arrays.asList(new QueryIndex("id"))); + qryEntity.setKeyType(Integer.class.getName()); + qryEntity.setValueType(Type1.class.getName()); + qryEntity.addQueryField("id", Integer.class.getName(), null); + qryEntity.addQueryField("name", String.class.getName(), null); + qryEntity.setTableName("Type2"); + qryEntity.setIndexes(Arrays.asList(new QueryIndex("id"))); - entityList.add(qryEntity); + entityList.add(qryEntity); - qryEntity = new QueryEntity(); + qryEntity = new QueryEntity(); - qryEntity.setKeyType(Integer.class.getName()); - qryEntity.setValueType(Type2.class.getName()); - qryEntity.addQueryField("id", Integer.class.getName(), null); - qryEntity.addQueryField("name", String.class.getName(), null); - qryEntity.setTableName("Type1"); - qryEntity.setIndexes(Arrays.asList(new QueryIndex("id"))); + qryEntity.setKeyType(Integer.class.getName()); + qryEntity.setValueType(Type2.class.getName()); + qryEntity.addQueryField("id", Integer.class.getName(), null); + qryEntity.addQueryField("name", String.class.getName(), null); + qryEntity.setTableName("Type1"); + qryEntity.setIndexes(Arrays.asList(new QueryIndex("id"))); - entityList.add(qryEntity); + entityList.add(qryEntity); - cc.setQueryEntities(entityList);if (cacheMode() != CacheMode.LOCAL) - qryEntity = new QueryEntity(); ++ qryEntity = new QueryEntity(); + - qryEntity.setKeyType(Integer.class.getName()); - qryEntity.setValueType(ObjectValue2.class.getName()); ++ qryEntity.setKeyType(Integer.class.getName()); ++ qryEntity.setValueType(ObjectValue2.class.getName()); + - qryEntity.addQueryField("strVal", String.class.getName(), null); ++ qryEntity.addQueryField("strVal", String.class.getName(), null); + - final QueryIndex strIdx = new QueryIndex(); // Default index type ++ final QueryIndex strIdx = new QueryIndex(); // Default index type + - strIdx.setFieldNames(Collections.singletonList("strVal"), true); ++ strIdx.setFieldNames(Collections.singletonList("strVal"), true); + - qryEntity.setIndexes(Arrays.asList(strIdx)); ++ qryEntity.setIndexes(Arrays.asList(strIdx)); + - entityList.add(qryEntity); ++ entityList.add(qryEntity);cc.setQueryEntities(entityList); + - cc.setQueryEntities(entityList); ++ if (cacheMode() != CacheMode.LOCAL) + cc.setAffinity(new RendezvousAffinityFunction()); - if (cacheMode() != CacheMode.LOCAL) - cc.setAffinity(new RendezvousAffinityFunction()); + // Explicitly set number of backups equal to number of grids. + if (cacheMode() == CacheMode.PARTITIONED) + cc.setBackups(gridCount()); - // Explicitly set number of backups equal to number of grids. - if (cacheMode() == CacheMode.PARTITIONED) - cc.setBackups(gridCount()); + //cc.setSnapshotableIndex(snapshotableIndex()); - cc.setSnapshotableIndex(snapshotableIndex()); + return cc; + } - ccs[i] = cc; - } + /** + * @param clsK Key class. + * @param clsV Value class. + * + * @return cache instance + */ + protected IgniteCache jcache(Class clsK, Class clsV) { + return jcache(ignite(), clsK, clsV); + } - c.setCacheConfiguration(ccs); - } - else - c.setClientMode(true); + /** + * @param ig Ignite. + * @param clsK Key class. + * @param clsV Value class. + * + * @return cache instance + */ + protected IgniteCache jcache(Ignite ig, Class clsK, Class clsV) { + IgniteCache cache = jcache(ig, cacheConfiguration(), clsK, clsV); - return c; + return cache; } /** @@@ -752,8 -768,42 +767,42 @@@ * * @throws Exception In case of error. */ + public void testObjectWithString() throws Exception { + IgniteCache cache = ignite().cache(null); + + cache.put(1, new ObjectValue2("value 1")); + cache.put(2, new ObjectValue2("value 2")); + cache.put(3, new ObjectValue2("value 3")); + + QueryCursor> qry + = cache.query(new SqlQuery(ObjectValue2.class, "strVal like ?").setArgs("value%")); + + int expCnt = 3; + + List> results = qry.getAll(); + + assertEquals(expCnt, results.size()); + + qry = cache.query(new SqlQuery(ObjectValue2.class, "strVal > ?").setArgs("value 1")); + + results = qry.getAll(); + + assertEquals(expCnt - 1, results.size()); + + qry = cache.query(new TextQuery(ObjectValue2.class, "value")); + + results = qry.getAll(); + + assertEquals(0, results.size()); //Should fail for FULL_TEXT index, but SORTED + } + + /** + * JUnit. + * + * @throws Exception In case of error. + */ public void testEnumObjectQuery() throws Exception { - final IgniteCache cache = ignite().cache(null); + final IgniteCache cache = jcache(Long.class, EnumObject.class); for (long i = 0; i < 50; i++) cache.put(i, new EnumObject(i, i % 2 == 0 ? EnumType.TYPE_A : EnumType.TYPE_B)); http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCollocatedQuerySelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationPrimitiveTypesSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCrossCacheJoinRandomTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedCollocationTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java index 3af4701,2d99010..70c46e8 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java @@@ -30,11 -31,8 +31,10 @@@ import org.apache.ignite.cache.QueryInd import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.CacheObject; import org.apache.ignite.internal.processors.cache.CacheObjectContext; +import org.apache.ignite.internal.processors.cache.KeyCacheObject; +import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.processors.query.GridQueryFieldsResult; import org.apache.ignite.internal.processors.query.GridQueryIndexDescriptor; - import org.apache.ignite.internal.processors.query.GridQueryIndexType; import org.apache.ignite.internal.processors.query.GridQueryProperty; import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor; import org.apache.ignite.internal.util.typedef.F; @@@ -504,14 -488,9 +490,14 @@@ public abstract class GridIndexingSpiAb } /** {@inheritDoc} */ - @Override public GridQueryIndexType type() { - return GridQueryIndexType.FULLTEXT; + @Override public QueryIndexType type() { + return QueryIndexType.FULLTEXT; } + + /** {@inheritDoc} */ + @Override public int inlineSize() { + return 0; + } } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs ---------------------------------------------------------------------- diff --cc modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs index ba86b86,4335d11..55acb12 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs @@@ -49,7 -49,10 +49,9 @@@ namespace Apache.Ignite.Core.Test using Apache.Ignite.Core.Impl.Common; using Apache.Ignite.Core.Lifecycle; using Apache.Ignite.Core.Log; - using Apache.Ignite.Core.SwapSpace.File; using Apache.Ignite.Core.Tests.Binary; + using Apache.Ignite.Core.Tests.Plugin; + using Apache.Ignite.Core.Tests.Plugin.Cache; using Apache.Ignite.Core.Transactions; using Apache.Ignite.NLog; using NUnit.Framework; @@@ -126,6 -133,10 +132,9 @@@ - + + + "; var cfg = IgniteConfiguration.FromXml(xml); @@@ -742,6 -786,15 +774,7 @@@ SpringConfigUrl = "test", Logger = new IgniteNLogLogger(), FailureDetectionTimeout = TimeSpan.FromMinutes(2), - SwapSpaceSpi = new FileSwapSpaceSpi - { - MaximumSparsity = 0.1f, - MaximumWriteQueueSize = 55, - WriteBufferSize = 66, - ReadStripesNumber = 77, - BaseDirectory = "test" - }, + PluginConfigurations = new[] {new TestIgnitePluginConfiguration() } }; } http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs ---------------------------------------------------------------------- diff --cc modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs index b9a05c2,5063c21..ee36e5d --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs @@@ -35,6 -35,8 +35,7 @@@ namespace Apache.Ignite.Core.Test using Apache.Ignite.Core.Events; using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Impl.Binary; - using Apache.Ignite.Core.SwapSpace.File; + using Apache.Ignite.Core.Tests.Plugin; using Apache.Ignite.Core.Transactions; using NUnit.Framework; @@@ -458,8 -472,8 +462,8 @@@ ThreadPriority = 6, TopologyHistorySize = 1234567 }, - GridName = "gridName1", + IgniteInstanceName = "gridName1", - IncludedEventTypes = EventType.SwapspaceAll, + IncludedEventTypes = EventType.DiscoveryAll, MetricsExpireTime = TimeSpan.FromMinutes(7), MetricsHistorySize = 125, MetricsLogFrequency = TimeSpan.FromMinutes(8), http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs ---------------------------------------------------------------------- diff --cc modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs index 93c8976,d3bd50c..fbd3ba1 --- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs @@@ -39,10 -39,12 +39,10 @@@ namespace Apache.Ignite.Cor using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Impl.Binary; using Apache.Ignite.Core.Impl.Common; - using Apache.Ignite.Core.Impl.SwapSpace; using Apache.Ignite.Core.Lifecycle; using Apache.Ignite.Core.Log; + using Apache.Ignite.Core.Plugin; - using Apache.Ignite.Core.SwapSpace; using Apache.Ignite.Core.Transactions; - using BinaryReader = Apache.Ignite.Core.Impl.Binary.BinaryReader; using BinaryWriter = Apache.Ignite.Core.Impl.Binary.BinaryWriter; /// @@@ -326,6 -333,37 +331,34 @@@ } else writer.WriteBoolean(false); + - // Swap space - SwapSpaceSerializer.Write(writer, SwapSpaceSpi); - + // Plugins + if (PluginConfigurations != null) + { + var pos = writer.Stream.Position; + + writer.WriteInt(0); // reserve count + + var cnt = 0; + + foreach (var cfg in PluginConfigurations) + { + if (cfg.PluginConfigurationClosureFactoryId != null) + { + writer.WriteInt(cfg.PluginConfigurationClosureFactoryId.Value); + + cfg.WriteBinary(writer); + + cnt++; + } + } + + writer.Stream.WriteInt(pos, cnt); + } + else + { + writer.WriteInt(0); + } } /// @@@ -843,5 -901,16 +893,11 @@@ get { return _failureDetectionTimeout ?? DefaultFailureDetectionTimeout; } set { _failureDetectionTimeout = value; } } + + /// - /// Gets or sets the swap space SPI. - /// - public ISwapSpaceSpi SwapSpaceSpi { get; set; } - - /// + /// Gets or sets the configurations for plugins to be started. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public ICollection PluginConfigurations { get; set; } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd ---------------------------------------------------------------------- diff --cc modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd index 98522fa,629a41b..a6b9671 --- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd +++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd @@@ -1125,8 -1164,71 +1146,34 @@@ - - - Swap space SPI. - - - - - Assembly-qualified type name. - - - - - Base directory. - - - - - Maximum sparsity. This property defines maximum acceptable wasted file space to whole file size ratio. When this ratio becomes higher than specified number compacting thread starts working. - - - - - Maximum size of the write queue in bytes. If there are more values are waiting to be written to disk then specified size, SPI will block on write operation. - - - - - Read stripes number. Defines number of file channels to be used concurrently. Defaults to Environment.ProcessorCount. - - - - - Size of the write buffer, in bytes. Write to disk occurs only when this buffer is full. - - - - + + + Plugin configurations. + + + + + + Plugin configuration. + + + + + Assembly-qualified type name. + + + + + Id to locate PlatformPluginConfigurationClosureFactory on Java side. + + + + + + + - + Local Ignite instance name to be used with Ignition.GetIgnite. http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/IgniteScheduleProcessor.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java ---------------------------------------------------------------------- diff --cc modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java index 82eea27,2f6326d..7f5c252 --- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java +++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java @@@ -303,11 -299,10 +303,11 @@@ public class JavaStandaloneIgniteRDDSel } /** - * @param gridName Grid name. + * @param igniteInstanceName Ignite instance name. * @param client Client. + * @return Cache configuration. */ - private static IgniteConfiguration getConfiguration(String gridName, boolean client) throws Exception { + private static IgniteConfiguration getConfiguration(String igniteInstanceName, boolean client) throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java ---------------------------------------------------------------------- diff --cc modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java index fc45a25,1f790f8..9010f23 --- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java +++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java @@@ -54,10 -54,10 +54,10 @@@ import org.springframework.context.Appl *

Spring Configuration Example

* Here is a typical example of describing it in Spring file: *
 - * <bean id="mySpringBean" class="org.apache.ignite.GridSpringBean">
 + * <bean id="mySpringBean" class="org.apache.ignite.IgniteSpringBean">
   *     <property name="configuration">
   *         <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-  *             <property name="gridName" value="mySpringGrid"/>
+  *             <property name="igniteInstanceName" value="mySpringGrid"/>
   *         </bean>
   *     </property>
   * </bean>

http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/81ae2d83/scripts/git-remoteless-branches.sh
----------------------------------------------------------------------
diff --cc scripts/git-remoteless-branches.sh
index 0000000,0000000..8676e87
new file mode 100755
--- /dev/null
+++ b/scripts/git-remoteless-branches.sh
@@@ -1,0 -1,0 +1,19 @@@
++#!/bin/bash
++
++# Prints list of all local branches, which doesn't have remote.
++#
++# If '-d' argument passed it tries to delete found branches.
++# Note that foreceful delete is used - so ANY UNMERGED CHANGES WILL BE LOST!
++#
++# Note this script doesn't inspect current branch.
++
++for branch in `git branch | grep -v "*"`; do
++    git branch -r | grep "$branch" > /dev/null
++    if [ "$?" ==  "1" ]; then
++        if [ "$1" == "-d" ]; then
++            git branch -D $branch
++        else
++            echo "$branch"
++        fi;
++    fi;
++done;