[2/5] ignite git commit: Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5
Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b9e4e036 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b9e4e036 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b9e4e036 Branch: refs/heads/ignite-1.5 Commit: b9e4e0367dd38c5d4053e15e1d7307621f52bcfc Parents: 8a9cc54 f9690df Author: Denis MagdaAuthored: Wed Nov 25 18:23:54 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:23:54 2015 +0300 -- examples/pom.xml| 2 +- .../org/apache/ignite/internal/IgnitionEx.java | 9 +++-- .../internal/portable/BinaryReaderExImpl.java | 18 +++-- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../platform/PlatformContextImpl.java | 2 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- .../Services/ServicesExample.cs | 4 ++ modules/scalar/pom.xml | 4 +- modules/spark/pom.xml | 4 +- modules/visor-console/pom.xml | 2 +- parent/pom.xml | 2 +- 12 files changed, 93 insertions(+), 22 deletions(-) --
[10/13] ignite git commit: IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264
IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97270bf3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97270bf3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97270bf3 Branch: refs/heads/ignite-1.5-cache-get-opts Commit: 97270bf3ec5a220f44b21ba6fbaf254a9c0a6c08 Parents: b83f75e Author: Andrey GuraAuthored: Wed Nov 25 18:56:15 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:56:15 2015 +0300 -- .../ignite/internal/client/router/RouterFactorySelfTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/97270bf3/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java index d5eee7f..2e9e62a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java @@ -105,6 +105,8 @@ public class RouterFactorySelfTest extends GridCommonAbstractTest { } finally { GridRouterFactory.stopAllRouters(); + +stopAllGrids(); } } } \ No newline at end of file
[06/13] ignite git commit: IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252
IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8a9cc540 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8a9cc540 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8a9cc540 Branch: refs/heads/ignite-1.5-cache-get-opts Commit: 8a9cc5408f99713fb4a1a9036940fc76aef7b050 Parents: c23cda1 Author: Andrey GuraAuthored: Wed Nov 25 18:21:48 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:21:48 2015 +0300 -- .../java/org/apache/ignite/IgniteCache.java | 23 +++ .../processors/cache/GridCacheAdapter.java | 156 ++- .../processors/cache/GridCacheProxyImpl.java| 61 .../processors/cache/IgniteCacheProxy.java | 42 + .../processors/cache/IgniteInternalCache.java | 47 +- .../distributed/dht/GridDhtCacheAdapter.java| 7 +- .../distributed/near/GridNearCacheAdapter.java | 10 ++ .../CacheDeferredDeleteSanitySelfTest.java | 98 .../multijvm/IgniteCacheProcessProxy.java | 38 + .../ignite/testsuites/IgniteCacheTestSuite.java | 2 + ...niteCacheP2pUnmarshallingQueryErrorTest.java | 7 +- .../ignite-int-max-values-offheap-config.xml| 89 +++ .../ignite-int-max-values-onheap-config.xml | 84 ++ .../ignite-int-max-values-swap-config.xml | 93 +++ .../test-max-int-values-offheap.properties | 70 + .../test-max-int-values-onheap.properties | 70 + .../config/test-max-int-values-swap.properties | 69 .../yardstick/cache/IntMaxValueEntriesTest.java | 135 18 files changed, 1094 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/IgniteCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java index c9de3f1..c575865 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -348,6 +348,19 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int size(CachePeekMode... peekModes) throws CacheException; /** + * Gets the number of all entries cached across all nodes as a long value. By default, if {@code peekModes} value + * isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to + * calling this method with {@link CachePeekMode#PRIMARY} peek mode. + * + * NOTE: this operation is distributed and will query all participating nodes for their cache sizes. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size across all nodes. + */ +@IgniteAsyncSupported +public long sizeLong(CachePeekMode... peekModes) throws CacheException; + +/** * Gets the number of all entries cached on this node. By default, if {@code peekModes} value isn't defined, * only size of primary copies will be returned. This behavior is identical to calling this method with * {@link CachePeekMode#PRIMARY} peek mode. @@ -358,6 +371,16 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int localSize(CachePeekMode... peekModes); /** + * Gets the number of all entries cached on this node as a long value. By default, if {@code peekModes} value isn't + * defined, only size of primary copies will be returned. This behavior is identical to calling this method with + * {@link CachePeekMode#PRIMARY} peek mode. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size on this node. + */ +public long localSizeLong(CachePeekMode... peekModes); + +/** * @param map Map containing keys and entry processors to be applied to values. * @param args Additional arguments to pass to the {@link EntryProcessor}. * @return The map of {@link EntryProcessorResult}s of the processing per key, http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
[03/13] ignite git commit: IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams.
IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c40ab677 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c40ab677 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c40ab677 Branch: refs/heads/ignite-1.5-cache-get-opts Commit: c40ab677e69f0d756281c62549cb2f63de907ed6 Parents: dafad52 Author: Pavel TupitsynAuthored: Wed Nov 25 10:14:26 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 10:14:26 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index 4809c3c..872d7a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -162,6 +162,20 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina */ public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, @Nullable BinaryReaderHandles hnds) { +this(ctx, in, ldr, hnds, false); +} + +/** + * Constructor. + * + * @param ctx Context. + * @param in Input stream. + * @param ldr Class loader. + * @param hnds Context. + * @param skipHdrCheck Whether to skip header check. + */ +public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, +@Nullable BinaryReaderHandles hnds, boolean skipHdrCheck) { // Initialize base members. this.ctx = ctx; this.in = in; @@ -170,10 +184,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina start = in.position(); -byte hdr = in.readByte(); - // Perform full header parsing in case of portable object. -if (hdr == GridPortableMarshaller.OBJ) { +if (!skipHdrCheck && (in.readByte() == GridPortableMarshaller.OBJ)) { // Ensure protocol is fine. PortableUtils.checkProtocolVersion(in.readByte()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index 9a7f0df..7db752a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -177,7 +177,7 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @Override public BinaryRawReaderEx reader(PlatformInputStream in) { // TODO: IGNITE-1272 - Is class loader needed here? -return new BinaryReaderExImpl(marsh.context(), in, null); +return new BinaryReaderExImpl(marsh.context(), in, null, null, true); } /** {@inheritDoc} */
[12/13] ignite git commit: debugging slowdowns
debugging slowdowns Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0be5deaa Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0be5deaa Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0be5deaa Branch: refs/heads/ignite-1.5-cache-get-opts Commit: 0be5deaa14ec81af29437702b9f468d8d5f5a891 Parents: f2258cc Author: Yakov ZhdanovAuthored: Thu Nov 26 00:22:46 2015 +0300 Committer: Yakov Zhdanov Committed: Thu Nov 26 00:22:46 2015 +0300 -- .../cache/distributed/dht/GridDhtCacheAdapter.java | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/0be5deaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java index 8a293d7..50fabe9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java @@ -23,7 +23,6 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; @@ -725,9 +724,7 @@ public abstract class GridDhtCacheAdapter extends GridDistributedCacheAdap final CacheExpiryPolicy expiryPlc = CacheExpiryPolicy.forAccess(ttl); -LinkedHashMap map = U.newLinkedHashMap(1); - -map.put(req.key(), req.addReader()); +Map map = Collections.singletonMap(req.key(), req.addReader()); IgniteInternalFuture fut = getDhtAsync(nodeId, @@ -760,7 +757,8 @@ public abstract class GridDhtCacheAdapter extends GridDistributedCacheAdap info.key(null); res0 = info; -} else if (req.needVersion()) +} +else if (req.needVersion()) res0 = new CacheVersionedValue(info.value(), info.version()); else res0 = info.value();
[11/13] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f2258cc8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f2258cc8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f2258cc8 Branch: refs/heads/ignite-1.5-cache-get-opts Commit: f2258cc805fa25a37802bad4defe529eff3021be Parents: 3289cc1 97270bf Author: Yakov ZhdanovAuthored: Wed Nov 25 23:53:58 2015 +0300 Committer: Yakov Zhdanov Committed: Wed Nov 25 23:53:58 2015 +0300 -- examples/pom.xml| 2 +- .../client/router/RouterFactorySelfTest.java| 2 + .../java/org/apache/ignite/IgniteCache.java | 23 +++ .../org/apache/ignite/internal/IgnitionEx.java | 9 +- .../internal/portable/BinaryReaderExImpl.java | 18 ++- .../processors/cache/CacheLockImpl.java | 18 ++- .../processors/cache/GridCacheAdapter.java | 156 ++- .../processors/cache/GridCacheProxyImpl.java| 61 .../processors/cache/IgniteCacheProxy.java | 42 + .../processors/cache/IgniteInternalCache.java | 47 +- .../distributed/dht/GridDhtCacheAdapter.java| 7 +- .../colocated/GridDhtColocatedLockFuture.java | 8 +- .../distributed/near/GridNearCacheAdapter.java | 10 ++ .../platform/PlatformContextImpl.java | 2 +- .../ignite/resources/MBeanServerResource.java | 69 .../CacheDeferredDeleteSanitySelfTest.java | 98 .../cache/CacheStopAndDestroySelfTest.java | 8 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 - .../multijvm/IgniteCacheProcessProxy.java | 38 + .../ignite/testsuites/IgniteCacheTestSuite.java | 2 + ...niteCacheP2pUnmarshallingQueryErrorTest.java | 7 +- .../Services/ServicesExample.cs | 4 + modules/scalar/pom.xml | 4 +- modules/spark/pom.xml | 4 +- modules/visor-console/pom.xml | 2 +- .../ignite-int-max-values-offheap-config.xml| 89 +++ .../ignite-int-max-values-onheap-config.xml | 84 ++ .../ignite-int-max-values-swap-config.xml | 93 +++ .../test-max-int-values-offheap.properties | 70 + .../test-max-int-values-onheap.properties | 70 + .../config/test-max-int-values-swap.properties | 69 .../yardstick/cache/IntMaxValueEntriesTest.java | 135 parent/pom.xml | 2 +- 33 files changed, 1194 insertions(+), 101 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f2258cc8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f2258cc8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java --
ignite git commit: Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default
Repository: ignite Updated Branches: refs/heads/ignite-1.5 3c42da8b0 -> 4af461a7f Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4af461a7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4af461a7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4af461a7 Branch: refs/heads/ignite-1.5 Commit: 4af461a7f403fc0e4df13d23d0789eee49200b26 Parents: 3c42da8 Author: sboikovAuthored: Thu Nov 26 09:30:10 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:30:10 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 +++ .../cache/query/GridCacheSqlQuery.java | 42 .../cache/query/GridCacheTwoStepQuery.java | 35 ++- .../processors/query/GridQueryProcessor.java| 40 +--- .../processors/query/GridQueryProperty.java | 45 .../query/GridQueryTypeDescriptor.java | 6 + .../query/h2/GridH2ResultSetIterator.java | 19 +- .../processors/query/h2/IgniteH2Indexing.java | 227 --- .../query/h2/opt/GridH2RowDescriptor.java | 5 + .../processors/query/h2/opt/GridH2Table.java| 69 +- .../query/h2/opt/GridH2TreeIndex.java | 98 +--- .../query/h2/sql/GridSqlQuerySplitter.java | 73 -- .../processors/query/h2/sql/GridSqlSelect.java | 27 +++ .../query/h2/twostep/GridMapQueryExecutor.java | 17 +- .../query/h2/twostep/GridMergeIndex.java| 7 + .../h2/twostep/GridMergeIndexUnsorted.java | 14 ++ .../h2/twostep/GridReduceQueryExecutor.java | 117 +++--- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++--- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 +++ .../h2/GridIndexingSpiAbstractSelfTest.java | 19 ++ .../IgniteCacheQuerySelfTestSuite.java | 2 + 21 files changed, 776 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index e87346f..e2bf912 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -373,6 +373,9 @@ public class CacheConfiguration extends MutableConfiguration { /** */ private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE; +/** */ +private boolean snapshotableIdx; + /** Copy on read flag. */ private boolean cpOnRead = DFLT_COPY_ON_READ; @@ -463,6 +466,7 @@ public class CacheConfiguration extends MutableConfiguration { rebalancePoolSize = cc.getRebalanceThreadPoolSize(); rebalanceTimeout = cc.getRebalanceTimeout(); rebalanceThrottle = cc.getRebalanceThrottle(); +snapshotableIdx = cc.isSnapshotableIndex(); sqlEscapeAll = cc.isSqlEscapeAll(); sqlFuncCls = cc.getSqlFunctionClasses(); sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize(); @@ -1900,6 +1904,32 @@ public class CacheConfiguration extends MutableConfiguration { } /** + * Gets flag indicating whether SQL indexes should support snapshots. + * + * @return {@code True} if SQL indexes should support snapshots. + */ +public boolean isSnapshotableIndex() { +return snapshotableIdx; +} + +/** + * Sets flag indicating whether SQL indexes should support snapshots. + * + * Default value is {@code false}. + * + * Note that this flag is ignored if indexes are stored in offheap memory, + * for offheap indexes snapshots are always enabled. + * + * @param snapshotableIdx {@code True} if SQL indexes should support snapshots. + * @return {@code this} for chaining. + */ +public CacheConfiguration setSnapshotableIndex(boolean snapshotableIdx) { +this.snapshotableIdx = snapshotableIdx; + +return this; +} + +/** * Gets array of cache plugin configurations. * * @return Cache plugin configurations. http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java -- diff --git
ignite git commit: Ignite 1924
Repository: ignite Updated Branches: refs/heads/ignite-1924 414fc73ea -> af8d49668 Ignite 1924 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/af8d4966 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/af8d4966 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/af8d4966 Branch: refs/heads/ignite-1924 Commit: af8d496683ee8b18e3a3d62b0344410406cf1ddb Parents: 414fc73 Author: Anton VinogradovAuthored: Thu Nov 26 10:41:41 2015 +0300 Committer: Anton Vinogradov Committed: Thu Nov 26 10:41:41 2015 +0300 -- .../apache/ignite/internal/util/nio/GridNioServer.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/af8d4966/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java index 89af07f..63d29e6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java @@ -1001,12 +1001,12 @@ public class GridNioServer { assert msg != null; +finished = msg.writeTo(buf, writer); + if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { U.log(log, "B91>> " + ((GridIoMessage)msg).message()); } -finished = msg.writeTo(buf, writer); - if (finished && writer != null) writer.reset(); } @@ -1025,14 +1025,14 @@ public class GridNioServer { msg = req.directMessage(); -if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { -U.log(log, "B92>> " + ((GridIoMessage)msg).message()); -} - assert msg != null; finished = msg.writeTo(buf, writer); +if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { +U.log(log, "B92>> " + ((GridIoMessage)msg).message()); +} + if (finished && writer != null) writer.reset(); }
[02/11] ignite git commit: IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252
IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8a9cc540 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8a9cc540 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8a9cc540 Branch: refs/heads/ignite-1956 Commit: 8a9cc5408f99713fb4a1a9036940fc76aef7b050 Parents: c23cda1 Author: Andrey GuraAuthored: Wed Nov 25 18:21:48 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:21:48 2015 +0300 -- .../java/org/apache/ignite/IgniteCache.java | 23 +++ .../processors/cache/GridCacheAdapter.java | 156 ++- .../processors/cache/GridCacheProxyImpl.java| 61 .../processors/cache/IgniteCacheProxy.java | 42 + .../processors/cache/IgniteInternalCache.java | 47 +- .../distributed/dht/GridDhtCacheAdapter.java| 7 +- .../distributed/near/GridNearCacheAdapter.java | 10 ++ .../CacheDeferredDeleteSanitySelfTest.java | 98 .../multijvm/IgniteCacheProcessProxy.java | 38 + .../ignite/testsuites/IgniteCacheTestSuite.java | 2 + ...niteCacheP2pUnmarshallingQueryErrorTest.java | 7 +- .../ignite-int-max-values-offheap-config.xml| 89 +++ .../ignite-int-max-values-onheap-config.xml | 84 ++ .../ignite-int-max-values-swap-config.xml | 93 +++ .../test-max-int-values-offheap.properties | 70 + .../test-max-int-values-onheap.properties | 70 + .../config/test-max-int-values-swap.properties | 69 .../yardstick/cache/IntMaxValueEntriesTest.java | 135 18 files changed, 1094 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/IgniteCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java index c9de3f1..c575865 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -348,6 +348,19 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int size(CachePeekMode... peekModes) throws CacheException; /** + * Gets the number of all entries cached across all nodes as a long value. By default, if {@code peekModes} value + * isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to + * calling this method with {@link CachePeekMode#PRIMARY} peek mode. + * + * NOTE: this operation is distributed and will query all participating nodes for their cache sizes. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size across all nodes. + */ +@IgniteAsyncSupported +public long sizeLong(CachePeekMode... peekModes) throws CacheException; + +/** * Gets the number of all entries cached on this node. By default, if {@code peekModes} value isn't defined, * only size of primary copies will be returned. This behavior is identical to calling this method with * {@link CachePeekMode#PRIMARY} peek mode. @@ -358,6 +371,16 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int localSize(CachePeekMode... peekModes); /** + * Gets the number of all entries cached on this node as a long value. By default, if {@code peekModes} value isn't + * defined, only size of primary copies will be returned. This behavior is identical to calling this method with + * {@link CachePeekMode#PRIMARY} peek mode. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size on this node. + */ +public long localSizeLong(CachePeekMode... peekModes); + +/** * @param map Map containing keys and entry processors to be applied to values. * @param args Additional arguments to pass to the {@link EntryProcessor}. * @return The map of {@link EntryProcessorResult}s of the processing per key, http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
[08/11] ignite git commit: Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default
Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4af461a7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4af461a7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4af461a7 Branch: refs/heads/ignite-1956 Commit: 4af461a7f403fc0e4df13d23d0789eee49200b26 Parents: 3c42da8 Author: sboikovAuthored: Thu Nov 26 09:30:10 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:30:10 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 +++ .../cache/query/GridCacheSqlQuery.java | 42 .../cache/query/GridCacheTwoStepQuery.java | 35 ++- .../processors/query/GridQueryProcessor.java| 40 +--- .../processors/query/GridQueryProperty.java | 45 .../query/GridQueryTypeDescriptor.java | 6 + .../query/h2/GridH2ResultSetIterator.java | 19 +- .../processors/query/h2/IgniteH2Indexing.java | 227 --- .../query/h2/opt/GridH2RowDescriptor.java | 5 + .../processors/query/h2/opt/GridH2Table.java| 69 +- .../query/h2/opt/GridH2TreeIndex.java | 98 +--- .../query/h2/sql/GridSqlQuerySplitter.java | 73 -- .../processors/query/h2/sql/GridSqlSelect.java | 27 +++ .../query/h2/twostep/GridMapQueryExecutor.java | 17 +- .../query/h2/twostep/GridMergeIndex.java| 7 + .../h2/twostep/GridMergeIndexUnsorted.java | 14 ++ .../h2/twostep/GridReduceQueryExecutor.java | 117 +++--- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++--- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 +++ .../h2/GridIndexingSpiAbstractSelfTest.java | 19 ++ .../IgniteCacheQuerySelfTestSuite.java | 2 + 21 files changed, 776 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index e87346f..e2bf912 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -373,6 +373,9 @@ public class CacheConfiguration extends MutableConfiguration { /** */ private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE; +/** */ +private boolean snapshotableIdx; + /** Copy on read flag. */ private boolean cpOnRead = DFLT_COPY_ON_READ; @@ -463,6 +466,7 @@ public class CacheConfiguration extends MutableConfiguration { rebalancePoolSize = cc.getRebalanceThreadPoolSize(); rebalanceTimeout = cc.getRebalanceTimeout(); rebalanceThrottle = cc.getRebalanceThrottle(); +snapshotableIdx = cc.isSnapshotableIndex(); sqlEscapeAll = cc.isSqlEscapeAll(); sqlFuncCls = cc.getSqlFunctionClasses(); sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize(); @@ -1900,6 +1904,32 @@ public class CacheConfiguration extends MutableConfiguration { } /** + * Gets flag indicating whether SQL indexes should support snapshots. + * + * @return {@code True} if SQL indexes should support snapshots. + */ +public boolean isSnapshotableIndex() { +return snapshotableIdx; +} + +/** + * Sets flag indicating whether SQL indexes should support snapshots. + * + * Default value is {@code false}. + * + * Note that this flag is ignored if indexes are stored in offheap memory, + * for offheap indexes snapshots are always enabled. + * + * @param snapshotableIdx {@code True} if SQL indexes should support snapshots. + * @return {@code this} for chaining. + */ +public CacheConfiguration setSnapshotableIndex(boolean snapshotableIdx) { +this.snapshotableIdx = snapshotableIdx; + +return this; +} + +/** * Gets array of cache plugin configurations. * * @return Cache plugin configurations. http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
[06/11] ignite git commit: IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264
IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97270bf3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97270bf3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97270bf3 Branch: refs/heads/ignite-1956 Commit: 97270bf3ec5a220f44b21ba6fbaf254a9c0a6c08 Parents: b83f75e Author: Andrey GuraAuthored: Wed Nov 25 18:56:15 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:56:15 2015 +0300 -- .../ignite/internal/client/router/RouterFactorySelfTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/97270bf3/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java index d5eee7f..2e9e62a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java @@ -105,6 +105,8 @@ public class RouterFactorySelfTest extends GridCommonAbstractTest { } finally { GridRouterFactory.stopAllRouters(); + +stopAllGrids(); } } } \ No newline at end of file
[03/11] ignite git commit: Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5
Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b9e4e036 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b9e4e036 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b9e4e036 Branch: refs/heads/ignite-1956 Commit: b9e4e0367dd38c5d4053e15e1d7307621f52bcfc Parents: 8a9cc54 f9690df Author: Denis MagdaAuthored: Wed Nov 25 18:23:54 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:23:54 2015 +0300 -- examples/pom.xml| 2 +- .../org/apache/ignite/internal/IgnitionEx.java | 9 +++-- .../internal/portable/BinaryReaderExImpl.java | 18 +++-- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../platform/PlatformContextImpl.java | 2 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- .../Services/ServicesExample.cs | 4 ++ modules/scalar/pom.xml | 4 +- modules/spark/pom.xml | 4 +- modules/visor-console/pom.xml | 2 +- parent/pom.xml | 2 +- 12 files changed, 93 insertions(+), 22 deletions(-) --
[05/11] ignite git commit: ignite-1800: Annotation MBeanServerResource should be deleted as unsupported. This closes #260
ignite-1800: Annotation MBeanServerResource should be deleted as unsupported. This closes #260 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b83f75ed Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b83f75ed Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b83f75ed Branch: refs/heads/ignite-1956 Commit: b83f75edaa7145be443429d9cce54c86fe85730a Parents: e02edcd Author: Roman ShtykhAuthored: Wed Nov 25 18:41:03 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:41:03 2015 +0300 -- .../ignite/resources/MBeanServerResource.java | 69 1 file changed, 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b83f75ed/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java deleted file mode 100644 index 17b9aa7..000 --- a/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import javax.management.MBeanServer; - -/** - * Annotates a field or a setter method for injection of {@link MBeanServer} resource. MBean server - * is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}. - * - * MBean server can be injected into instances of following classes: - * - * {@link org.apache.ignite.compute.ComputeTask} - * {@link org.apache.ignite.compute.ComputeJob} - * {@link org.apache.ignite.spi.IgniteSpi} - * {@link org.apache.ignite.lifecycle.LifecycleBean} - * - * - * Here is how injection would typically happen: - * - * public class MyGridJob implements ComputeJob { - * ... - * IgniteMBeanServerResource - * private MBeanServer mbeanSrv; - * ... - * } - * - * or - * - * public class MyGridJob implements ComputeJob { - * ... - * private MBeanSever mbeanSrv; - * ... - * IgniteMBeanServerResource - * public void setMBeanServer(MBeanServer mbeanSrv) { - * this.mbeanSrv = mbeanSrv; - * } - * ... - * } - * - * - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getMBeanServer()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface MBeanServerResource { -// No-op. -} \ No newline at end of file
[04/11] ignite git commit: IGNITE-1992: [Test failed] CacheStopAndDestroySelfTest.testLocalClose test fails periodicaly. This closes #261
IGNITE-1992: [Test failed] CacheStopAndDestroySelfTest.testLocalClose test fails periodicaly. This closes #261 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e02edcd3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e02edcd3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e02edcd3 Branch: refs/heads/ignite-1956 Commit: e02edcd36d79f1e107c2ebe5096238f2f2a62a23 Parents: b9e4e03 Author: Andrey GuraAuthored: Wed Nov 25 18:34:42 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:34:42 2015 +0300 -- .../processors/cache/CacheStopAndDestroySelfTest.java| 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e02edcd3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java index 29828af..061a374 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java @@ -30,6 +30,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.managers.communication.GridIoMessage; +import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteInClosure; @@ -67,9 +68,6 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest { /** local cache name. */ protected static String CACHE_NAME_LOC = "cache_local"; -/** */ -private static volatile boolean stop; - /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); @@ -674,6 +672,10 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest { // Local creation after closed. +AffinityTopologyVersion topVer = grid(1).context().cache().context().exchange().lastTopologyFuture().get(); + + grid(0).context().cache().context().exchange().affinityReadyFuture(topVer).get(); + grid(0).getOrCreateCache(getLocalConfig()); grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated0");
[09/11] ignite git commit: Disabled shmem communication in failover tests.
Disabled shmem communication in failover tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/28d6e006 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/28d6e006 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/28d6e006 Branch: refs/heads/ignite-1956 Commit: 28d6e006c40b83fc8744b44312e74779264c0265 Parents: 4af461a Author: sboikovAuthored: Thu Nov 26 09:55:24 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:55:24 2015 +0300 -- .../GridCacheAbstractDataStructuresFailoverSelfTest.java | 3 +++ .../cache/datastructures/IgniteCollectionAbstractTest.java| 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/28d6e006/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index bc11448..4ee200b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -54,6 +54,7 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.resources.IgniteInstanceResource; +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; @@ -122,6 +123,8 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); + ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); + AtomicConfiguration atomicCfg = new AtomicConfiguration(); atomicCfg.setCacheMode(collectionCacheMode()); http://git-wip-us.apache.org/repos/asf/ignite/blob/28d6e006/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java index 36c846a..3e38a58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java @@ -26,6 +26,7 @@ import org.apache.ignite.configuration.CollectionConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter; +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; @@ -45,6 +46,8 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); + ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); + TcpDiscoverySpi spi = new TcpDiscoverySpi(); spi.setIpFinder(ipFinder);
[10/11] ignite git commit: Fixed test to do not fail with non-full-sync mode.
Fixed test to do not fail with non-full-sync mode. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/041cd38d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/041cd38d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/041cd38d Branch: refs/heads/ignite-1956 Commit: 041cd38d46b458ea3ae945e15411d4519c1bf777 Parents: 28d6e00 Author: sboikovAuthored: Thu Nov 26 10:09:46 2015 +0300 Committer: sboikov Committed: Thu Nov 26 10:09:46 2015 +0300 -- .../ignite/internal/IgniteClientReconnectCacheTest.java | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/041cd38d/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java index 6cf10f4..3d8f601 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java @@ -56,6 +56,7 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse; +import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.T2; @@ -1292,6 +1293,12 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac cache.put(1, 1); +GridTestUtils.waitForCondition(new GridAbsPredicate() { +@Override public boolean apply() { +return cache.get(1) != null; +} +}, 5000); + assertEquals(1, cache.get(1)); }
[07/11] ignite git commit: IGNITE-1990 Added missing classed to classnames-jdk.properties.
IGNITE-1990 Added missing classed to classnames-jdk.properties. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3c42da8b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3c42da8b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3c42da8b Branch: refs/heads/ignite-1956 Commit: 3c42da8b08973fab850a5ebc48b71915ce02f992 Parents: 97270bf Author: AKuznetsovAuthored: Thu Nov 26 07:21:18 2015 +0700 Committer: AKuznetsov Committed: Thu Nov 26 07:21:18 2015 +0700 -- .../visor/cache/VisorCacheConfiguration.java| 4 +- .../cache/VisorCacheTypeFieldMetadata.java | 30 - .../visor/cache/VisorCacheTypeMetadata.java | 133 +-- .../META-INF/classnames-jdk.properties | 2 + 4 files changed, 152 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3c42da8b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index 073ad22..69eb311 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -138,7 +138,7 @@ public class VisorCacheConfiguration implements Serializable { maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations(); memoryMode = ccfg.getMemoryMode(); interceptor = compactClass(ccfg.getInterceptor()); -typeMeta = VisorCacheTypeMetadata.list(ccfg.getTypeMetadata()); +typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory(), ccfg.getTypeMetadata()); statisticsEnabled = ccfg.isStatisticsEnabled(); mgmtEnabled = ccfg.isManagementEnabled(); ldrFactory = compactClass(ccfg.getCacheLoaderFactory()); @@ -350,4 +350,4 @@ public class VisorCacheConfiguration implements Serializable { @Override public String toString() { return S.toString(VisorCacheConfiguration.class, this); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/3c42da8b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java index c21354b..323e536 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java @@ -45,14 +45,30 @@ public class VisorCacheTypeFieldMetadata implements Serializable { * @return Data transfer object for given cache field metadata. */ public static VisorCacheTypeFieldMetadata from(CacheTypeFieldMetadata f) { -VisorCacheTypeFieldMetadata fieldMetadata = new VisorCacheTypeFieldMetadata(); +return new VisorCacheTypeFieldMetadata(f.getDatabaseName(), f.getDatabaseType(), +f.getJavaName(), U.compact(f.getJavaType().getName())); +} -fieldMetadata.dbName = f.getDatabaseName(); -fieldMetadata.dbType = f.getDatabaseType(); -fieldMetadata.javaName = f.getJavaName(); -fieldMetadata.javaType = U.compact(f.getJavaType().getName()); +/** + * Empty constructor. + */ +public VisorCacheTypeFieldMetadata() { +// No-op. +} -return fieldMetadata; +/** + * Full constructor. + * + * @param dbName Column name in database. + * @param dbType Column JDBC type in database. + * @param javaName Field name in java object. + * @param javaType Corresponding java type. + */ +public VisorCacheTypeFieldMetadata(String dbName, int dbType, String javaName, String javaType) { +this.dbName = dbName; +this.dbType = dbType; +this.javaName = javaName; +this.javaType = javaType; } /** @@ -82,4 +98,4 @@ public class VisorCacheTypeFieldMetadata implements Serializable { public String javaType() { return javaType; } -} \ No newline at end of file +}
[11/11] ignite git commit: Merge branch 'ignite-1.5' into ignite-1956
Merge branch 'ignite-1.5' into ignite-1956 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8dfd7f9b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8dfd7f9b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8dfd7f9b Branch: refs/heads/ignite-1956 Commit: 8dfd7f9b8e003eeaa21af44fc35b0bcceb86401f Parents: d44f68d 041cd38 Author: vozerov-gridgainAuthored: Thu Nov 26 10:46:40 2015 +0300 Committer: vozerov-gridgain Committed: Thu Nov 26 10:46:40 2015 +0300 -- .../client/router/RouterFactorySelfTest.java| 2 + .../java/org/apache/ignite/IgniteCache.java | 23 ++ .../configuration/CacheConfiguration.java | 30 +++ .../processors/cache/GridCacheAdapter.java | 156 - .../processors/cache/GridCacheProxyImpl.java| 61 + .../processors/cache/IgniteCacheProxy.java | 42 .../processors/cache/IgniteInternalCache.java | 47 +++- .../distributed/dht/GridDhtCacheAdapter.java| 7 +- .../distributed/near/GridNearCacheAdapter.java | 10 + .../cache/query/GridCacheSqlQuery.java | 42 .../cache/query/GridCacheTwoStepQuery.java | 35 ++- .../processors/query/GridQueryProcessor.java| 40 +--- .../processors/query/GridQueryProperty.java | 45 .../query/GridQueryTypeDescriptor.java | 6 + .../visor/cache/VisorCacheConfiguration.java| 4 +- .../cache/VisorCacheTypeFieldMetadata.java | 30 ++- .../visor/cache/VisorCacheTypeMetadata.java | 133 ++- .../ignite/resources/MBeanServerResource.java | 69 -- .../META-INF/classnames-jdk.properties | 2 + .../IgniteClientReconnectCacheTest.java | 7 + .../CacheDeferredDeleteSanitySelfTest.java | 98 .../cache/CacheStopAndDestroySelfTest.java | 8 +- ...eAbstractDataStructuresFailoverSelfTest.java | 3 + .../IgniteCollectionAbstractTest.java | 3 + .../multijvm/IgniteCacheProcessProxy.java | 38 .../ignite/testsuites/IgniteCacheTestSuite.java | 2 + .../query/h2/GridH2ResultSetIterator.java | 19 +- .../processors/query/h2/IgniteH2Indexing.java | 227 --- .../query/h2/opt/GridH2RowDescriptor.java | 5 + .../processors/query/h2/opt/GridH2Table.java| 69 +- .../query/h2/opt/GridH2TreeIndex.java | 98 +--- .../query/h2/sql/GridSqlQuerySplitter.java | 73 -- .../processors/query/h2/sql/GridSqlSelect.java | 27 +++ .../query/h2/twostep/GridMapQueryExecutor.java | 17 +- .../query/h2/twostep/GridMergeIndex.java| 7 + .../h2/twostep/GridMergeIndexUnsorted.java | 14 ++ .../h2/twostep/GridReduceQueryExecutor.java | 117 +++--- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++--- ...niteCacheP2pUnmarshallingQueryErrorTest.java | 7 +- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 +++ .../h2/GridIndexingSpiAbstractSelfTest.java | 19 ++ .../IgniteCacheQuerySelfTestSuite.java | 2 + .../Services/ServicesExample.cs | 4 + .../ignite-int-max-values-offheap-config.xml| 89 .../ignite-int-max-values-onheap-config.xml | 84 +++ .../ignite-int-max-values-swap-config.xml | 93 .../test-max-int-values-offheap.properties | 70 ++ .../test-max-int-values-onheap.properties | 70 ++ .../config/test-max-int-values-swap.properties | 69 ++ .../yardstick/cache/IntMaxValueEntriesTest.java | 135 +++ 50 files changed, 2046 insertions(+), 309 deletions(-) --
[01/11] ignite git commit: IGNITE-1999: Improved .NET ServicesExample a bit.
Repository: ignite Updated Branches: refs/heads/ignite-1956 d44f68dd8 -> 8dfd7f9b8 IGNITE-1999: Improved .NET ServicesExample a bit. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f9690df8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f9690df8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f9690df8 Branch: refs/heads/ignite-1956 Commit: f9690df8e6a87b5e537a2e75f5affc61deda468d Parents: ef2007d Author: vozerov-gridgainAuthored: Wed Nov 25 17:44:15 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 17:44:15 2015 +0300 -- .../examples/Apache.Ignite.Examples/Services/ServicesExample.cs | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f9690df8/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs -- diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs index 121a5c4..77eb253 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs @@ -72,6 +72,10 @@ namespace Apache.Ignite.Examples.Services ignite.GetServices().CancelAll(); } + +Console.WriteLine(); +Console.WriteLine(">>> Example finished, press any key to exit ..."); +Console.ReadKey(); } } }
[05/50] [abbrv] ignite git commit: Merge branches 'ignite-1.5' and 'ignite-1.5-tx-futs-opts' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts
Merge branches 'ignite-1.5' and 'ignite-1.5-tx-futs-opts' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1c8ff109 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1c8ff109 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1c8ff109 Branch: refs/heads/ignite-1537 Commit: 1c8ff109555cdd639ac0c8742093c8faf683b835 Parents: d92de42 457ca6f Author: Yakov ZhdanovAuthored: Sat Nov 21 17:51:07 2015 +0300 Committer: Yakov Zhdanov Committed: Sat Nov 21 17:51:07 2015 +0300 -- .../internal/direct/DirectByteBufferStream.java | 1499 - .../internal/direct/DirectMessageReader.java| 144 +- .../internal/direct/DirectMessageWriter.java| 65 +- .../direct/DirectMessageWriterState.java| 123 -- .../direct/state/DirectMessageState.java| 98 ++ .../direct/state/DirectMessageStateItem.java| 28 + .../direct/stream/DirectByteBufferStream.java | 316 .../stream/v1/DirectByteBufferStreamImplV1.java | 1360 +++ .../stream/v2/DirectByteBufferStreamImplV2.java | 1583 ++ .../managers/communication/GridIoManager.java | 64 +- .../processors/cache/GridCacheUtils.java| 39 +- .../CacheDataStructuresManager.java |2 +- .../GridFutureRemapTimeoutObject.java | 72 - .../dht/GridPartitionedGetFuture.java | 28 +- .../distributed/near/GridNearGetFuture.java | 28 +- .../IgniteTxImplicitSingleStateImpl.java| 29 +- .../IgniteTxRemoteSingleStateImpl.java | 19 +- .../datastructures/DataStructuresProcessor.java | 47 +- .../GridAtomicCacheQueueImpl.java | 126 +- .../GridCacheAtomicReferenceImpl.java | 10 +- .../GridCacheCountDownLatchImpl.java| 15 +- .../datastructures/GridCacheQueueAdapter.java | 32 +- .../GridTransactionalCacheQueueImpl.java| 193 +-- .../ignite/internal/util/IgniteUtils.java | 31 + .../internal/util/ipc/IpcToNioAdapter.java | 14 +- .../util/nio/GridCommunicationClient.java |4 +- .../internal/util/nio/GridDirectParser.java | 37 +- .../util/nio/GridNioMessageReaderFactory.java | 37 + .../util/nio/GridNioMessageWriterFactory.java | 35 + .../ignite/internal/util/nio/GridNioServer.java | 47 +- .../util/nio/GridShmemCommunicationClient.java | 12 +- .../communication/MessageFormatter.java | 15 +- .../extensions/communication/MessageReader.java | 26 +- .../org/apache/ignite/spi/IgniteSpiAdapter.java |6 +- .../communication/tcp/TcpCommunicationSpi.java | 80 +- .../ignite/spi/discovery/DiscoverySpi.java |2 +- .../ignite/spi/discovery/tcp/ServerImpl.java| 36 + .../apache/ignite/stream/StreamTransformer.java |9 +- ...eAbstractDataStructuresFailoverSelfTest.java | 924 +- ...rtitionedDataStructuresFailoverSelfTest.java |7 +- ...edOffheapDataStructuresFailoverSelfTest.java | 12 +- ...eplicatedDataStructuresFailoverSelfTest.java |5 - ...gniteAtomicLongChangingTopologySelfTest.java |2 + ...GridTcpCommunicationSpiRecoverySelfTest.java |4 +- ...lientDiscoverySpiFailureTimeoutSelfTest.java |4 +- .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 90 +- .../testframework/GridSpiTestContext.java | 12 +- .../testframework/junits/GridAbstractTest.java |6 +- .../spring/IgniteTransactionHolder.java | 97 ++ .../spring/SpringTransactionManager.java| 522 ++ .../transactions/spring/package-info.java | 22 + .../test/java/config/spring-transactions.xml| 36 + .../testsuites/IgniteSpringTestSuite.java |5 +- .../GridSpringTransactionManagerSelfTest.java | 165 ++ .../spring/GridSpringTransactionService.java| 68 + parent/pom.xml |4 +- 56 files changed, 5585 insertions(+), 2711 deletions(-) --
[42/50] [abbrv] ignite git commit: Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5
Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b9e4e036 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b9e4e036 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b9e4e036 Branch: refs/heads/ignite-1537 Commit: b9e4e0367dd38c5d4053e15e1d7307621f52bcfc Parents: 8a9cc54 f9690df Author: Denis MagdaAuthored: Wed Nov 25 18:23:54 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:23:54 2015 +0300 -- examples/pom.xml| 2 +- .../org/apache/ignite/internal/IgnitionEx.java | 9 +++-- .../internal/portable/BinaryReaderExImpl.java | 18 +++-- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../platform/PlatformContextImpl.java | 2 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- .../Services/ServicesExample.cs | 4 ++ modules/scalar/pom.xml | 4 +- modules/spark/pom.xml | 4 +- modules/visor-console/pom.xml | 2 +- parent/pom.xml | 2 +- 12 files changed, 93 insertions(+), 22 deletions(-) --
[26/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/80503465 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/80503465 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/80503465 Branch: refs/heads/ignite-1537 Commit: 805034658e20a5666abade26be1989723d171986 Parents: c6b2fa5 2ae1709 Author: vozerov-gridgainAuthored: Mon Nov 23 16:31:45 2015 +0300 Committer: vozerov-gridgain Committed: Mon Nov 23 16:31:45 2015 +0300 -- examples/schema-import/bin/db-init.sql | 3 +- .../org/apache/ignite/schema/CacheConfig.java | 7 +- .../java/org/apache/ignite/schema/Demo.java | 20 +- .../org/apache/ignite/cache/QueryIndex.java | 53 +- .../store/jdbc/CacheAbstractJdbcStore.java | 638 --- .../store/jdbc/CacheJdbcBlobStoreFactory.java | 14 +- .../cache/store/jdbc/CacheJdbcPojoStore.java| 444 + .../store/jdbc/CacheJdbcPojoStoreFactory.java | 277 +++- .../ignite/cache/store/jdbc/JdbcType.java | 255 .../cache/store/jdbc/JdbcTypeDefaultHasher.java | 43 ++ .../ignite/cache/store/jdbc/JdbcTypeField.java | 172 + .../ignite/cache/store/jdbc/JdbcTypeHasher.java | 34 + .../processors/cache/GridCacheMapEntry.java | 3 +- .../processors/query/GridQueryProcessor.java| 6 +- .../ignite/internal/visor/cache/VisorCache.java | 4 +- .../CacheJdbcPojoStoreAbstractSelfTest.java | 395 ...dbcPojoStoreOptimizedMarshallerSelfTest.java | 31 + ...JdbcPojoStorePortableMarshallerSelfTest.java | 85 +++ .../store/jdbc/CacheJdbcPojoStoreTest.java | 200 +++--- ...eJdbcStoreAbstractMultithreadedSelfTest.java | 2 +- ...chePartitionedAtomicSetFailoverSelfTest.java | 5 + .../ignite/testsuites/IgniteCacheTestSuite.java | 6 +- modules/schema-import/README.txt| 176 ++--- .../ignite/schema/generator/CodeGenerator.java | 198 +++--- .../ignite/schema/generator/XmlGenerator.java | 101 +-- .../apache/ignite/schema/model/IndexItem.java | 54 -- .../ignite/schema/model/PojoDescriptor.java | 72 +-- .../ignite/schema/model/SchemaDescriptor.java | 6 +- .../schema/parser/DatabaseMetadataParser.java | 12 +- .../apache/ignite/schema/parser/DbTable.java| 37 +- .../parser/dialect/DatabaseMetadataDialect.java | 32 +- .../parser/dialect/JdbcMetadataDialect.java | 22 +- .../parser/dialect/OracleMetadataDialect.java | 24 +- .../apache/ignite/schema/ui/ModalDialog.java| 6 +- .../ignite/schema/ui/SchemaImportApp.java | 13 +- .../schema/test/AbstractSchemaImportTest.java | 4 +- .../schema/test/model/ignite-type-metadata.xml | 610 +- .../yardstick/config/ignite-store-config.xml| 50 +- .../IgniteAtomicInvokeRetryBenchmark.java | 2 +- .../failover/IgniteConsistencyException.java| 64 ++ ...IgniteTransactionalInvokeRetryBenchmark.java | 2 +- ...IgniteTransactionalWriteInvokeBenchmark.java | 135 +++- .../IgniteTransactionalWriteReadBenchmark.java | 2 +- 43 files changed, 3022 insertions(+), 1297 deletions(-) --
[22/50] [abbrv] ignite git commit: ignite-yardstick: added debug info into IgniteTransactionalWriteInvokeBenchmark
ignite-yardstick: added debug info into IgniteTransactionalWriteInvokeBenchmark Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fa7a4bce Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fa7a4bce Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fa7a4bce Branch: refs/heads/ignite-1537 Commit: fa7a4bce65421da4f86c72e78850d987278f8e8f Parents: d71f612 Author: ashutakAuthored: Mon Nov 23 16:26:29 2015 +0300 Committer: ashutak Committed: Mon Nov 23 16:26:29 2015 +0300 -- .../IgniteAtomicInvokeRetryBenchmark.java | 2 +- .../failover/IgniteConsistencyException.java| 64 + ...IgniteTransactionalInvokeRetryBenchmark.java | 2 +- ...IgniteTransactionalWriteInvokeBenchmark.java | 135 ++- .../IgniteTransactionalWriteReadBenchmark.java | 2 +- 5 files changed, 171 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java -- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java index c0567ef..6e65746 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java @@ -110,7 +110,7 @@ public class IgniteAtomicInvokeRetryBenchmark extends IgniteFailoverAbstractBenc } -throw new IllegalStateException("Cache and local map are in inconsistent state " + +throw new IgniteConsistencyException("Cache and local map are in inconsistent state " + "[badKeys=" + badCacheEntries.keySet() + ']'); } http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java -- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java new file mode 100644 index 000..e1fcbfa --- /dev/null +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java @@ -0,0 +1,64 @@ +/* + * 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.yardstick.cache.failover; + +import org.jetbrains.annotations.Nullable; + +/** + * Ignite consistency exception. + */ +public class IgniteConsistencyException extends RuntimeException { +/** */ +private static final long serialVersionUID = 0; + +/** + * Create empty exception. + */ +public IgniteConsistencyException() { +// No-op. +} + +/** + * Creates new exception with given error message. + * + * @param msg Error message. + */ +public IgniteConsistencyException(String msg) { +super(msg); +} + +/** + * Creates new grid exception with given throwable as a cause and + * source of error message. + * + * @param cause Non-null throwable cause. + */ +public IgniteConsistencyException(Throwable cause) { +this(cause.getMessage(), cause); +} + +/** + * Creates new exception with given error message and optional nested exception. + * + * @param msg Error message. + * @param cause Optional nested exception (can be {@code null}). + */ +public
[44/50] [abbrv] ignite git commit: ignite-1800: Annotation MBeanServerResource should be deleted as unsupported. This closes #260
ignite-1800: Annotation MBeanServerResource should be deleted as unsupported. This closes #260 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b83f75ed Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b83f75ed Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b83f75ed Branch: refs/heads/ignite-1537 Commit: b83f75edaa7145be443429d9cce54c86fe85730a Parents: e02edcd Author: Roman ShtykhAuthored: Wed Nov 25 18:41:03 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:41:03 2015 +0300 -- .../ignite/resources/MBeanServerResource.java | 69 1 file changed, 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b83f75ed/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java deleted file mode 100644 index 17b9aa7..000 --- a/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import javax.management.MBeanServer; - -/** - * Annotates a field or a setter method for injection of {@link MBeanServer} resource. MBean server - * is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}. - * - * MBean server can be injected into instances of following classes: - * - * {@link org.apache.ignite.compute.ComputeTask} - * {@link org.apache.ignite.compute.ComputeJob} - * {@link org.apache.ignite.spi.IgniteSpi} - * {@link org.apache.ignite.lifecycle.LifecycleBean} - * - * - * Here is how injection would typically happen: - * - * public class MyGridJob implements ComputeJob { - * ... - * IgniteMBeanServerResource - * private MBeanServer mbeanSrv; - * ... - * } - * - * or - * - * public class MyGridJob implements ComputeJob { - * ... - * private MBeanSever mbeanSrv; - * ... - * IgniteMBeanServerResource - * public void setMBeanServer(MBeanServer mbeanSrv) { - * this.mbeanSrv = mbeanSrv; - * } - * ... - * } - * - * - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getMBeanServer()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface MBeanServerResource { -// No-op. -} \ No newline at end of file
[21/50] [abbrv] ignite git commit: Muted GridCachePartitionedAtomicSetFailoverSelfTest.testNodeRestart
Muted GridCachePartitionedAtomicSetFailoverSelfTest.testNodeRestart Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/59fc24f4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/59fc24f4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/59fc24f4 Branch: refs/heads/ignite-1537 Commit: 59fc24f40b61efd00542a89b47ca3155b6793943 Parents: d71f612 Author: nikolay tikhonovAuthored: Mon Nov 23 16:04:54 2015 +0300 Committer: Tikhonov Nikolay Committed: Mon Nov 23 16:04:54 2015 +0300 -- .../ignite/internal/processors/cache/GridCacheMapEntry.java | 3 ++- .../GridCachePartitionedAtomicSetFailoverSelfTest.java | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/59fc24f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java index 2b40351..ac42121 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java @@ -3296,7 +3296,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme if (!cctx.isLocal() && !isNear()) { GridDhtLocalPartition locPart = cctx.topology().localPartition(partition(), topVer, false); -assert locPart != null; +if (locPart == null) +return 0; updateCntr = locPart.nextUpdateCounter(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/59fc24f4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java index d542af9..8ff95c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java @@ -37,4 +37,9 @@ public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetF @Override protected CacheAtomicityMode collectionCacheAtomicityMode() { return ATOMIC; } + +/** {@inheritDoc} */ +@Override public void testNodeRestart() throws Exception { +fail("https://issues.apache.org/jira/browse/IGNITE-170;); +} } \ No newline at end of file
[33/50] [abbrv] ignite git commit: IGNITE-1986: C++ examples VS project file fixed.
IGNITE-1986: C++ examples VS project file fixed. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ca0de93a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ca0de93a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ca0de93a Branch: refs/heads/ignite-1537 Commit: ca0de93a9ec38615321cc16e01cdcf9f0698aaf0 Parents: 1136933 Author: isapegoAuthored: Tue Nov 24 12:24:41 2015 +0300 Committer: vozerov-gridgain Committed: Tue Nov 24 12:24:41 2015 +0300 -- .../platforms/cpp/examples/project/vs/ignite-examples.vcxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ca0de93a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj -- diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj index 286a4ea..b04bfb9 100644 --- a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj +++ b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj @@ -1,5 +1,5 @@  -http://schemas.microsoft.com/developer/msbuild/2003;> +http://schemas.microsoft.com/developer/msbuild/2003;> Release @@ -19,14 +19,14 @@ Application false -v120 +v100 true Unicode Application false -v120 +v100 true Unicode
[15/50] [abbrv] ignite git commit: IGNITE-1968 .Net: Resolved failure in .NET services caused by recent changes to Java binary reader impl.
IGNITE-1968 .Net: Resolved failure in .NET services caused by recent changes to Java binary reader impl. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/171bbeef Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/171bbeef Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/171bbeef Branch: refs/heads/ignite-1537 Commit: 171bbeefc6f695111607b16bd7be783d1421e8a0 Parents: 96ae696 Author: Pavel TupitsynAuthored: Mon Nov 23 11:49:35 2015 +0300 Committer: vozerov-gridgain Committed: Mon Nov 23 11:49:35 2015 +0300 -- .../processors/platform/services/PlatformAbstractService.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/171bbeef/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java index 18ab012..df71a24 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java @@ -195,12 +195,12 @@ public abstract class PlatformAbstractService implements PlatformService, Extern try (PlatformMemory inMem = platformCtx.memory().allocate()) { PlatformInputStream in = inMem.input(); -BinaryRawReaderEx reader = platformCtx.reader(in); - platformCtx.gateway().serviceInvokeMethod(ptr, outMem.pointer(), inMem.pointer()); in.synchronize(); +BinaryRawReaderEx reader = platformCtx.reader(in); + return PlatformUtils.readInvocationResult(platformCtx, reader); } }
[31/50] [abbrv] ignite git commit: IGNITE-1983: .NET: Fixed continuous query tests.
IGNITE-1983: .NET: Fixed continuous query tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/512fe6b0 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/512fe6b0 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/512fe6b0 Branch: refs/heads/ignite-1537 Commit: 512fe6b076331a3d187e1e0277f6bd565d8350bf Parents: dcbfbd2 Author: vozerov-gridgainAuthored: Tue Nov 24 11:52:06 2015 +0300 Committer: vozerov-gridgain Committed: Tue Nov 24 11:52:06 2015 +0300 -- .../Continuous/ContinuousQueryAbstractTest.cs | 29 1 file changed, 18 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/512fe6b0/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs index 720483a..bdca918 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs @@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous // Put from local node. int key1 = PrimaryKey(cache1); cache1.GetAndPut(key1, Entry(key1)); -CheckFilterSingle(key1, null, Entry(key1), !loc); +CheckFilterSingle(key1, null, Entry(key1)); CheckCallbackSingle(key1, null, Entry(key1)); // Put from remote node. @@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous } else { -CheckFilterSingle(key2, null, Entry(key2), true); +CheckFilterSingle(key2, null, Entry(key2)); CheckCallbackSingle(key2, null, Entry(key2)); } @@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous // Ignored put from local node. cache1.GetAndPut(key1, Entry(key1 + 1)); -CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc); +CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1)); CheckNoCallback(100); // Ignored put from remote node. @@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous if (loc) CheckNoFilter(100); else -CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true); +CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1)); CheckNoCallback(100); } @@ -621,6 +621,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous .Deserialize()); // 2. Remote put. +ClearEvents(); cache1.GetAndPut(PrimaryKey(cache2), Entry(2)); Assert.IsTrue(FILTER_EVTS.TryTake(out filterEvt, 500)); @@ -868,15 +869,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous /// Expected key. /// Expected old value. /// Expected value. -/// Whether there is a backup node to check.. -private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, -bool hasBackup = false) +private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal) { CheckFilterSingle(expKey, expOldVal, expVal, 1000); - -// Filter is called on each cache node (primary and backup) -if (hasBackup) -CheckFilterSingle(expKey, expOldVal, expVal, 1000); +ClearEvents(); } /// @@ -895,6 +891,17 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous Assert.AreEqual(expKey, evt.entry.Key); Assert.AreEqual(expOldVal, evt.entry.OldValue); Assert.AreEqual(expVal, evt.entry.Value); + +ClearEvents(); +} + +/// +/// Clears the events collection. +/// +private static void ClearEvents() +{ +while (FILTER_EVTS.Count > 0) +FILTER_EVTS.Take(); } ///
[19/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java index d78ea48..aa013b9 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java @@ -21,226 +21,392 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.cache.CacheException; import javax.cache.integration.CacheLoaderException; -import org.apache.ignite.cache.CacheTypeFieldMetadata; -import org.apache.ignite.cache.CacheTypeMetadata; +import org.apache.ignite.binary.BinaryObject; +import org.apache.ignite.binary.BinaryObjectBuilder; import org.apache.ignite.cache.store.CacheStore; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; /** * Implementation of {@link CacheStore} backed by JDBC and POJO via reflection. * - * This implementation stores objects in underlying database using java beans mapping description via reflection. - * + * This implementation stores objects in underlying database using java beans mapping description via reflection. * Use {@link CacheJdbcPojoStoreFactory} factory to pass {@link CacheJdbcPojoStore} to {@link CacheConfiguration}. */ public class CacheJdbcPojoStoreextends CacheAbstractJdbcStore { +/** POJO methods cache. */ +private volatile Map > pojosMthds = Collections.emptyMap(); + /** - * POJO methods cache. + * Get field value from object for use as query parameter. + * + * @param cacheName Cache name. + * @param typeName Type name. + * @param fldName Field name. + * @param obj Cache object. + * @return Field value from object. + * @throws CacheException in case of error. */ -protected static class PojoMethodsCache { -/** POJO class. */ -protected final Class cls; - -/** Constructor for POJO object. */ -private Constructor ctor; - -/** {@code true} if object is a simple type. */ -private final boolean simple; - -/** Cached setters for POJO object. */ -private Map getters; - -/** Cached getters for POJO object. */ -private Map setters; - -/** - * POJO methods cache. - * - * @param clsName Class name. - * @param fields Fields. - * - * @throws CacheException If failed to construct type cache. - */ -public PojoMethodsCache(String clsName, Collection fields) throws CacheException { -try { -cls = Class.forName(clsName); - -if (simple = simpleType(cls)) -return; +@Override @Nullable protected Object extractParameter(@Nullable String cacheName, String typeName, TypeKind typeKind, +String fldName, Object obj) throws CacheException { +switch (typeKind) { +case BUILT_IN: +return obj; +case POJO: +return extractPojoParameter(cacheName, typeName, fldName, obj); +default: +return extractBinaryParameter(fldName, obj); +} +} -ctor = cls.getDeclaredConstructor(); +/** + * Get field value from POJO for use as query parameter. + * + * @param cacheName Cache name. + * @param typeName Type name. + * @param fldName Field name. + * @param obj Cache object. + * @return Field value from object. + * @throws CacheException in case of error. + */ +@Nullable private Object extractPojoParameter(@Nullable String cacheName, String typeName, String fldName, +Object obj) throws CacheException { +try { +Map cacheMethods = pojosMthds.get(cacheName); -if (!ctor.isAccessible()) -ctor.setAccessible(true); -} -catch (ClassNotFoundException e) { -throw new CacheException("Failed to find class: " + clsName, e); -} -catch (NoSuchMethodException e) { -throw new CacheException("Failed to find default constructor for class: " + clsName, e); -} +if
[40/50] [abbrv] ignite git commit: IGNITE-1999: Improved .NET ServicesExample a bit.
IGNITE-1999: Improved .NET ServicesExample a bit. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f9690df8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f9690df8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f9690df8 Branch: refs/heads/ignite-1537 Commit: f9690df8e6a87b5e537a2e75f5affc61deda468d Parents: ef2007d Author: vozerov-gridgainAuthored: Wed Nov 25 17:44:15 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 17:44:15 2015 +0300 -- .../examples/Apache.Ignite.Examples/Services/ServicesExample.cs | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f9690df8/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs -- diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs index 121a5c4..77eb253 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs @@ -72,6 +72,10 @@ namespace Apache.Ignite.Examples.Services ignite.GetServices().CancelAll(); } + +Console.WriteLine(); +Console.WriteLine(">>> Example finished, press any key to exit ..."); +Console.ReadKey(); } } }
[47/50] [abbrv] ignite git commit: Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default
Queries optimizations: - cache prepared statements and two-step queries - skip reduce query if possible - do not use index snapshots by default Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4af461a7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4af461a7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4af461a7 Branch: refs/heads/ignite-1537 Commit: 4af461a7f403fc0e4df13d23d0789eee49200b26 Parents: 3c42da8 Author: sboikovAuthored: Thu Nov 26 09:30:10 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:30:10 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 +++ .../cache/query/GridCacheSqlQuery.java | 42 .../cache/query/GridCacheTwoStepQuery.java | 35 ++- .../processors/query/GridQueryProcessor.java| 40 +--- .../processors/query/GridQueryProperty.java | 45 .../query/GridQueryTypeDescriptor.java | 6 + .../query/h2/GridH2ResultSetIterator.java | 19 +- .../processors/query/h2/IgniteH2Indexing.java | 227 --- .../query/h2/opt/GridH2RowDescriptor.java | 5 + .../processors/query/h2/opt/GridH2Table.java| 69 +- .../query/h2/opt/GridH2TreeIndex.java | 98 +--- .../query/h2/sql/GridSqlQuerySplitter.java | 73 -- .../processors/query/h2/sql/GridSqlSelect.java | 27 +++ .../query/h2/twostep/GridMapQueryExecutor.java | 17 +- .../query/h2/twostep/GridMergeIndex.java| 7 + .../h2/twostep/GridMergeIndexUnsorted.java | 14 ++ .../h2/twostep/GridReduceQueryExecutor.java | 117 +++--- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++--- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 +++ .../h2/GridIndexingSpiAbstractSelfTest.java | 19 ++ .../IgniteCacheQuerySelfTestSuite.java | 2 + 21 files changed, 776 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index e87346f..e2bf912 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -373,6 +373,9 @@ public class CacheConfiguration extends MutableConfiguration { /** */ private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE; +/** */ +private boolean snapshotableIdx; + /** Copy on read flag. */ private boolean cpOnRead = DFLT_COPY_ON_READ; @@ -463,6 +466,7 @@ public class CacheConfiguration extends MutableConfiguration { rebalancePoolSize = cc.getRebalanceThreadPoolSize(); rebalanceTimeout = cc.getRebalanceTimeout(); rebalanceThrottle = cc.getRebalanceThrottle(); +snapshotableIdx = cc.isSnapshotableIndex(); sqlEscapeAll = cc.isSqlEscapeAll(); sqlFuncCls = cc.getSqlFunctionClasses(); sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize(); @@ -1900,6 +1904,32 @@ public class CacheConfiguration extends MutableConfiguration { } /** + * Gets flag indicating whether SQL indexes should support snapshots. + * + * @return {@code True} if SQL indexes should support snapshots. + */ +public boolean isSnapshotableIndex() { +return snapshotableIdx; +} + +/** + * Sets flag indicating whether SQL indexes should support snapshots. + * + * Default value is {@code false}. + * + * Note that this flag is ignored if indexes are stored in offheap memory, + * for offheap indexes snapshots are always enabled. + * + * @param snapshotableIdx {@code True} if SQL indexes should support snapshots. + * @return {@code this} for chaining. + */ +public CacheConfiguration setSnapshotableIndex(boolean snapshotableIdx) { +this.snapshotableIdx = snapshotableIdx; + +return this; +} + +/** * Gets array of cache plugin configurations. * * @return Cache plugin configurations. http://git-wip-us.apache.org/repos/asf/ignite/blob/4af461a7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
[02/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1282
Merge branch ignite-1.5 into ignite-1282 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3d8c4c0f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3d8c4c0f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3d8c4c0f Branch: refs/heads/ignite-1537 Commit: 3d8c4c0f0cf7eda1544969dcc5663a9da0d6f9d2 Parents: ae5fb3e 457ca6f Author: Alexey GoncharukAuthored: Sat Nov 21 12:25:43 2015 +0300 Committer: Alexey Goncharuk Committed: Sat Nov 21 12:25:43 2015 +0300 -- .../datastructures/IgniteSemaphoreExample.java | 168 ++ .../ignite/examples/CacheExamplesSelfTest.java | 10 +- .../stream/camel/IgniteCamelStreamerTest.java | 16 +- .../camel/IgniteCamelStreamerTestSuite.java |1 - .../src/main/java/org/apache/ignite/Ignite.java | 17 + .../java/org/apache/ignite/IgniteSemaphore.java | 312 .../apache/ignite/events/DiscoveryEvent.java|6 +- .../apache/ignite/internal/IgniteKernal.java| 21 + .../internal/MarshallerContextAdapter.java |4 +- .../internal/direct/DirectByteBufferStream.java | 1499 - .../internal/direct/DirectMessageReader.java| 144 +- .../internal/direct/DirectMessageWriter.java| 65 +- .../direct/DirectMessageWriterState.java| 123 -- .../direct/state/DirectMessageState.java| 98 ++ .../direct/state/DirectMessageStateItem.java| 28 + .../direct/stream/DirectByteBufferStream.java | 316 .../stream/v1/DirectByteBufferStreamImplV1.java | 1360 +++ .../stream/v2/DirectByteBufferStreamImplV2.java | 1583 ++ .../managers/communication/GridIoManager.java | 64 +- .../GridCachePartitionExchangeManager.java | 34 +- .../processors/cache/GridCacheUtils.java| 39 +- .../CacheDataStructuresManager.java |2 +- .../GridFutureRemapTimeoutObject.java | 72 - .../dht/GridClientPartitionTopology.java| 38 +- .../distributed/dht/GridDhtLockFuture.java |1 - .../dht/GridDhtPartitionTopology.java | 12 +- .../dht/GridDhtPartitionTopologyImpl.java | 45 +- .../distributed/dht/GridDhtTxPrepareFuture.java |1 - .../dht/GridPartitionedGetFuture.java | 30 +- .../colocated/GridDhtColocatedLockFuture.java |1 - .../dht/preloader/GridDhtPartitionFullMap.java | 41 +- .../dht/preloader/GridDhtPartitionMap.java | 148 +- .../dht/preloader/GridDhtPartitionMap2.java | 306 .../GridDhtPartitionsExchangeFuture.java| 24 +- .../GridDhtPartitionsSingleMessage.java |6 +- .../distributed/near/GridNearCacheAdapter.java |1 - .../distributed/near/GridNearGetFuture.java | 30 +- .../distributed/near/GridNearLockFuture.java|2 - ...arOptimisticSerializableTxPrepareFuture.java |3 - .../near/GridNearOptimisticTxPrepareFuture.java |1 - .../near/GridNearTxFinishFuture.java|4 - .../distributed/near/GridNearTxRemote.java |1 - .../processors/cache/local/GridLocalCache.java |1 - .../cache/local/GridLocalLockFuture.java|2 - .../cache/transactions/IgniteInternalTx.java|1 - .../cache/transactions/IgniteTxAdapter.java |1 - .../IgniteTxImplicitSingleStateImpl.java| 29 +- .../cache/transactions/IgniteTxManager.java |1 - .../IgniteTxRemoteSingleStateImpl.java | 19 +- .../cache/transactions/IgniteTxStateImpl.java |1 - .../datastructures/DataStructuresProcessor.java | 240 ++- .../GridAtomicCacheQueueImpl.java | 126 +- .../GridCacheAtomicReferenceImpl.java | 10 +- .../GridCacheCountDownLatchImpl.java| 15 +- .../datastructures/GridCacheQueueAdapter.java | 32 +- .../datastructures/GridCacheSemaphoreEx.java| 47 + .../datastructures/GridCacheSemaphoreImpl.java | 763 + .../datastructures/GridCacheSemaphoreState.java | 144 ++ .../GridTransactionalCacheQueueImpl.java| 193 +-- .../ignite/internal/util/IgniteUtils.java | 31 + .../internal/util/ipc/IpcToNioAdapter.java | 14 +- .../util/nio/GridCommunicationClient.java |4 +- .../internal/util/nio/GridDirectParser.java | 37 +- .../util/nio/GridNioMessageReaderFactory.java | 37 + .../util/nio/GridNioMessageWriterFactory.java | 35 + .../ignite/internal/util/nio/GridNioServer.java | 47 +- .../util/nio/GridShmemCommunicationClient.java | 12 +- .../ignite/internal/visor/cache/VisorCache.java |6 +- .../communication/MessageFormatter.java | 15 +- .../extensions/communication/MessageReader.java | 26 +- .../org/apache/ignite/spi/IgniteSpiAdapter.java |6 +- .../communication/tcp/TcpCommunicationSpi.java | 80 +-
[48/50] [abbrv] ignite git commit: merge 1.5
http://git-wip-us.apache.org/repos/asf/ignite/blob/4154d3d0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4154d3d0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4154d3d0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java --
[38/50] [abbrv] ignite git commit: IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams.
IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c40ab677 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c40ab677 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c40ab677 Branch: refs/heads/ignite-1537 Commit: c40ab677e69f0d756281c62549cb2f63de907ed6 Parents: dafad52 Author: Pavel TupitsynAuthored: Wed Nov 25 10:14:26 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 10:14:26 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index 4809c3c..872d7a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -162,6 +162,20 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina */ public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, @Nullable BinaryReaderHandles hnds) { +this(ctx, in, ldr, hnds, false); +} + +/** + * Constructor. + * + * @param ctx Context. + * @param in Input stream. + * @param ldr Class loader. + * @param hnds Context. + * @param skipHdrCheck Whether to skip header check. + */ +public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, +@Nullable BinaryReaderHandles hnds, boolean skipHdrCheck) { // Initialize base members. this.ctx = ctx; this.in = in; @@ -170,10 +184,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina start = in.position(); -byte hdr = in.readByte(); - // Perform full header parsing in case of portable object. -if (hdr == GridPortableMarshaller.OBJ) { +if (!skipHdrCheck && (in.readByte() == GridPortableMarshaller.OBJ)) { // Ensure protocol is fine. PortableUtils.checkProtocolVersion(in.readByte()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index 9a7f0df..7db752a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -177,7 +177,7 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @Override public BinaryRawReaderEx reader(PlatformInputStream in) { // TODO: IGNITE-1272 - Is class loader needed here? -return new BinaryReaderExImpl(marsh.context(), in, null); +return new BinaryReaderExImpl(marsh.context(), in, null, null, true); } /** {@inheritDoc} */
[25/50] [abbrv] ignite git commit: IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3.
IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c6b2fa56 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c6b2fa56 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c6b2fa56 Branch: refs/heads/ignite-1537 Commit: c6b2fa56ff232d92a0f6770ef8b66b871be90905 Parents: 19d2dd0 Author: vozerov-gridgainAuthored: Mon Nov 23 16:31:18 2015 +0300 Committer: vozerov-gridgain Committed: Mon Nov 23 16:31:18 2015 +0300 -- .../internal/portable/BinaryObjectImpl.java | 32 +- .../portable/BinaryObjectOffheapImpl.java | 27 +- .../internal/portable/BinaryReaderExImpl.java | 1015 ++ .../portable/BinaryReaderHandlesHolder.java | 46 + .../portable/BinaryReaderHandlesHolderImpl.java | 44 + .../portable/GridPortableMarshaller.java| 23 +- .../portable/PortableClassDescriptor.java |8 +- .../ignite/internal/portable/PortableUtils.java | 861 ++- .../portable/builder/PortableBuilderReader.java | 21 +- .../platform/PlatformContextImpl.java |4 +- 10 files changed, 1099 insertions(+), 982 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java index 65272b0..7db4b4a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.portable; import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.binary.BinaryObject; +import org.apache.ignite.binary.BinaryObjectException; +import org.apache.ignite.binary.BinaryType; import org.apache.ignite.internal.GridDirectTransient; import org.apache.ignite.internal.IgniteCodeGeneratingFail; import org.apache.ignite.internal.portable.streams.PortableHeapInputStream; @@ -26,12 +29,8 @@ import org.apache.ignite.internal.processors.cache.CacheObjectContext; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignite.internal.processors.cache.portable.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.plugin.extensions.communication.MessageReader; import org.apache.ignite.plugin.extensions.communication.MessageWriter; -import org.apache.ignite.binary.BinaryObjectException; -import org.apache.ignite.binary.BinaryType; -import org.apache.ignite.binary.BinaryObject; import org.jetbrains.annotations.Nullable; import java.io.Externalizable; @@ -254,13 +253,13 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz /** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override public F field(String fieldName) throws BinaryObjectException { -return (F)newReader().unmarshalField(fieldName); +return (F) reader(null).unmarshalField(fieldName); } /** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override public F field(int fieldId) throws BinaryObjectException { -return (F)newReader().unmarshalField(fieldId); +return (F) reader(null).unmarshalField(fieldId); } /** {@inheritDoc} */ @@ -394,10 +393,7 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz break; default: -BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, fieldPos), -null, new BinaryReaderHandles()); - -val = reader.unmarshal(); +val = PortableUtils.unmarshal(PortableHeapInputStream.create(arr, fieldPos), ctx, null); break; } @@ -408,14 +404,12 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz /** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override protected F field(BinaryReaderHandles rCtx, String fieldName) { -BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, start), null, rCtx); - -return (F)reader.unmarshalField(fieldName); +return (F)reader(rCtx).unmarshalField(fieldName);
[08/50] [abbrv] ignite git commit: Fixed GridEventConsumeSelfTest.
Fixed GridEventConsumeSelfTest. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/15877a8b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/15877a8b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/15877a8b Branch: refs/heads/ignite-1537 Commit: 15877a8baf8ab32efb2e3f945d7a993205ab11ae Parents: 13e11b3 Author: Tikhonov NikolayAuthored: Sun Nov 22 13:43:59 2015 +0300 Committer: Tikhonov Nikolay Committed: Sun Nov 22 13:43:59 2015 +0300 -- .../processors/continuous/GridContinuousProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/15877a8b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java index c07cc13..e218790 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java @@ -210,7 +210,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter { if (msg.errs().isEmpty()) { LocalRoutineInfo routine = locInfos.get(msg.routineId()); -if (routine != null) { +if (routine != null && routine.handler().isForQuery()) { try { Map cntrs = msg.updateCounters(); @@ -889,7 +889,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter { } try { -if (ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) { +if (hnd.isForQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) { Map cntrs = ctx.cache().internalCache(hnd.cacheName()) .context().topology().updateCounters(); @@ -897,7 +897,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter { } } catch (Exception e) { -U.warn(log, "Failed to load partition counters."); +U.warn(log, "Failed to load partition counters.", e); } if (err != null)
[28/50] [abbrv] ignite git commit: ignite-1.5 Reworked code generation in order to avoid compiler error: "java: code too large".
ignite-1.5 Reworked code generation in order to avoid compiler error: "java: code too large". Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fe537533 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fe537533 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fe537533 Branch: refs/heads/ignite-1537 Commit: fe53753368b001ea2c3d568f77b7f2b03c937bb9 Parents: d71f612 Author: AKuznetsovAuthored: Mon Nov 23 22:06:37 2015 +0700 Committer: AKuznetsov Committed: Mon Nov 23 22:06:37 2015 +0700 -- .../ignite/schema/generator/CodeGenerator.java | 185 +-- 1 file changed, 91 insertions(+), 94 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/fe537533/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java -- diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java index 283ccc1..92167e5 100644 --- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java +++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java @@ -71,11 +71,11 @@ public class CodeGenerator { "void", "volatile", "while" )); -/** java.lang.* */ -private static final String JAVA_LANG_PKG = "java.lang."; +/** java.lang.* */ +private static final String JAVA_LANG_PKG = "java.lang."; -/** java.util.* */ -private static final String JAVA_UTIL_PKG = "java.util."; +/** java.util.* */ +private static final String JAVA_UTIL_PKG = "java.util."; /** Regexp to validate java identifier. */ private static final Pattern VALID_JAVA_IDENTIFIER = @@ -547,43 +547,15 @@ public class CodeGenerator { if (javaTypeName.startsWith(JAVA_LANG_PKG)) javaTypeName = javaTypeName.substring(JAVA_LANG_PKG.length()); -else if (javaTypeName.startsWith(JAVA_UTIL_PKG)) +else if (javaTypeName.startsWith(JAVA_UTIL_PKG)) javaTypeName = javaTypeName.substring(JAVA_UTIL_PKG.length()); add2(src, owner + ".add(new JdbcTypeField(Types." + field.dbTypeName() + ", \"" + field.dbName() + "\", " + -javaTypeName + ".class, \"" + field.javaName() + "\"));"); +javaTypeName + ".class, \"" + field.javaName() + "\"));"); } } /** - * Add query fields. - * - * @param src Source code lines. - * @param fields List of fields to add. - * @param comment Commentary text. - * @param first {@code true} if variable should be declared. - * @return {@code false} if variable was declared. - */ -private static boolean addQueryFields(Collection src, Collection fields, String comment, -boolean first) { -if (fields.isEmpty()) -return first; - -add2(src, comment); -add2(src, (first ? "LinkedHashMap " : "") + "fields = new LinkedHashMap<>();"); -add0(src, ""); - -for (PojoField field : fields) -add2(src, "fields.put(\"" + field.javaName() + "\", \"" + javaTypeName(field) + "\");"); - -add0(src, ""); -add2(src, "qryEntity.setFields(fields);"); -add0(src, ""); - -return false; -} - -/** * Generate java snippet for cache configuration with JDBC store and types metadata. * * @param pojos POJO descriptors. @@ -612,39 +584,23 @@ public class CodeGenerator { Collection src = new ArrayList<>(256); header(src, pkg, "java.sql.*;java.util.*;" + -"org.apache.ignite.cache.*;org.apache.ignite.cache.store.jdbc.*;" + -"org.apache.ignite.configuration.*;" + pkg + ".*", + "org.apache.ignite.cache.*;org.apache.ignite.cache.store.jdbc.*;" + +"org.apache.ignite.configuration.*", "CacheConfig", "CacheConfig"); -add1(src, "/**"); -add1(src, "* Configure cache."); -add1(src, "*"); -add1(src, "* @param cacheName Cache name."); -add1(src, "* @param storeFactory Cache store factory."); -add1(src, "*/"); -add1(src, "public static CacheConfiguration cache(String cacheName," + -" CacheJdbcPojoStoreFactory storeFactory) {"); -add2(src, "if (storeFactory == null)"); -add3(src, " throw new IllegalArgumentException(\"Cache store factory cannot be null.\");"); -add0(src, ""); -add2(src, "CacheConfiguration ccfg = new
[49/50] [abbrv] ignite git commit: merge 1.5
merge 1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4154d3d0 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4154d3d0 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4154d3d0 Branch: refs/heads/ignite-1537 Commit: 4154d3d0ddeae210fc94892537332810e9f6b3ce Parents: 2bd5878 4af461a Author: sboikovAuthored: Thu Nov 26 09:42:35 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:42:35 2015 +0300 -- .gitignore |6 + DEVNOTES.txt|2 +- assembly/release-fabric-base.xml| 94 + .../config/binary/example-ignite-binary.xml | 44 + examples/config/example-default.xml | 76 + examples/config/example-ignite.xml | 56 +- examples/pom.xml|2 +- examples/schema-import/bin/db-init.sql |3 +- .../org/apache/ignite/schema/CacheConfig.java |7 +- .../java/org/apache/ignite/schema/Demo.java | 20 +- .../apache/ignite/examples/binary/Address.java | 72 + .../apache/ignite/examples/binary/Employee.java | 93 + .../ignite/examples/binary/EmployeeKey.java | 90 + .../binary/ExampleBinaryNodeStartup.java| 36 + .../ignite/examples/binary/Organization.java| 93 + .../examples/binary/OrganizationType.java | 32 + ...ComputeClientBinaryTaskExecutionExample.java | 153 + .../binary/computegrid/ComputeClientTask.java | 116 + .../binary/computegrid/package-info.java| 21 + .../CacheClientBinaryPutGetExample.java | 230 ++ .../datagrid/CacheClientBinaryQueryExample.java | 330 ++ .../examples/binary/datagrid/package-info.java | 21 + .../ignite/examples/binary/package-info.java| 21 + .../datastructures/IgniteSemaphoreExample.java | 168 + .../CacheClientPortableExampleTest.java | 46 + .../ignite/examples/CacheExamplesSelfTest.java | 10 +- .../ComputeClientPortableExampleTest.java | 37 + .../testsuites/IgniteExamplesSelfTestSuite.java |6 + modules/camel/README.txt| 34 + modules/camel/licenses/apache-2.0.txt | 202 + modules/camel/pom.xml | 102 + .../ignite/stream/camel/CamelStreamer.java | 237 ++ .../stream/camel/IgniteCamelStreamerTest.java | 418 ++ .../camel/IgniteCamelStreamerTestSuite.java | 47 + .../src/test/resources/camel.test.properties| 18 + .../client/router/RouterFactorySelfTest.java|2 + .../ignite/codegen/MessageCodeGenerator.java|6 +- modules/core/pom.xml| 21 + ...processors.platform.PlatformBootstrapFactory |2 + .../src/main/java/org/apache/ignite/Ignite.java | 24 + .../java/org/apache/ignite/IgniteBinary.java| 353 ++ .../java/org/apache/ignite/IgniteCache.java | 68 +- .../java/org/apache/ignite/IgniteCompute.java |3 +- .../org/apache/ignite/IgniteDataStreamer.java | 16 + .../java/org/apache/ignite/IgniteSemaphore.java | 312 ++ .../org/apache/ignite/binary/BinaryField.java | 46 + .../apache/ignite/binary/BinaryIdMapper.java| 54 + .../binary/BinaryInvalidTypeException.java | 58 + .../org/apache/ignite/binary/BinaryObject.java | 149 + .../ignite/binary/BinaryObjectBuilder.java | 135 + .../ignite/binary/BinaryObjectException.java| 57 + .../apache/ignite/binary/BinaryRawReader.java | 240 ++ .../apache/ignite/binary/BinaryRawWriter.java | 225 ++ .../org/apache/ignite/binary/BinaryReader.java | 290 ++ .../apache/ignite/binary/BinarySerializer.java | 47 + .../org/apache/ignite/binary/BinaryType.java| 68 + .../ignite/binary/BinaryTypeConfiguration.java | 112 + .../org/apache/ignite/binary/BinaryWriter.java | 273 ++ .../org/apache/ignite/binary/Binarylizable.java | 48 + .../org/apache/ignite/binary/package-info.java | 22 + .../ignite/cache/CacheKeyConfiguration.java | 92 + .../apache/ignite/cache/CacheTypeMetadata.java | 67 +- .../org/apache/ignite/cache/QueryEntity.java| 217 ++ .../org/apache/ignite/cache/QueryIndex.java | 227 ++ .../org/apache/ignite/cache/QueryIndexType.java | 38 + .../eviction/random/RandomEvictionPolicy.java |4 + .../cache/store/CacheStoreSessionListener.java |9 +- .../store/jdbc/CacheAbstractJdbcStore.java | 672 ++-- .../store/jdbc/CacheJdbcBlobStoreFactory.java | 14 +- .../cache/store/jdbc/CacheJdbcPojoStore.java| 444 ++- .../store/jdbc/CacheJdbcPojoStoreFactory.java | 277 +- .../jdbc/CacheJdbcStoreSessionListener.java |8 +- .../ignite/cache/store/jdbc/JdbcType.java | 255 ++ .../cache/store/jdbc/JdbcTypeDefaultHasher.java | 43 + .../ignite/cache/store/jdbc/JdbcTypeField.java | 172 +
ignite git commit: Fixed test to do not fail with non-full-sync mode.
Repository: ignite Updated Branches: refs/heads/ignite-1.5 28d6e006c -> 041cd38d4 Fixed test to do not fail with non-full-sync mode. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/041cd38d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/041cd38d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/041cd38d Branch: refs/heads/ignite-1.5 Commit: 041cd38d46b458ea3ae945e15411d4519c1bf777 Parents: 28d6e00 Author: sboikovAuthored: Thu Nov 26 10:09:46 2015 +0300 Committer: sboikov Committed: Thu Nov 26 10:09:46 2015 +0300 -- .../ignite/internal/IgniteClientReconnectCacheTest.java | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/041cd38d/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java index 6cf10f4..3d8f601 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java @@ -56,6 +56,7 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse; +import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.T2; @@ -1292,6 +1293,12 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac cache.put(1, 1); +GridTestUtils.waitForCondition(new GridAbsPredicate() { +@Override public boolean apply() { +return cache.get(1) != null; +} +}, 5000); + assertEquals(1, cache.get(1)); }
[03/50] [abbrv] ignite git commit: Fixing tests.
Fixing tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/802d48b5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/802d48b5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/802d48b5 Branch: refs/heads/ignite-1537 Commit: 802d48b5e8d3664db6be36f32c5e4c39d8eee966 Parents: 3d8c4c0 Author: Alexey GoncharukAuthored: Sat Nov 21 15:01:20 2015 +0300 Committer: Alexey Goncharuk Committed: Sat Nov 21 15:01:20 2015 +0300 -- .../resources/META-INF/classnames.properties| 62 +++ .../CacheVersionedEntryAbstractTest.java| 2 +- .../continuous/GridEventConsumeSelfTest.java| 111 ++- 3 files changed, 101 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/802d48b5/modules/core/src/main/resources/META-INF/classnames.properties -- diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties index 96be534..8ac3278 100644 --- a/modules/core/src/main/resources/META-INF/classnames.properties +++ b/modules/core/src/main/resources/META-INF/classnames.properties @@ -259,6 +259,8 @@ org.apache.ignite.internal.cluster.IgniteKillTask org.apache.ignite.internal.cluster.IgniteKillTask$IgniteKillJob org.apache.ignite.internal.compute.ComputeTaskCancelledCheckedException org.apache.ignite.internal.compute.ComputeTaskTimeoutCheckedException +org.apache.ignite.internal.direct.DirectMessageReader$1 +org.apache.ignite.internal.direct.DirectMessageWriter$1 org.apache.ignite.internal.events.DiscoveryCustomEvent org.apache.ignite.internal.executor.GridExecutorService org.apache.ignite.internal.executor.GridExecutorService$1 @@ -297,9 +299,10 @@ org.apache.ignite.internal.portable.BinaryObjectEx org.apache.ignite.internal.portable.BinaryObjectImpl org.apache.ignite.internal.portable.BinaryObjectOffheapImpl org.apache.ignite.internal.portable.BinaryReaderExImpl$Flag -org.apache.ignite.internal.portable.PortableClassDescriptor$Mode +org.apache.ignite.internal.portable.BinaryWriteMode org.apache.ignite.internal.portable.PortableContext org.apache.ignite.internal.portable.PortableSchema +org.apache.ignite.internal.portable.PortableSchema$Confirmation org.apache.ignite.internal.portable.builder.PortableLazyMap$1$1$1 org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion org.apache.ignite.internal.processors.affinity.GridAffinityAssignment @@ -355,8 +358,7 @@ org.apache.ignite.internal.processors.cache.GridCacheAdapter$67 org.apache.ignite.internal.processors.cache.GridCacheAdapter$67$1 org.apache.ignite.internal.processors.cache.GridCacheAdapter$68 org.apache.ignite.internal.processors.cache.GridCacheAdapter$69 -org.apache.ignite.internal.processors.cache.GridCacheAdapter$7 -org.apache.ignite.internal.processors.cache.GridCacheAdapter$70 +org.apache.ignite.internal.processors.cache.GridCacheAdapter$8 org.apache.ignite.internal.processors.cache.GridCacheAdapter$9 org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture$1 org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture$1$1 @@ -526,6 +528,8 @@ org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishR org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest +org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest$1 +org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest$2 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest @@ -537,6 +541,7 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$2 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$3 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5 +org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$6 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$PartitionEntryIterator org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry$1
[39/50] [abbrv] ignite git commit: IGNITE-1989 Updated scala dependencies.
IGNITE-1989 Updated scala dependencies. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ef2007dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ef2007dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ef2007dc Branch: refs/heads/ignite-1537 Commit: ef2007dcba0405a2f8921ce2b324b9e7036143ad Parents: c40ab67 Author: Alexey KuznetsovAuthored: Wed Nov 25 16:29:22 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:29:22 2015 +0700 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/examples/pom.xml -- diff --git a/examples/pom.xml b/examples/pom.xml index 5129e7f..52b152e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -124,7 +124,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/scalar/pom.xml -- diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml index 1443cc1..c8dce64 100644 --- a/modules/scalar/pom.xml +++ b/modules/scalar/pom.xml @@ -44,7 +44,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -72,7 +72,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/spark/pom.xml -- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml index 942652c..93c3e41 100644 --- a/modules/spark/pom.xml +++ b/modules/spark/pom.xml @@ -52,7 +52,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -89,7 +89,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/visor-console/pom.xml -- diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml index b85cd69..e514a0f 100644 --- a/modules/visor-console/pom.xml +++ b/modules/visor-console/pom.xml @@ -80,7 +80,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 2d3ff5f..a7ae644 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -36,7 +36,7 @@ fabric 2.4.1 -1.5.1 +1.5.2 4.1.0.RELEASE UTF-8 d
[07/50] [abbrv] ignite git commit: Merge branch ignite-1282 into ignite-1.5
Merge branch ignite-1282 into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/13e11b32 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/13e11b32 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/13e11b32 Branch: refs/heads/ignite-1537 Commit: 13e11b32b0d4abc9a5ea9fffe6b2c56561a4f56c Parents: 5d224f1 df859c0 Author: Alexey GoncharukAuthored: Sun Nov 22 01:44:35 2015 +0300 Committer: Alexey Goncharuk Committed: Sun Nov 22 01:44:35 2015 +0300 -- .gitignore |6 + assembly/release-fabric-base.xml| 94 + .../config/binary/example-ignite-binary.xml | 44 + examples/config/example-default.xml | 76 + examples/config/example-ignite.xml | 56 +- .../apache/ignite/examples/binary/Address.java | 72 + .../apache/ignite/examples/binary/Employee.java | 93 + .../ignite/examples/binary/EmployeeKey.java | 90 + .../binary/ExampleBinaryNodeStartup.java| 36 + .../ignite/examples/binary/Organization.java| 93 + .../examples/binary/OrganizationType.java | 32 + ...ComputeClientBinaryTaskExecutionExample.java | 153 + .../binary/computegrid/ComputeClientTask.java | 116 + .../binary/computegrid/package-info.java| 21 + .../CacheClientBinaryPutGetExample.java | 230 ++ .../datagrid/CacheClientBinaryQueryExample.java | 330 ++ .../examples/binary/datagrid/package-info.java | 21 + .../ignite/examples/binary/package-info.java| 21 + .../CacheClientPortableExampleTest.java | 46 + .../ComputeClientPortableExampleTest.java | 37 + .../testsuites/IgniteExamplesSelfTestSuite.java |6 + .../ignite/codegen/MessageCodeGenerator.java| 11 +- modules/core/pom.xml| 21 + ...processors.platform.PlatformBootstrapFactory |2 + .../src/main/java/org/apache/ignite/Ignite.java |7 + .../java/org/apache/ignite/IgniteBinary.java| 357 ++ .../java/org/apache/ignite/IgniteCache.java | 41 + .../org/apache/ignite/IgniteDataStreamer.java | 16 + .../org/apache/ignite/binary/BinaryField.java | 46 + .../apache/ignite/binary/BinaryIdMapper.java| 54 + .../binary/BinaryInvalidTypeException.java | 58 + .../org/apache/ignite/binary/BinaryObject.java | 149 + .../ignite/binary/BinaryObjectBuilder.java | 135 + .../ignite/binary/BinaryObjectException.java| 57 + .../apache/ignite/binary/BinaryRawReader.java | 240 ++ .../apache/ignite/binary/BinaryRawWriter.java | 225 ++ .../org/apache/ignite/binary/BinaryReader.java | 290 ++ .../apache/ignite/binary/BinarySerializer.java | 47 + .../org/apache/ignite/binary/BinaryType.java| 68 + .../ignite/binary/BinaryTypeConfiguration.java | 112 + .../org/apache/ignite/binary/BinaryWriter.java | 273 ++ .../org/apache/ignite/binary/Binarylizable.java | 48 + .../org/apache/ignite/binary/package-info.java | 22 + .../ignite/cache/CacheKeyConfiguration.java | 92 + .../apache/ignite/cache/CacheTypeMetadata.java | 67 +- .../org/apache/ignite/cache/QueryEntity.java| 217 ++ .../org/apache/ignite/cache/QueryIndex.java | 192 + .../org/apache/ignite/cache/QueryIndexType.java | 38 + .../configuration/BinaryConfiguration.java | 139 + .../configuration/CacheConfiguration.java | 692 +++- .../configuration/IgniteConfiguration.java | 75 +- .../configuration/PlatformConfiguration.java| 25 + .../ignite/internal/GridKernalContextImpl.java |4 +- .../org/apache/ignite/internal/IgniteEx.java|9 - .../apache/ignite/internal/IgniteKernal.java| 39 +- .../ignite/internal/IgniteNodeAttributes.java |6 + .../internal/client/GridClientCompute.java |2 +- .../impl/connection/GridClientConnection.java |2 +- .../GridClientConnectionManagerAdapter.java |2 +- .../connection/GridClientNioTcpConnection.java |6 +- .../communication/GridIoMessageFactory.java |4 +- .../swapspace/GridSwapSpaceManager.java | 34 - .../portable/BinaryCachingMetadataHandler.java | 70 + .../internal/portable/BinaryEnumCache.java | 69 + .../internal/portable/BinaryFieldAccessor.java | 805 .../internal/portable/BinaryFieldImpl.java | 116 + .../portable/BinaryInternalIdMapper.java| 161 + .../internal/portable/BinaryMetadata.java | 166 + .../portable/BinaryMetadataCollector.java | 277 ++ .../portable/BinaryMetadataHandler.java | 44 + .../portable/BinaryNoopMetadataHandler.java | 53 + .../internal/portable/BinaryObjectEx.java | 245 ++ .../internal/portable/BinaryObjectImpl.java | 581 +++ .../portable/BinaryObjectOffheapImpl.java | 436
[10/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts
Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7cd4a77a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7cd4a77a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7cd4a77a Branch: refs/heads/ignite-1537 Commit: 7cd4a77a39007e890e5ae47fdcfe7a24b010c20d Parents: 1c8ff10 15877a8 Author: Alexey GoncharukAuthored: Mon Nov 23 09:36:01 2015 +0300 Committer: Alexey Goncharuk Committed: Mon Nov 23 09:36:01 2015 +0300 -- .gitignore |6 + assembly/release-fabric-base.xml| 94 + .../config/binary/example-ignite-binary.xml | 44 + examples/config/example-default.xml | 76 + examples/config/example-ignite.xml | 56 +- .../apache/ignite/examples/binary/Address.java | 72 + .../apache/ignite/examples/binary/Employee.java | 93 + .../ignite/examples/binary/EmployeeKey.java | 90 + .../binary/ExampleBinaryNodeStartup.java| 36 + .../ignite/examples/binary/Organization.java| 93 + .../examples/binary/OrganizationType.java | 32 + ...ComputeClientBinaryTaskExecutionExample.java | 153 + .../binary/computegrid/ComputeClientTask.java | 116 + .../binary/computegrid/package-info.java| 21 + .../CacheClientBinaryPutGetExample.java | 230 ++ .../datagrid/CacheClientBinaryQueryExample.java | 330 ++ .../examples/binary/datagrid/package-info.java | 21 + .../ignite/examples/binary/package-info.java| 21 + .../CacheClientPortableExampleTest.java | 46 + .../ComputeClientPortableExampleTest.java | 37 + .../testsuites/IgniteExamplesSelfTestSuite.java |6 + .../ignite/codegen/MessageCodeGenerator.java| 11 +- modules/core/pom.xml| 21 + ...processors.platform.PlatformBootstrapFactory |2 + .../src/main/java/org/apache/ignite/Ignite.java |7 + .../java/org/apache/ignite/IgniteBinary.java| 357 ++ .../java/org/apache/ignite/IgniteCache.java | 41 + .../org/apache/ignite/IgniteDataStreamer.java | 16 + .../org/apache/ignite/binary/BinaryField.java | 46 + .../apache/ignite/binary/BinaryIdMapper.java| 54 + .../binary/BinaryInvalidTypeException.java | 58 + .../org/apache/ignite/binary/BinaryObject.java | 149 + .../ignite/binary/BinaryObjectBuilder.java | 135 + .../ignite/binary/BinaryObjectException.java| 57 + .../apache/ignite/binary/BinaryRawReader.java | 240 ++ .../apache/ignite/binary/BinaryRawWriter.java | 225 ++ .../org/apache/ignite/binary/BinaryReader.java | 290 ++ .../apache/ignite/binary/BinarySerializer.java | 47 + .../org/apache/ignite/binary/BinaryType.java| 68 + .../ignite/binary/BinaryTypeConfiguration.java | 112 + .../org/apache/ignite/binary/BinaryWriter.java | 273 ++ .../org/apache/ignite/binary/Binarylizable.java | 48 + .../org/apache/ignite/binary/package-info.java | 22 + .../ignite/cache/CacheKeyConfiguration.java | 92 + .../apache/ignite/cache/CacheTypeMetadata.java | 67 +- .../org/apache/ignite/cache/QueryEntity.java| 217 ++ .../org/apache/ignite/cache/QueryIndex.java | 192 + .../org/apache/ignite/cache/QueryIndexType.java | 38 + .../configuration/BinaryConfiguration.java | 139 + .../configuration/CacheConfiguration.java | 692 +++- .../configuration/IgniteConfiguration.java | 75 +- .../configuration/PlatformConfiguration.java| 25 + .../ignite/internal/GridKernalContextImpl.java |4 +- .../org/apache/ignite/internal/IgniteEx.java|9 - .../apache/ignite/internal/IgniteKernal.java| 39 +- .../ignite/internal/IgniteNodeAttributes.java |6 + .../internal/client/GridClientCompute.java |2 +- .../impl/connection/GridClientConnection.java |2 +- .../GridClientConnectionManagerAdapter.java |2 +- .../connection/GridClientNioTcpConnection.java |6 +- .../communication/GridIoMessageFactory.java |4 +- .../swapspace/GridSwapSpaceManager.java | 34 - .../portable/BinaryCachingMetadataHandler.java | 70 + .../internal/portable/BinaryEnumCache.java | 69 + .../internal/portable/BinaryFieldAccessor.java | 805 .../internal/portable/BinaryFieldImpl.java | 116 + .../portable/BinaryInternalIdMapper.java| 161 + .../internal/portable/BinaryMetadata.java | 166 + .../portable/BinaryMetadataCollector.java | 277 ++ .../portable/BinaryMetadataHandler.java | 44 + .../portable/BinaryNoopMetadataHandler.java | 53 + .../internal/portable/BinaryObjectEx.java | 245 ++ .../internal/portable/BinaryObjectImpl.java | 581 +++ .../portable/BinaryObjectOffheapImpl.java
[35/50] [abbrv] ignite git commit: DEVNOTES fix
DEVNOTES fix Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c23cda1d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c23cda1d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c23cda1d Branch: refs/heads/ignite-1537 Commit: c23cda1d27816656e38937fb18c3e676248d7959 Parents: eee3b21 Author: Anton VinogradovAuthored: Tue Nov 24 12:57:13 2015 +0300 Committer: Anton Vinogradov Committed: Tue Nov 24 12:57:13 2015 +0300 -- DEVNOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c23cda1d/DEVNOTES.txt -- diff --git a/DEVNOTES.txt b/DEVNOTES.txt index ea9cf17..784be96 100644 --- a/DEVNOTES.txt +++ b/DEVNOTES.txt @@ -10,7 +10,7 @@ With LGPL dependencies: mvn clean package -DskipTests -Prelease,lgpl -Dignite.edition=fabric-lgpl With LGPL dependencies and Scala 2.10: - mvn clean package -DskipTests -Prelease,lgpl -Dscala-2.10 + mvn clean package -DskipTests -Prelease,lgpl -Dignite.edition=fabric-lgpl -Dscala-2.10 Look for apache-ignite-fabric--bin.zip in ./target/bin directory.
[06/50] [abbrv] ignite git commit: Fixed NPE in GridNioServer
Fixed NPE in GridNioServer Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5d224f19 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5d224f19 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5d224f19 Branch: refs/heads/ignite-1537 Commit: 5d224f192cee59b9f7dee2a0741c5b334657b845 Parents: 457ca6f Author: Valentin KulichenkoAuthored: Sat Nov 21 13:14:52 2015 -0800 Committer: Valentin Kulichenko Committed: Sat Nov 21 13:14:52 2015 -0800 -- .../java/org/apache/ignite/internal/util/nio/GridNioServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5d224f19/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java index 384ee1a..c0f5cfc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java @@ -997,7 +997,7 @@ public class GridNioServer { finished = msg.writeTo(buf, writer); -if (finished) +if (finished && writer != null) writer.reset(); } @@ -1019,7 +1019,7 @@ public class GridNioServer { finished = msg.writeTo(buf, writer); -if (finished) +if (finished && writer != null) writer.reset(); }
[01/50] [abbrv] ignite git commit: Ignite-based Implementation of Spring tx manager
Repository: ignite Updated Branches: refs/heads/ignite-1537 2bd587805 -> f70e862ce Ignite-based Implementation of Spring tx manager Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/457ca6fb Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/457ca6fb Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/457ca6fb Branch: refs/heads/ignite-1537 Commit: 457ca6fb5d64faf88869f4db7525673d067002df Parents: 2de3b19 Author: Amir AkhmedovAuthored: Fri Nov 20 19:03:14 2015 -0800 Committer: Valentin Kulichenko Committed: Fri Nov 20 19:03:14 2015 -0800 -- .../spring/IgniteTransactionHolder.java | 97 .../spring/SpringTransactionManager.java| 522 +++ .../transactions/spring/package-info.java | 22 + .../test/java/config/spring-transactions.xml| 36 ++ .../testsuites/IgniteSpringTestSuite.java | 5 +- .../GridSpringTransactionManagerSelfTest.java | 165 ++ .../spring/GridSpringTransactionService.java| 68 +++ parent/pom.xml | 4 +- 8 files changed, 916 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/457ca6fb/modules/spring/src/main/java/org/apache/ignite/transactions/spring/IgniteTransactionHolder.java -- diff --git a/modules/spring/src/main/java/org/apache/ignite/transactions/spring/IgniteTransactionHolder.java b/modules/spring/src/main/java/org/apache/ignite/transactions/spring/IgniteTransactionHolder.java new file mode 100644 index 000..e2c7133 --- /dev/null +++ b/modules/spring/src/main/java/org/apache/ignite/transactions/spring/IgniteTransactionHolder.java @@ -0,0 +1,97 @@ +/* + * 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.transactions.spring; + +import org.apache.ignite.transactions.Transaction; +import org.springframework.transaction.support.ResourceHolderSupport; + +/** + * A {@link org.springframework.transaction.support.ResourceHolder} for the Ignite {@link Transaction} to + * associate the transaction with a Spring transaction manager. + */ +class IgniteTransactionHolder extends ResourceHolderSupport { +/** */ +private Transaction transaction; + +/** */ +private boolean transactionActive; + +/** + * Constructs the transaction holder. + * + * @param transaction the transaction to hold + */ +IgniteTransactionHolder(Transaction transaction) { +this.transaction = transaction; +} + +/** + * Returns true if the holder is holding a transaction. + * + * @return true if holding a transaction + */ +public boolean hasTransaction() { +return this.transaction != null; +} + +/** + * Sets the transaction to be held in the resource holder. + * + * @param transaction the transaction + */ +void setTransaction(Transaction transaction) { +this.transaction = transaction; +} + +/** + * Returns the transaction in the holder or null if none has been set. + * + * @return the transaction or null + */ +Transaction getTransaction() { +return this.transaction; +} + +/** + * Return whether this holder represents an active, Ignite-managed + * transaction. + * + * @return true if a transaction is active + */ +protected boolean isTransactionActive() { +return this.transactionActive; +} + +/** + * Set whether this holder represents an active, Ignite-managed + * transaction. + * + * @param transactionActive true if a transaction is active + */ +protected void setTransactionActive(boolean transactionActive) { +this.transactionActive = transactionActive; +} + +/** {@inheritDoc} */ +@Override public void clear() { +super.clear(); + +transactionActive = false; +transaction.close(); +} +}
[23/50] [abbrv] ignite git commit: Merge remote-tracking branch 'apache/ignite-1.5' into ignite-1.5
Merge remote-tracking branch 'apache/ignite-1.5' into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2ae17094 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2ae17094 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2ae17094 Branch: refs/heads/ignite-1537 Commit: 2ae17094f58b4bfafd006dc2fc14bf9c0a6f8abc Parents: fa7a4bc 59fc24f Author: ashutakAuthored: Mon Nov 23 16:27:01 2015 +0300 Committer: ashutak Committed: Mon Nov 23 16:27:01 2015 +0300 -- .../ignite/internal/processors/cache/GridCacheMapEntry.java | 3 ++- .../GridCachePartitionedAtomicSetFailoverSelfTest.java | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) --
[30/50] [abbrv] ignite git commit: IGNITE-1983: .NET: Fixed continuous query tests.
IGNITE-1983: .NET: Fixed continuous query tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dcbfbd29 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dcbfbd29 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dcbfbd29 Branch: refs/heads/ignite-1537 Commit: dcbfbd290eebfaaf23ea1ec48edec2dc59227121 Parents: e4109f9 Author: vozerov-gridgainAuthored: Tue Nov 24 10:53:43 2015 +0300 Committer: vozerov-gridgain Committed: Tue Nov 24 10:53:43 2015 +0300 -- .../Continuous/ContinuousQueryAbstractTest.cs | 26 1 file changed, 16 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/dcbfbd29/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs index cb9542f..720483a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs @@ -76,7 +76,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous /** Cache name. */ private readonly string cacheName; - + /// /// Constructor. /// @@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous // Put from local node. int key1 = PrimaryKey(cache1); cache1.GetAndPut(key1, Entry(key1)); -CheckFilterSingle(key1, null, Entry(key1)); +CheckFilterSingle(key1, null, Entry(key1), !loc); CheckCallbackSingle(key1, null, Entry(key1)); // Put from remote node. @@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous } else { -CheckFilterSingle(key2, null, Entry(key2)); +CheckFilterSingle(key2, null, Entry(key2), true); CheckCallbackSingle(key2, null, Entry(key2)); } @@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous // Ignored put from local node. cache1.GetAndPut(key1, Entry(key1 + 1)); -CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1)); +CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc); CheckNoCallback(100); // Ignored put from remote node. @@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous if (loc) CheckNoFilter(100); else -CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1)); +CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true); CheckNoCallback(100); } @@ -868,9 +868,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous /// Expected key. /// Expected old value. /// Expected value. -private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal) +/// Whether there is a backup node to check.. +private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, +bool hasBackup = false) { CheckFilterSingle(expKey, expOldVal, expVal, 1000); + +// Filter is called on each cache node (primary and backup) +if (hasBackup) +CheckFilterSingle(expKey, expOldVal, expVal, 1000); } /// @@ -880,7 +886,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous /// Expected old value. /// Expected value. /// Timeout. -private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout) +private static void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout) { FilterEvent evt; @@ -895,7 +901,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous /// Ensure that no filter events are logged. /// /// Timeout. -private void CheckNoFilter(int timeout) +private static void CheckNoFilter(int timeout) { FilterEvent evt; @@ -908,7 +914,7 @@ namespace
[36/50] [abbrv] ignite git commit: IGNITE-1988 - Exception for explicit lock inside a transaction
IGNITE-1988 - Exception for explicit lock inside a transaction Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4d29cb7f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4d29cb7f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4d29cb7f Branch: refs/heads/ignite-1537 Commit: 4d29cb7f87aafa505807f4b10cddd0264cdac85f Parents: c23cda1 Author: Valentin KulichenkoAuthored: Tue Nov 24 16:23:05 2015 -0800 Committer: Valentin Kulichenko Committed: Tue Nov 24 16:23:05 2015 -0800 -- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- 3 files changed, 61 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4d29cb7f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java index 2e8dc9b..ae7b42e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java @@ -69,6 +69,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + delegate.lockAll(keys, 0); incrementLockCounter(); @@ -102,6 +104,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + boolean res = delegate.lockAll(keys, -1); if (res) @@ -128,6 +132,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + IgniteInternalFuture fut = delegate.lockAllAsync(keys, unit.toMillis(time)); try { @@ -198,8 +204,18 @@ class CacheLockImpl implements Lock { throw new UnsupportedOperationException(); } +/** + * Verifies there is no ongoing user transaction. + * + * @throws CacheException + */ +private void checkTx() throws CacheException { +if (delegate.context().tm().inUserTx()) +throw new CacheException("Explicit lock can't be acquired within a transaction."); +} + /** {@inheritDoc} */ @Override public String toString() { return S.toString(CacheLockImpl.class, this); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/4d29cb7f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java index 7e6ce89..ecdf641 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java @@ -296,10 +296,6 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture GridCacheMvccCandidate cand = cctx.mvcc().explicitLock(threadId, txKey); if (inTx()) { -IgniteTxEntry txEntry = tx.entry(txKey); - -txEntry.cached(entry); - if (cand != null) { if (!tx.implicit()) throw new IgniteCheckedException("Cannot access key within transaction if lock is " + @@ -308,6 +304,10 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture return null; } else { +IgniteTxEntry txEntry = tx.entry(txKey); + +txEntry.cached(entry); + // Check transaction entries (corresponding tx entries must be enlisted in transaction). cand = new GridCacheMvccCandidate(entry, cctx.localNodeId(),
[09/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts
http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd4a77a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd4a77a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java -- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java index 7e17efe,b266ad2..bd6c2a7 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java @@@ -142,9 -143,9 +142,12 @@@ public final class GridDhtColocatedLock /** Skip store flag. */ private final boolean skipStore; +/** */ +private Deque mappings; + + /** Keep binary. */ + private final boolean keepBinary; + /** * @param cctx Registry. * @param keys Keys to lock. @@@ -727,213 -720,214 +732,242 @@@ */ private void map(Collection keys, boolean remap, boolean topLocked) { try { -AffinityTopologyVersion topVer = this.topVer.get(); +map0( +keys, +remap, +topLocked); +} +catch (IgniteCheckedException ex) { +onDone(false, ex); +} +} -assert topVer != null; +private synchronized void map0( +Collection keys, +boolean remap, +boolean topLocked +) throws IgniteCheckedException { +AffinityTopologyVersion topVer = this.topVer; -assert topVer.topologyVersion() > 0; +assert topVer != null; -if (CU.affinityNodes(cctx, topVer).isEmpty()) { -onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " + -"(all partition nodes left the grid): " + cctx.name())); +assert topVer.topologyVersion() > 0; -return; -} +if (CU.affinityNodes(cctx, topVer).isEmpty()) { +onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " + +"(all partition nodes left the grid): " + cctx.name())); -boolean clientNode = cctx.kernalContext().clientNode(); +return; +} -assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks())); +boolean clientNode = cctx.kernalContext().clientNode(); -// First assume this node is primary for all keys passed in. -if (!clientNode && mapAsPrimary(keys, topVer)) -return; +assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks())); -Deque mappings = new ConcurrentLinkedDeque8<>(); +// First assume this node is primary for all keys passed in. +if (!clientNode && mapAsPrimary(keys, topVer)) +return; -// Assign keys to primary nodes. -GridNearLockMapping map = null; +mappings = new ArrayDeque<>(); -for (KeyCacheObject key : keys) { -GridNearLockMapping updated = map(key, map, topVer); +// Assign keys to primary nodes. +GridNearLockMapping map = null; -// If new mapping was created, add to collection. -if (updated != map) { -mappings.add(updated); +for (KeyCacheObject key : keys) { +GridNearLockMapping updated = map(key, map, topVer); -if (tx != null && updated.node().isLocal()) -tx.colocatedLocallyMapped(true); -} +// If new mapping was created, add to collection. +if (updated != map) { +mappings.add(updated); -map = updated; +if (tx != null && updated.node().isLocal()) +tx.colocatedLocallyMapped(true); } -if (isDone()) { -if (log.isDebugEnabled()) -log.debug("Abandoning (re)map because future is done: " + this); - -return; -} +map = updated; +} +if (isDone()) { if (log.isDebugEnabled()) -log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']'); +log.debug("Abandoning (re)map because future is done: " + this); + +return; +} -boolean hasRmtNodes = false; +
[46/50] [abbrv] ignite git commit: IGNITE-1990 Added missing classed to classnames-jdk.properties.
IGNITE-1990 Added missing classed to classnames-jdk.properties. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3c42da8b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3c42da8b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3c42da8b Branch: refs/heads/ignite-1537 Commit: 3c42da8b08973fab850a5ebc48b71915ce02f992 Parents: 97270bf Author: AKuznetsovAuthored: Thu Nov 26 07:21:18 2015 +0700 Committer: AKuznetsov Committed: Thu Nov 26 07:21:18 2015 +0700 -- .../visor/cache/VisorCacheConfiguration.java| 4 +- .../cache/VisorCacheTypeFieldMetadata.java | 30 - .../visor/cache/VisorCacheTypeMetadata.java | 133 +-- .../META-INF/classnames-jdk.properties | 2 + 4 files changed, 152 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3c42da8b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index 073ad22..69eb311 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -138,7 +138,7 @@ public class VisorCacheConfiguration implements Serializable { maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations(); memoryMode = ccfg.getMemoryMode(); interceptor = compactClass(ccfg.getInterceptor()); -typeMeta = VisorCacheTypeMetadata.list(ccfg.getTypeMetadata()); +typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory(), ccfg.getTypeMetadata()); statisticsEnabled = ccfg.isStatisticsEnabled(); mgmtEnabled = ccfg.isManagementEnabled(); ldrFactory = compactClass(ccfg.getCacheLoaderFactory()); @@ -350,4 +350,4 @@ public class VisorCacheConfiguration implements Serializable { @Override public String toString() { return S.toString(VisorCacheConfiguration.class, this); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/3c42da8b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java index c21354b..323e536 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java @@ -45,14 +45,30 @@ public class VisorCacheTypeFieldMetadata implements Serializable { * @return Data transfer object for given cache field metadata. */ public static VisorCacheTypeFieldMetadata from(CacheTypeFieldMetadata f) { -VisorCacheTypeFieldMetadata fieldMetadata = new VisorCacheTypeFieldMetadata(); +return new VisorCacheTypeFieldMetadata(f.getDatabaseName(), f.getDatabaseType(), +f.getJavaName(), U.compact(f.getJavaType().getName())); +} -fieldMetadata.dbName = f.getDatabaseName(); -fieldMetadata.dbType = f.getDatabaseType(); -fieldMetadata.javaName = f.getJavaName(); -fieldMetadata.javaType = U.compact(f.getJavaType().getName()); +/** + * Empty constructor. + */ +public VisorCacheTypeFieldMetadata() { +// No-op. +} -return fieldMetadata; +/** + * Full constructor. + * + * @param dbName Column name in database. + * @param dbType Column JDBC type in database. + * @param javaName Field name in java object. + * @param javaType Corresponding java type. + */ +public VisorCacheTypeFieldMetadata(String dbName, int dbType, String javaName, String javaType) { +this.dbName = dbName; +this.dbType = dbType; +this.javaName = javaName; +this.javaType = javaType; } /** @@ -82,4 +98,4 @@ public class VisorCacheTypeFieldMetadata implements Serializable { public String javaType() { return javaType; } -} \ No newline at end of file +}
[34/50] [abbrv] ignite git commit: Fixed javadoc and Java 1.8 build.
Fixed javadoc and Java 1.8 build. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eee3b21b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eee3b21b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eee3b21b Branch: refs/heads/ignite-1537 Commit: eee3b21b10a2ddbc131254fd2d077d95db9340de Parents: ca0de93 Author: Alexey GoncharukAuthored: Tue Nov 24 12:35:43 2015 +0300 Committer: Alexey Goncharuk Committed: Tue Nov 24 12:35:43 2015 +0300 -- .../java/org/apache/ignite/IgniteBinary.java| 6 + .../apache/ignite/binary/BinaryIdMapper.java| 2 +- .../apache/ignite/binary/BinarySerializer.java | 2 +- .../internal/portable/BinaryTypeImpl.java | 4 ++- .../processors/cache/CacheObjectContext.java| 26 +--- .../datastructures/GridCacheAtomicLongImpl.java | 6 - .../portable/BinaryMarshallerSelfTest.java | 6 ++--- 7 files changed, 36 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/eee3b21b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java index 5eb2670..8802c10 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java @@ -67,9 +67,7 @@ import org.jetbrains.annotations.Nullable; * String field = val.field("myFieldName"); * * Alternatively, if we have class definitions in the classpath, we may choose to work with deserialized - * typed objects at all times. In this case we do incur the deserialization cost. However, if - * {@link org.apache.ignite.marshaller.portable.BinaryMarshaller#isKeepDeserialized()} is {@code true} then Ignite will only deserialize on the first access - * and will cache the deserialized object, so it does not have to be deserialized again: + * typed objects at all times. * * IgniteCacheMyKey.class, MyValue.class cache = grid.cache(null); * @@ -150,8 +148,6 @@ import org.jetbrains.annotations.Nullable; * automatically. * Configuration * By default all your objects are considered as binary and no specific configuration is needed. - * However, in some cases, like when an object is used by both Java and .Net, you may need to specify portable objects - * explicitly by calling {@link org.apache.ignite.marshaller.portable.BinaryMarshaller#setClassNames(Collection)}. * The only requirement Ignite imposes is that your object has an empty * constructor. Note, that since server side does not have to know the class definition, * you only need to list portable objects in configuration on the client side. However, if you http://git-wip-us.apache.org/repos/asf/ignite/blob/eee3b21b/modules/core/src/main/java/org/apache/ignite/binary/BinaryIdMapper.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryIdMapper.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryIdMapper.java index a4a18f6..9aebf85 100644 --- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryIdMapper.java +++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryIdMapper.java @@ -27,7 +27,7 @@ package org.apache.ignite.binary; * actually do collide {@code BinaryIdMapper} allows to override the automatically * generated hash code IDs for the type and field names. * - * Binary ID mapper can be configured for all binary objects via {@link org.apache.ignite.marshaller.portable.BinaryMarshaller#getIdMapper()} method, + * Binary ID mapper can be configured for all binary objects via {@link org.apache.ignite.configuration.BinaryConfiguration#getIdMapper()} method, * or for a specific binary type via {@link BinaryTypeConfiguration#getIdMapper()} method. */ public interface BinaryIdMapper { http://git-wip-us.apache.org/repos/asf/ignite/blob/eee3b21b/modules/core/src/main/java/org/apache/ignite/binary/BinarySerializer.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinarySerializer.java b/modules/core/src/main/java/org/apache/ignite/binary/BinarySerializer.java index 31b3d30..3a8be3e 100644 --- a/modules/core/src/main/java/org/apache/ignite/binary/BinarySerializer.java +++ b/modules/core/src/main/java/org/apache/ignite/binary/BinarySerializer.java @@ -23,7 +23,7 @@ package org.apache.ignite.binary; * cannot be changed directly. * * Binary serializer can be configured for all binary objects via - *
[27/50] [abbrv] ignite git commit: Renaming.
Renaming. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/aee7b759 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/aee7b759 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/aee7b759 Branch: refs/heads/ignite-1537 Commit: aee7b759ff363fa9150097fd212b9f40724a8d15 Parents: 8050346 Author: Tikhonov NikolayAuthored: Mon Nov 23 18:01:53 2015 +0300 Committer: Tikhonov Nikolay Committed: Mon Nov 23 18:01:53 2015 +0300 -- .../internal/GridEventConsumeHandler.java | 6 +-- .../internal/GridMessageListenHandler.java | 6 +-- .../continuous/CacheContinuousQueryHandler.java | 7 ++- .../continuous/GridContinuousHandler.java | 6 +-- .../continuous/GridContinuousProcessor.java | 50 ...ContinuousQueryFailoverAbstractSelfTest.java | 2 +- .../continuous/GridEventConsumeSelfTest.java| 2 +- 7 files changed, 35 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java index 3918976..1869d2e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java @@ -110,17 +110,17 @@ class GridEventConsumeHandler implements GridContinuousHandler { } /** {@inheritDoc} */ -@Override public boolean isForEvents() { +@Override public boolean isEvents() { return true; } /** {@inheritDoc} */ -@Override public boolean isForMessaging() { +@Override public boolean isMessaging() { return false; } /** {@inheritDoc} */ -@Override public boolean isForQuery() { +@Override public boolean isQuery() { return false; } http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java index aa837b8..6b51107 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java @@ -83,17 +83,17 @@ public class GridMessageListenHandler implements GridContinuousHandler { } /** {@inheritDoc} */ -@Override public boolean isForEvents() { +@Override public boolean isEvents() { return false; } /** {@inheritDoc} */ -@Override public boolean isForMessaging() { +@Override public boolean isMessaging() { return true; } /** {@inheritDoc} */ -@Override public boolean isForQuery() { +@Override public boolean isQuery() { return false; } http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java index b69d4cd..030ab4a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java @@ -201,17 +201,17 @@ class CacheContinuousQueryHandler implements GridContinuousHandler { } /** {@inheritDoc} */ -@Override public boolean isForEvents() { +@Override public boolean isEvents() { return false; } /** {@inheritDoc} */ -@Override public boolean isForMessaging() { +@Override public boolean isMessaging() { return false; } /** {@inheritDoc} */ -@Override public boolean isForQuery() { +@Override public boolean isQuery() { return true; } @@ -848,7 +848,6 @@ class CacheContinuousQueryHandler implements GridContinuousHandler { /** * @param e Entry. - *
[20/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.
IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d71f6129 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d71f6129 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d71f6129 Branch: refs/heads/ignite-1537 Commit: d71f6129bc737539e61206c391fc25c776f36242 Parents: 19d2dd0 Author: AKuznetsovAuthored: Mon Nov 23 18:20:50 2015 +0700 Committer: AKuznetsov Committed: Mon Nov 23 18:20:50 2015 +0700 -- examples/schema-import/bin/db-init.sql | 3 +- .../org/apache/ignite/schema/CacheConfig.java | 7 +- .../java/org/apache/ignite/schema/Demo.java | 20 +- .../org/apache/ignite/cache/QueryIndex.java | 53 +- .../store/jdbc/CacheAbstractJdbcStore.java | 638 --- .../store/jdbc/CacheJdbcBlobStoreFactory.java | 14 +- .../cache/store/jdbc/CacheJdbcPojoStore.java| 444 + .../store/jdbc/CacheJdbcPojoStoreFactory.java | 277 +++- .../ignite/cache/store/jdbc/JdbcType.java | 255 .../cache/store/jdbc/JdbcTypeDefaultHasher.java | 43 ++ .../ignite/cache/store/jdbc/JdbcTypeField.java | 172 + .../ignite/cache/store/jdbc/JdbcTypeHasher.java | 34 + .../processors/query/GridQueryProcessor.java| 6 +- .../ignite/internal/visor/cache/VisorCache.java | 4 +- .../CacheJdbcPojoStoreAbstractSelfTest.java | 395 ...dbcPojoStoreOptimizedMarshallerSelfTest.java | 31 + ...JdbcPojoStorePortableMarshallerSelfTest.java | 85 +++ .../store/jdbc/CacheJdbcPojoStoreTest.java | 200 +++--- ...eJdbcStoreAbstractMultithreadedSelfTest.java | 2 +- .../ignite/testsuites/IgniteCacheTestSuite.java | 6 +- modules/schema-import/README.txt| 176 ++--- .../ignite/schema/generator/CodeGenerator.java | 198 +++--- .../ignite/schema/generator/XmlGenerator.java | 101 +-- .../apache/ignite/schema/model/IndexItem.java | 54 -- .../ignite/schema/model/PojoDescriptor.java | 72 +-- .../ignite/schema/model/SchemaDescriptor.java | 6 +- .../schema/parser/DatabaseMetadataParser.java | 12 +- .../apache/ignite/schema/parser/DbTable.java| 37 +- .../parser/dialect/DatabaseMetadataDialect.java | 32 +- .../parser/dialect/JdbcMetadataDialect.java | 22 +- .../parser/dialect/OracleMetadataDialect.java | 24 +- .../apache/ignite/schema/ui/ModalDialog.java| 6 +- .../ignite/schema/ui/SchemaImportApp.java | 13 +- .../schema/test/AbstractSchemaImportTest.java | 4 +- .../schema/test/model/ignite-type-metadata.xml | 610 +- .../yardstick/config/ignite-store-config.xml| 50 +- 36 files changed, 2844 insertions(+), 1262 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/examples/schema-import/bin/db-init.sql -- diff --git a/examples/schema-import/bin/db-init.sql b/examples/schema-import/bin/db-init.sql index f02236a..8a91a6a 100644 --- a/examples/schema-import/bin/db-init.sql +++ b/examples/schema-import/bin/db-init.sql @@ -17,7 +17,8 @@ -- Script of database initialization for Schema Import Demo. drop table PERSON; -create table PERSON(id integer not null, first_name varchar(50), last_name varchar(50), salary double not null, PRIMARY KEY(id)); + +create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double not null); insert into PERSON(id, first_name, last_name, salary) values(1, 'Johannes', 'Kepler', 1000); insert into PERSON(id, first_name, last_name, salary) values(2, 'Galileo', 'Galilei', 2000); http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java -- diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java index cb316c5..c5801cc 100644 --- a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java +++ b/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java @@ -17,8 +17,7 @@ package org.apache.ignite.schema; -import javax.cache.configuration.Factory; -import org.apache.ignite.cache.store.CacheStore; +import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory; import org.apache.ignite.configuration.CacheConfiguration; /** @@ -31,7 +30,7 @@ public class CacheConfig { * @param name Cache name. * @param storeFactory Cache store factory. */ -public static CacheConfiguration cache(String
[45/50] [abbrv] ignite git commit: IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264
IGNITE-2005: [Test failed] Ignite Java Client suite fails. This closes #264 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97270bf3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97270bf3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97270bf3 Branch: refs/heads/ignite-1537 Commit: 97270bf3ec5a220f44b21ba6fbaf254a9c0a6c08 Parents: b83f75e Author: Andrey GuraAuthored: Wed Nov 25 18:56:15 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:56:15 2015 +0300 -- .../ignite/internal/client/router/RouterFactorySelfTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/97270bf3/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java index d5eee7f..2e9e62a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java @@ -105,6 +105,8 @@ public class RouterFactorySelfTest extends GridCommonAbstractTest { } finally { GridRouterFactory.stopAllRouters(); + +stopAllGrids(); } } } \ No newline at end of file
[29/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e4109f98 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e4109f98 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e4109f98 Branch: refs/heads/ignite-1537 Commit: e4109f9800baa5b0783755cf537c46000ffd4305 Parents: fe53753 aee7b75 Author: AKuznetsovAuthored: Mon Nov 23 22:08:35 2015 +0700 Committer: AKuznetsov Committed: Mon Nov 23 22:08:35 2015 +0700 -- .../internal/GridEventConsumeHandler.java |6 +- .../internal/GridMessageListenHandler.java |6 +- .../internal/portable/BinaryObjectImpl.java | 32 +- .../portable/BinaryObjectOffheapImpl.java | 27 +- .../internal/portable/BinaryReaderExImpl.java | 1015 ++ .../portable/BinaryReaderHandlesHolder.java | 46 + .../portable/BinaryReaderHandlesHolderImpl.java | 44 + .../portable/GridPortableMarshaller.java| 23 +- .../portable/PortableClassDescriptor.java |8 +- .../ignite/internal/portable/PortableUtils.java | 861 ++- .../portable/builder/PortableBuilderReader.java | 21 +- .../processors/cache/GridCacheMapEntry.java |3 +- .../continuous/CacheContinuousQueryHandler.java |7 +- .../continuous/GridContinuousHandler.java |6 +- .../continuous/GridContinuousProcessor.java | 50 +- .../platform/PlatformContextImpl.java |4 +- ...chePartitionedAtomicSetFailoverSelfTest.java |5 + ...ContinuousQueryFailoverAbstractSelfTest.java |2 +- .../continuous/GridEventConsumeSelfTest.java|2 +- .../IgniteAtomicInvokeRetryBenchmark.java |2 +- .../failover/IgniteConsistencyException.java| 64 ++ ...IgniteTransactionalInvokeRetryBenchmark.java |2 +- ...IgniteTransactionalWriteInvokeBenchmark.java | 135 ++- .../IgniteTransactionalWriteReadBenchmark.java |2 +- 24 files changed, 1312 insertions(+), 1061 deletions(-) --
[16/50] [abbrv] ignite git commit: IGNITE-1964 .NET: Enum type ID is written if it is registered as portable type.
IGNITE-1964 .NET: Enum type ID is written if it is registered as portable type. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/19d2dd05 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/19d2dd05 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/19d2dd05 Branch: refs/heads/ignite-1537 Commit: 19d2dd0571ba1e92593da50b8b35b35e2fb7b6e7 Parents: 171bbee Author: Pavel TupitsynAuthored: Mon Nov 23 12:08:26 2015 +0300 Committer: vozerov-gridgain Committed: Mon Nov 23 12:08:26 2015 +0300 -- .../platform/PlatformComputeEchoTask.java | 18 +++ .../Binary/BinarySelfTest.cs| 35 ++ .../Compute/ComputeApiTest.cs | 51 +++- .../Impl/Binary/BinarySystemHandlers.cs | 2 +- .../Impl/Binary/BinaryUtils.cs | 36 ++ .../Impl/Binary/BinaryWriter.cs | 32 +++- 6 files changed, 140 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java index fe4e01c..c464945 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java @@ -17,13 +17,17 @@ package org.apache.ignite.platform; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteException; +import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.compute.ComputeJob; import org.apache.ignite.compute.ComputeJobAdapter; import org.apache.ignite.compute.ComputeJobResult; import org.apache.ignite.compute.ComputeTaskAdapter; import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.resources.IgniteInstanceResource; import org.jetbrains.annotations.Nullable; import java.util.Collections; @@ -88,6 +92,9 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter /** Type: enum array. */ private static final int TYPE_ENUM_ARRAY = 17; +/** Type: enum array. */ +private static final int TYPE_ENUM_FIELD = 18; + /** {@inheritDoc} */ @Nullable @Override public Map map(List subgrid, @Nullable Integer arg) { @@ -106,6 +113,10 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter /** Type. */ private Integer type; +/** Ignite. */ +@IgniteInstanceResource +private Ignite ignite; + /** * Constructor. * @@ -180,6 +191,13 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter PlatformComputeEnum.FOO }; +case TYPE_ENUM_FIELD: +IgniteCache cache = ignite.cache(null).withKeepBinary(); +BinaryObject obj = cache.get(TYPE_ENUM_FIELD); +PlatformComputeEnum val = obj.field("interopEnum"); + +return val; + default: throw new IgniteException("Unknown type: " + type); } http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs index 102afd1..f7455be 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs @@ -486,6 +486,23 @@ namespace Apache.Ignite.Core.Tests.Binary Assert.AreEqual(_marsh.Unmarshal(_marsh.Marshal(val)), val); } +/// +/// Tests the write of registered enum. +/// +[Test] +public void TestWriteEnumRegistered() +{ +var marsh = +new Marshaller(new BinaryConfiguration +{ +TypeConfigurations = new[] { new BinaryTypeConfiguration(typeof(TestEnum)) } +}); + +TestEnum val = TestEnum.Val1; + +Assert.AreEqual(marsh.Unmarshal(marsh.Marshal(val)), val); +
[12/50] [abbrv] ignite git commit: Merge branch ignite-1.5-tx-futs-opts into ignite-1.5
Merge branch ignite-1.5-tx-futs-opts into ignite-1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/07f5a62e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/07f5a62e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/07f5a62e Branch: refs/heads/ignite-1537 Commit: 07f5a62ec8e496a9a43e802f3f7bf5efc1dc2f9a Parents: 15877a8 388c857 Author: Alexey GoncharukAuthored: Mon Nov 23 09:44:43 2015 +0300 Committer: Alexey Goncharuk Committed: Mon Nov 23 09:44:43 2015 +0300 -- .../cache/distributed/dht/GridDhtGetFuture.java | 24 +- .../distributed/dht/GridDhtLockFuture.java | 77 +- .../colocated/GridDhtColocatedLockFuture.java | 595 --- .../distributed/near/GridNearLockFuture.java| 739 ++- .../distributed/near/GridNearLockMapping.java | 6 +- 5 files changed, 751 insertions(+), 690 deletions(-) --
[24/50] [abbrv] ignite git commit: IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java index 6d155fe..5c798b8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java @@ -17,19 +17,29 @@ package org.apache.ignite.internal.portable; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.binary.BinaryInvalidTypeException; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.binary.Binarylizable; import org.apache.ignite.internal.portable.builder.PortableLazyValue; +import org.apache.ignite.internal.portable.streams.PortableInputStream; +import org.apache.ignite.internal.util.lang.GridMapEntry; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; import org.jetbrains.annotations.Nullable; import org.jsr166.ConcurrentHashMap8; +import java.io.ByteArrayInputStream; import java.io.Externalizable; +import java.lang.reflect.Array; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.math.BigDecimal; +import java.math.BigInteger; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; @@ -37,7 +47,9 @@ import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.Map; +import java.util.Properties; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; @@ -45,6 +57,8 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListSet; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.ARR_LIST; import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN; import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN_ARR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.BYTE; @@ -53,6 +67,8 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR_ARR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.CLASS; import static org.apache.ignite.internal.portable.GridPortableMarshaller.COL; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_HASH_MAP; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_SKIP_LIST_SET; import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE; import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE_ARR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.DECIMAL; @@ -63,16 +79,25 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.ENUM; import static org.apache.ignite.internal.portable.GridPortableMarshaller.ENUM_ARR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT; import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT_ARR; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.HANDLE; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_MAP; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_SET; import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT; import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT_ARR; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_MAP; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_SET; +import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_LIST; import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG; import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG_ARR; import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP; import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP_ENTRY; import static org.apache.ignite.internal.portable.GridPortableMarshaller.NULL; import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJ; +import static
[37/50] [abbrv] ignite git commit: Better exception message if Ignite is not started
Better exception message if Ignite is not started Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dafad526 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dafad526 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dafad526 Branch: refs/heads/ignite-1537 Commit: dafad526f84ecbf503135c7538ffef07dd5e1c4f Parents: 4d29cb7 Author: Valentin KulichenkoAuthored: Tue Nov 24 16:34:37 2015 -0800 Committer: Valentin Kulichenko Committed: Tue Nov 24 16:34:37 2015 -0800 -- .../main/java/org/apache/ignite/internal/IgnitionEx.java| 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/dafad526/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java index 7d2b2dc..6bd74be 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java @@ -1187,8 +1187,8 @@ public class IgnitionEx { Ignite res; if (grid == null || (res = grid.grid()) == null) -throw new IgniteIllegalStateException("Grid instance was not properly started " + -"or was already stopped: " + name); +throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + +"Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -1205,7 +1205,8 @@ public class IgnitionEx { IgniteKernal res; if (grid == null || (res = grid.gridx()) == null) -throw new IllegalStateException("Grid instance was not properly started or was already stopped: " + name); +throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + +"Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -2388,4 +2389,4 @@ public class IgnitionEx { } } } -} \ No newline at end of file +}
[18/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index f6432a7..8af9443 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -30,7 +30,9 @@ import org.apache.ignite.cache.store.GridCacheBalancingStoreSelfTest; import org.apache.ignite.cache.store.GridCacheLoadOnlyStoreAdapterSelfTest; import org.apache.ignite.cache.store.StoreResourceInjectionSelfTest; import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreMultitreadedSelfTest; +import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreOptimizedMarshallerSelfTest; import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreTest; +import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStorePortableMarshallerSelfTest; import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreMultithreadedSelfTest; import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreSelfTest; import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest; @@ -139,7 +141,7 @@ public class IgniteCacheTestSuite extends TestSuite { } /** - * @param ignoredTests + * @param ignoredTests Tests to ignore. * @return Test suite. * @throws Exception Thrown in case of the failure. */ @@ -211,6 +213,8 @@ public class IgniteCacheTestSuite extends TestSuite { suite.addTestSuite(GridCacheJdbcBlobStoreSelfTest.class); suite.addTestSuite(GridCacheJdbcBlobStoreMultithreadedSelfTest.class); suite.addTestSuite(CacheJdbcPojoStoreTest.class); + suite.addTestSuite(CacheJdbcPojoStoreOptimizedMarshallerSelfTest.class); +suite.addTestSuite(CacheJdbcPojoStorePortableMarshallerSelfTest.class); suite.addTestSuite(CacheJdbcPojoStoreMultitreadedSelfTest.class); suite.addTestSuite(GridCacheBalancingStoreSelfTest.class); suite.addTestSuite(GridCacheAffinityApiSelfTest.class); http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/README.txt -- diff --git a/modules/schema-import/README.txt b/modules/schema-import/README.txt index 9b0a44d..d4f2dbf 100644 --- a/modules/schema-import/README.txt +++ b/modules/schema-import/README.txt @@ -17,19 +17,19 @@ Use Schema Import Utility for generation of type mapping and domain model in Jav For example you may use the following script for create sample type 'Person' in your RDBMS system: -create table PERSON(id integer not null, firstName varchar(50), lastName varchar(50), PRIMARY KEY(id)); +create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double); -insert into PERSON(id, first_name, last_name) values(1, 'Johannes', 'Kepler'); -insert into PERSON(id, first_name, last_name) values(2, 'Galileo', 'Galilei'); -insert into PERSON(id, first_name, last_name) values(3, 'Henry', 'More'); -insert into PERSON(id, first_name, last_name) values(4, 'Polish', 'Brethren'); -insert into PERSON(id, first_name, last_name) values(5, 'Robert', 'Boyle'); -insert into PERSON(id, first_name, last_name) values(6, 'Isaac', 'Newton'); +insert into PERSON(id, first_name, first_name, salary) values(1, 'Johannes', 'Kepler', 1000); +insert into PERSON(id, first_name, first_name, salary) values(2, 'Galileo', 'Galilei', 1200); +insert into PERSON(id, first_name, first_name, salary) values(3, 'Henry', 'More', 1150); +insert into PERSON(id, first_name, first_name, salary) values(4, 'Polish', 'Brethren', 2000); +insert into PERSON(id, first_name, first_name, salary) values(5, 'Robert', 'Boyle', 2500); +insert into PERSON(id, first_name, first_name, salary) values(6, 'Isaac', 'Newton', 1300); The Ignite Schema Import utility generates the following artifacts: - # Java POJO key and value classes - # XML CacheTypeMetadata configuration - # Java configuration snippet (alternative to XML) + # Java POJO key and value classes (enter "org.apache.ignite.schema" package name before generation). + # XML CacheTypeMetadata configuration. + # Java configuration snippet (alternative to XML). After you exit from the wizard, you should: # Copy generated POJO java classes to you project source folder. @@ -42,6 +42,9 @@ After you exit from the wizard, you should: Example of spring configuration: + + + ... @@ -52,67 +55,63 @@ Example of spring configuration: - - - - -
[43/50] [abbrv] ignite git commit: IGNITE-1992: [Test failed] CacheStopAndDestroySelfTest.testLocalClose test fails periodicaly. This closes #261
IGNITE-1992: [Test failed] CacheStopAndDestroySelfTest.testLocalClose test fails periodicaly. This closes #261 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e02edcd3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e02edcd3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e02edcd3 Branch: refs/heads/ignite-1537 Commit: e02edcd36d79f1e107c2ebe5096238f2f2a62a23 Parents: b9e4e03 Author: Andrey GuraAuthored: Wed Nov 25 18:34:42 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:34:42 2015 +0300 -- .../processors/cache/CacheStopAndDestroySelfTest.java| 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e02edcd3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java index 29828af..061a374 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java @@ -30,6 +30,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.managers.communication.GridIoMessage; +import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteInClosure; @@ -67,9 +68,6 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest { /** local cache name. */ protected static String CACHE_NAME_LOC = "cache_local"; -/** */ -private static volatile boolean stop; - /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); @@ -674,6 +672,10 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest { // Local creation after closed. +AffinityTopologyVersion topVer = grid(1).context().cache().context().exchange().lastTopologyFuture().get(); + + grid(0).context().cache().context().exchange().affinityReadyFuture(topVer).get(); + grid(0).getOrCreateCache(getLocalConfig()); grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated0");
[41/50] [abbrv] ignite git commit: IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252
IGNITE-1544: Make sure objects number stored in a cache can be bigger than Integer.MAX_VALUE. This closes #252 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8a9cc540 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8a9cc540 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8a9cc540 Branch: refs/heads/ignite-1537 Commit: 8a9cc5408f99713fb4a1a9036940fc76aef7b050 Parents: c23cda1 Author: Andrey GuraAuthored: Wed Nov 25 18:21:48 2015 +0300 Committer: Denis Magda Committed: Wed Nov 25 18:21:48 2015 +0300 -- .../java/org/apache/ignite/IgniteCache.java | 23 +++ .../processors/cache/GridCacheAdapter.java | 156 ++- .../processors/cache/GridCacheProxyImpl.java| 61 .../processors/cache/IgniteCacheProxy.java | 42 + .../processors/cache/IgniteInternalCache.java | 47 +- .../distributed/dht/GridDhtCacheAdapter.java| 7 +- .../distributed/near/GridNearCacheAdapter.java | 10 ++ .../CacheDeferredDeleteSanitySelfTest.java | 98 .../multijvm/IgniteCacheProcessProxy.java | 38 + .../ignite/testsuites/IgniteCacheTestSuite.java | 2 + ...niteCacheP2pUnmarshallingQueryErrorTest.java | 7 +- .../ignite-int-max-values-offheap-config.xml| 89 +++ .../ignite-int-max-values-onheap-config.xml | 84 ++ .../ignite-int-max-values-swap-config.xml | 93 +++ .../test-max-int-values-offheap.properties | 70 + .../test-max-int-values-onheap.properties | 70 + .../config/test-max-int-values-swap.properties | 69 .../yardstick/cache/IntMaxValueEntriesTest.java | 135 18 files changed, 1094 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/IgniteCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java index c9de3f1..c575865 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -348,6 +348,19 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int size(CachePeekMode... peekModes) throws CacheException; /** + * Gets the number of all entries cached across all nodes as a long value. By default, if {@code peekModes} value + * isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to + * calling this method with {@link CachePeekMode#PRIMARY} peek mode. + * + * NOTE: this operation is distributed and will query all participating nodes for their cache sizes. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size across all nodes. + */ +@IgniteAsyncSupported +public long sizeLong(CachePeekMode... peekModes) throws CacheException; + +/** * Gets the number of all entries cached on this node. By default, if {@code peekModes} value isn't defined, * only size of primary copies will be returned. This behavior is identical to calling this method with * {@link CachePeekMode#PRIMARY} peek mode. @@ -358,6 +371,16 @@ public interface IgniteCache extends javax.cache.Cache , IgniteAsyncS public int localSize(CachePeekMode... peekModes); /** + * Gets the number of all entries cached on this node as a long value. By default, if {@code peekModes} value isn't + * defined, only size of primary copies will be returned. This behavior is identical to calling this method with + * {@link CachePeekMode#PRIMARY} peek mode. + * + * @param peekModes Optional peek modes. If not provided, then total cache size is returned. + * @return Cache size on this node. + */ +public long localSizeLong(CachePeekMode... peekModes); + +/** * @param map Map containing keys and entry processors to be applied to values. * @param args Additional arguments to pass to the {@link EntryProcessor}. * @return The map of {@link EntryProcessorResult}s of the processing per key, http://git-wip-us.apache.org/repos/asf/ignite/blob/8a9cc540/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
[50/50] [abbrv] ignite git commit: merge 1.5
merge 1.5 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f70e862c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f70e862c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f70e862c Branch: refs/heads/ignite-1537 Commit: f70e862ceee567602c9a1bb5908c7697f644d14d Parents: 4154d3d Author: sboikovAuthored: Thu Nov 26 09:48:56 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:48:56 2015 +0300 -- ...arOptimisticSerializableTxPrepareFuture.java | 66 1 file changed, 66 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f70e862c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java index 20ff89b..144070c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java @@ -39,10 +39,12 @@ import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTx import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxMapping; import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx; import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry; +import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException; import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException; import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException; +import org.apache.ignite.internal.util.GridConcurrentHashSet; import org.apache.ignite.internal.util.future.GridCompoundFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; @@ -852,4 +854,68 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim return S.toString(MiniFuture.class, this, "done", isDone(), "cancelled", isCancelled(), "err", error()); } } + +/** + * Keys lock future. + */ +private class KeyLockFuture extends GridFutureAdapter { +/** */ +@GridToStringInclude +private Collection lockKeys = new GridConcurrentHashSet<>(); + +/** */ +private volatile boolean allKeysAdded; + +/** + * @param key Key to track for locking. + */ +private void addLockKey(IgniteTxKey key) { +assert !allKeysAdded; + +lockKeys.add(key); +} + +/** + * @param key Locked keys. + */ +private void onKeyLocked(IgniteTxKey key) { +lockKeys.remove(key); + +checkLocks(); +} + +/** + * Moves future to the ready state. + */ +private void onAllKeysAdded() { +allKeysAdded = true; + +checkLocks(); +} + +/** + * @return {@code True} if all locks are owned. + */ +private boolean checkLocks() { +boolean locked = lockKeys.isEmpty(); + +if (locked && allKeysAdded) { +if (log.isDebugEnabled()) +log.debug("All locks are acquired for near prepare future: " + this); + +onDone((GridNearTxPrepareResponse)null); +} +else { +if (log.isDebugEnabled()) +log.debug("Still waiting for locks [fut=" + this + ", keys=" + lockKeys + ']'); +} + +return locked; +} + +/** {@inheritDoc} */ +@Override public String toString() { +return S.toString(KeyLockFuture.class, this, super.toString()); +} +} }
[17/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml -- diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml index 2de9c62..f03f24f 100644 --- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml +++ b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml @@ -18,7 +18,7 @@ --> http://www.springframework.org/schema/beans; xmlns:util="http://www.springframework.org/schema/util; @@ -27,149 +27,301 @@ http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd;> - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[11/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts
Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/388c8578 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/388c8578 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/388c8578 Branch: refs/heads/ignite-1537 Commit: 388c85785271deabc8822e1d8cf1fdaf4254b6e2 Parents: 7cd4a77 Author: Alexey GoncharukAuthored: Mon Nov 23 09:36:32 2015 +0300 Committer: Alexey Goncharuk Committed: Mon Nov 23 09:36:32 2015 +0300 -- .../colocated/GridDhtColocatedLockFuture.java | 61 +++- .../distributed/near/GridNearLockFuture.java| 18 +++--- 2 files changed, 29 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/388c8578/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java index bd6c2a7..7e6ce89 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java @@ -89,26 +89,26 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture /** Cache registry. */ @GridToStringExclude -private GridCacheContext cctx; +private final GridCacheContext cctx; /** Lock owner thread. */ @GridToStringInclude -private long threadId; +private final long threadId; /** Keys to lock. */ private Collection keys; /** Future ID. */ -private IgniteUuid futId; +private final IgniteUuid futId; /** Lock version. */ -private GridCacheVersion lockVer; +private final GridCacheVersion lockVer; /** Read flag. */ -private boolean read; +private final boolean read; /** Flag to return value. */ -private boolean retval; +private final boolean retval; /** Error. */ private volatile Throwable err; @@ -118,26 +118,26 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture private LockTimeoutObject timeoutObj; /** Lock timeout. */ -private long timeout; +private final long timeout; /** Filter. */ -private CacheEntryPredicate[] filter; +private final CacheEntryPredicate[] filter; /** Transaction. */ @GridToStringExclude -private GridNearTxLocal tx; +private final GridNearTxLocal tx; /** Topology snapshot to operate on. */ private volatile AffinityTopologyVersion topVer; /** Map of current values. */ -private Map > valMap; +private final Map > valMap; /** Trackable flag (here may be non-volatile). */ private boolean trackable; /** TTL for read operation. */ -private long accessTtl; +private final long accessTtl; /** Skip store flag. */ private final boolean skipStore; @@ -457,7 +457,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture * @param miniId Mini ID to find. * @return Mini future. */ -@SuppressWarnings("ForLoopReplaceableByForEach") +@SuppressWarnings({"ForLoopReplaceableByForEach", "IfMayBeConditional"}) private MiniFuture miniFuture(IgniteUuid miniId) { // We iterate directly over the futs collection here to avoid copy. synchronized (futs) { @@ -742,6 +742,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture } } +/** + * @param keys Keys to map. + * @param remap Remap flag. + * @param topLocked Topology locked flag. + * @throws IgniteCheckedException If mapping failed. + */ private synchronized void map0( Collection keys, boolean remap, @@ -908,34 +914,6 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture mapping.request(req); } -req = new GridNearLockRequest( -cctx.cacheId(), -topVer, -cctx.nodeId(), -
[32/50] [abbrv] ignite git commit: IGNITE-1858: .NET: Updated project settings to support VS2010-VS2015.
IGNITE-1858: .NET: Updated project settings to support VS2010-VS2015. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/11369331 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/11369331 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/11369331 Branch: refs/heads/ignite-1537 Commit: 11369331955070758162fbbd3904552eef390049 Parents: 512fe6b Author: Pavel TupitsynAuthored: Tue Nov 24 11:57:39 2015 +0300 Committer: vozerov-gridgain Committed: Tue Nov 24 11:57:39 2015 +0300 -- .../Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj | 3 +++ .../Apache.Ignite.Core.Tests.TestDll.csproj | 2 ++ .../Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj | 2 ++ .../dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj | 2 ++ .../dotnet/Apache.Ignite.Core/Impl/Events/Events.cs | 8 +--- modules/platforms/dotnet/Apache.Ignite.sln | 6 ++ modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj | 2 ++ .../Apache.Ignite.Examples/Apache.Ignite.Examples.csproj | 2 ++ .../Apache.Ignite.ExamplesDll.csproj | 2 ++ 9 files changed, 22 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj index 14b6466..f4c7894 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj @@ -19,10 +19,12 @@ x86 bin\x86\Debug\ DEBUG +4 x86 bin\x86\Release\ +true x64 @@ -32,6 +34,7 @@ x64 bin\x64\Release\ +true true http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj index c333bda..ebc8043 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj @@ -19,6 +19,7 @@ x86 bin\x86\Release\ +true x64 @@ -27,6 +28,7 @@ x64 bin\x64\Release\ +true true http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj index a5bb7a8..72c0210 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj @@ -25,6 +25,7 @@ x64 bin\x64\Release\ true +true x86 @@ -36,6 +37,7 @@ x86 bin\x86\Release\ true +true true http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj index d7db33e..ae10159 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj @@ -22,6 +22,7 @@ x64 bin\x64\Release\ true +true x86 @@ -33,6 +34,7 @@ x86 bin\x86\Release\ true +true true http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs index 098102a..783ba94 100644 ---
ignite git commit: Disabled shmem communication in failover tests.
Repository: ignite Updated Branches: refs/heads/ignite-1.5 4af461a7f -> 28d6e006c Disabled shmem communication in failover tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/28d6e006 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/28d6e006 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/28d6e006 Branch: refs/heads/ignite-1.5 Commit: 28d6e006c40b83fc8744b44312e74779264c0265 Parents: 4af461a Author: sboikovAuthored: Thu Nov 26 09:55:24 2015 +0300 Committer: sboikov Committed: Thu Nov 26 09:55:24 2015 +0300 -- .../GridCacheAbstractDataStructuresFailoverSelfTest.java | 3 +++ .../cache/datastructures/IgniteCollectionAbstractTest.java| 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/28d6e006/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index bc11448..4ee200b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -54,6 +54,7 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.resources.IgniteInstanceResource; +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; @@ -122,6 +123,8 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); + ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); + AtomicConfiguration atomicCfg = new AtomicConfiguration(); atomicCfg.setCacheMode(collectionCacheMode()); http://git-wip-us.apache.org/repos/asf/ignite/blob/28d6e006/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java index 36c846a..3e38a58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java @@ -26,6 +26,7 @@ import org.apache.ignite.configuration.CollectionConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter; +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; @@ -45,6 +46,8 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); + ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); + TcpDiscoverySpi spi = new TcpDiscoverySpi(); spi.setIpFinder(ipFinder);
ignite git commit: ignite-1282 - Fixing tests.
Repository: ignite Updated Branches: refs/heads/ignite-1282 22326cc9e -> 9c1b7656a ignite-1282 - Fixing tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9c1b7656 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9c1b7656 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9c1b7656 Branch: refs/heads/ignite-1282 Commit: 9c1b7656a39496f03950158bc7fc2305eacdc6d1 Parents: 22326cc Author: Alexey GoncharukAuthored: Wed Nov 25 12:25:47 2015 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 25 12:25:47 2015 +0300 -- .../builder/BinaryObjectBuilderImpl.java| 9 ++ .../processors/query/GridQueryProcessor.java| 26 +++-- .../portable/BinaryObjectBuilderSelfTest.java | 30 .../cache/IgniteCacheAbstractQuerySelfTest.java | 2 +- 4 files changed, 51 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/9c1b7656/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java index b2fb7d8..d330c72 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java @@ -31,7 +31,6 @@ import org.apache.ignite.internal.portable.PortableContext; import org.apache.ignite.internal.portable.PortableSchema; import org.apache.ignite.internal.portable.PortableSchemaRegistry; import org.apache.ignite.internal.portable.PortableUtils; -import org.apache.ignite.internal.util.GridArgumentCheck; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; @@ -492,15 +491,15 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder { } /** {@inheritDoc} */ -@Override public BinaryObjectBuilder setField(String name, Object val) { -GridArgumentCheck.notNull(val, name); +@Override public BinaryObjectBuilder setField(String name, Object val0) { +Object val = val0 == null ? new PortableValueWithType(PortableUtils.typeByClass(Object.class), null) : val0; if (assignedVals == null) assignedVals = new LinkedHashMap<>(); Object oldVal = assignedVals.put(name, val); -if (oldVal instanceof PortableValueWithType) { +if (oldVal instanceof PortableValueWithType && val0 != null) { ((PortableValueWithType)oldVal).value(val); assignedVals.put(name, oldVal); @@ -514,8 +513,6 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder { if (assignedVals == null) assignedVals = new LinkedHashMap<>(); -//int fldId = ctx.fieldId(typeId, fldName); - assignedVals.put(name, new PortableValueWithType(PortableUtils.typeByClass(type), val)); return this; http://git-wip-us.apache.org/repos/asf/ignite/blob/9c1b7656/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index c560e4e..90bb9a6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -1546,28 +1546,36 @@ public class GridQueryProcessor extends GridProcessorAdapter { bld.setCharAt(3, Character.toUpperCase(bld.charAt(3))); -String[] mtdNames = new String[] {bld.toString(), prop}; - ClassProperty tmp = null; -for (String mtdName : mtdNames) { +try { +tmp = new ClassProperty(cls.getMethod(bld.toString()), key, alias); +} +catch (NoSuchMethodException ignore) { +// No-op. +} + +if (tmp == null) { try { -tmp = new ClassProperty(cls.getMethod(mtdName), key, alias); +tmp = new ClassProperty(cls.getDeclaredField(prop), key, alias); } -catch (NoSuchMethodException ignore) {
ignite git commit: ignite-sql-opt
Repository: ignite Updated Branches: refs/heads/ignite-sql-opt 17c0b4f58 -> 179270caf ignite-sql-opt Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/179270ca Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/179270ca Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/179270ca Branch: refs/heads/ignite-sql-opt Commit: 179270caf49060f8cce17685b995329a41d6ab10 Parents: 17c0b4f Author: sboikovAuthored: Wed Nov 25 12:52:16 2015 +0300 Committer: sboikov Committed: Wed Nov 25 13:10:59 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 + .../processors/query/h2/IgniteH2Indexing.java | 9 +++ .../query/h2/opt/GridH2RowDescriptor.java | 5 ++ .../query/h2/opt/GridH2TreeIndex.java | 6 +- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 .../IgniteCacheQuerySelfTestSuite.java | 2 + 7 files changed, 115 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/179270ca/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index e87346f..e2bf912 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -373,6 +373,9 @@ public class CacheConfiguration extends MutableConfiguration { /** */ private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE; +/** */ +private boolean snapshotableIdx; + /** Copy on read flag. */ private boolean cpOnRead = DFLT_COPY_ON_READ; @@ -463,6 +466,7 @@ public class CacheConfiguration extends MutableConfiguration { rebalancePoolSize = cc.getRebalanceThreadPoolSize(); rebalanceTimeout = cc.getRebalanceTimeout(); rebalanceThrottle = cc.getRebalanceThrottle(); +snapshotableIdx = cc.isSnapshotableIndex(); sqlEscapeAll = cc.isSqlEscapeAll(); sqlFuncCls = cc.getSqlFunctionClasses(); sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize(); @@ -1900,6 +1904,32 @@ public class CacheConfiguration extends MutableConfiguration { } /** + * Gets flag indicating whether SQL indexes should support snapshots. + * + * @return {@code True} if SQL indexes should support snapshots. + */ +public boolean isSnapshotableIndex() { +return snapshotableIdx; +} + +/** + * Sets flag indicating whether SQL indexes should support snapshots. + * + * Default value is {@code false}. + * + * Note that this flag is ignored if indexes are stored in offheap memory, + * for offheap indexes snapshots are always enabled. + * + * @param snapshotableIdx {@code True} if SQL indexes should support snapshots. + * @return {@code this} for chaining. + */ +public CacheConfiguration setSnapshotableIndex(boolean snapshotableIdx) { +this.snapshotableIdx = snapshotableIdx; + +return this; +} + +/** * Gets array of cache plugin configurations. * * @return Cache plugin configurations. http://git-wip-us.apache.org/repos/asf/ignite/blob/179270ca/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 92aeea3..45c6327 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 @@ -2093,6 +2093,9 @@ public class IgniteH2Indexing implements GridQueryIndexing { private final boolean preferSwapVal; /** */ +private final boolean snapshotableIdx; + +/** */ private final GridQueryProperty[] props; /** @@ -2135,6 +2138,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { } preferSwapVal = schema.ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED; +snapshotableIdx = schema.ccfg.isSnapshotableIndex(); }
[2/4] ignite git commit: ignite-sql-opt
ignite-sql-opt Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/179270ca Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/179270ca Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/179270ca Branch: refs/heads/ignite-sql-opt-2 Commit: 179270caf49060f8cce17685b995329a41d6ab10 Parents: 17c0b4f Author: sboikovAuthored: Wed Nov 25 12:52:16 2015 +0300 Committer: sboikov Committed: Wed Nov 25 13:10:59 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 + .../processors/query/h2/IgniteH2Indexing.java | 9 +++ .../query/h2/opt/GridH2RowDescriptor.java | 5 ++ .../query/h2/opt/GridH2TreeIndex.java | 6 +- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 .../IgniteCacheQuerySelfTestSuite.java | 2 + 7 files changed, 115 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/179270ca/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index e87346f..e2bf912 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -373,6 +373,9 @@ public class CacheConfiguration extends MutableConfiguration { /** */ private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE; +/** */ +private boolean snapshotableIdx; + /** Copy on read flag. */ private boolean cpOnRead = DFLT_COPY_ON_READ; @@ -463,6 +466,7 @@ public class CacheConfiguration extends MutableConfiguration { rebalancePoolSize = cc.getRebalanceThreadPoolSize(); rebalanceTimeout = cc.getRebalanceTimeout(); rebalanceThrottle = cc.getRebalanceThrottle(); +snapshotableIdx = cc.isSnapshotableIndex(); sqlEscapeAll = cc.isSqlEscapeAll(); sqlFuncCls = cc.getSqlFunctionClasses(); sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize(); @@ -1900,6 +1904,32 @@ public class CacheConfiguration extends MutableConfiguration { } /** + * Gets flag indicating whether SQL indexes should support snapshots. + * + * @return {@code True} if SQL indexes should support snapshots. + */ +public boolean isSnapshotableIndex() { +return snapshotableIdx; +} + +/** + * Sets flag indicating whether SQL indexes should support snapshots. + * + * Default value is {@code false}. + * + * Note that this flag is ignored if indexes are stored in offheap memory, + * for offheap indexes snapshots are always enabled. + * + * @param snapshotableIdx {@code True} if SQL indexes should support snapshots. + * @return {@code this} for chaining. + */ +public CacheConfiguration setSnapshotableIndex(boolean snapshotableIdx) { +this.snapshotableIdx = snapshotableIdx; + +return this; +} + +/** * Gets array of cache plugin configurations. * * @return Cache plugin configurations. http://git-wip-us.apache.org/repos/asf/ignite/blob/179270ca/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 92aeea3..45c6327 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 @@ -2093,6 +2093,9 @@ public class IgniteH2Indexing implements GridQueryIndexing { private final boolean preferSwapVal; /** */ +private final boolean snapshotableIdx; + +/** */ private final GridQueryProperty[] props; /** @@ -2135,6 +2138,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { } preferSwapVal = schema.ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED; +snapshotableIdx = schema.ccfg.isSnapshotableIndex(); } /** {@inheritDoc} */ @@ -2312,5 +2316,10 @@ public class IgniteH2Indexing implements
[1/4] ignite git commit: ignite-sql-cache-stmt
Repository: ignite Updated Branches: refs/heads/ignite-sql-opt-2 cd216c3e3 -> 2a6514a91 ignite-sql-cache-stmt Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/229a7afd Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/229a7afd Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/229a7afd Branch: refs/heads/ignite-sql-opt-2 Commit: 229a7afd85941eccbc1b00c1d7416381bb699ceb Parents: 1171b36 Author: sboikovAuthored: Wed Nov 25 10:49:01 2015 +0300 Committer: sboikov Committed: Wed Nov 25 10:49:01 2015 +0300 -- .../processors/query/h2/twostep/GridReduceQueryExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/229a7afd/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 bab88a7..cf54a4a 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 @@ -503,7 +503,7 @@ public class GridReduceQueryExecutor { assert !nodes.isEmpty(); if (cctx.isReplicated() || qry.explain()) { -assert qry.explain() || !nodes.contains(ctx.cluster().get().localNode()) : +assert qry.explain() || !nodes.contains(ctx.discovery().localNode()) : "We must be on a client node."; // Select random data node to run query on a replicated data or get EXPLAIN PLAN from a single node. @@ -1060,7 +1060,7 @@ public class GridReduceQueryExecutor { } if (locNodeFound) // Local node goes the last to allow parallel execution. -h2.mapQueryExecutor().onMessage(ctx.localNodeId(), copy(msg, ctx.cluster().get().localNode(), partsMap)); +h2.mapQueryExecutor().onMessage(ctx.localNodeId(), copy(msg, ctx.discovery().localNode(), partsMap)); return ok; }
[4/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sql-cache-stmt' into ignite-sql-opt-2
Merge remote-tracking branch 'remotes/origin/ignite-sql-cache-stmt' into ignite-sql-opt-2 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2a6514a9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2a6514a9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2a6514a9 Branch: refs/heads/ignite-sql-opt-2 Commit: 2a6514a91a356db51330c46aaf39de0b0261813a Parents: 7fe1c3c 229a7af Author: sboikovAuthored: Wed Nov 25 13:13:59 2015 +0300 Committer: sboikov Committed: Wed Nov 25 13:13:59 2015 +0300 -- .../processors/query/h2/twostep/GridReduceQueryExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[3/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sql-opt' into ignite-sql-opt-2
Merge remote-tracking branch 'remotes/origin/ignite-sql-opt' into ignite-sql-opt-2 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7fe1c3ca Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7fe1c3ca Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7fe1c3ca Branch: refs/heads/ignite-sql-opt-2 Commit: 7fe1c3caa6a889d8adf9d96985782c85312d53a0 Parents: cd216c3 179270c Author: sboikovAuthored: Wed Nov 25 13:13:41 2015 +0300 Committer: sboikov Committed: Wed Nov 25 13:13:41 2015 +0300 -- .../configuration/CacheConfiguration.java | 30 + .../processors/query/h2/IgniteH2Indexing.java | 9 +++ .../query/h2/opt/GridH2RowDescriptor.java | 5 ++ .../query/h2/opt/GridH2TreeIndex.java | 6 +- .../cache/IgniteCacheAbstractQuerySelfTest.java | 69 +++- ...PartitionedSnapshotEnabledQuerySelfTest.java | 28 .../IgniteCacheQuerySelfTestSuite.java | 2 + 7 files changed, 115 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7fe1c3ca/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 d39d499,45c6327..4f2ed2d --- 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 @@@ -2407,35 -2316,10 +2411,40 @@@ public class IgniteH2Indexing implement @Override public boolean preferSwapValue() { return preferSwapVal; } + + /** {@inheritDoc} */ + @Override public boolean snapshotableIndex() { + return snapshotableIdx; + } } + +/** + * + */ +private static class StatementCache extends LinkedHashMap { +/** */ +private int size; + +/** + * @param size Size. + */ +private StatementCache(int size) { +super(size, (float)0.75, true); + +this.size = size; +} + +/** {@inheritDoc} */ +@Override protected boolean removeEldestEntry(Map.Entry eldest) { +boolean rmv = size() > size; + +if (rmv) { +PreparedStatement stmt = eldest.getValue(); + +U.closeQuiet(stmt); +} + +return rmv; +} +} }
[2/3] ignite git commit: Merge branch 'ignite-1.5' into ignite-1956
Merge branch 'ignite-1.5' into ignite-1956 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b4d7a114 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b4d7a114 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b4d7a114 Branch: refs/heads/ignite-1956 Commit: b4d7a114900b75cac16bb6cfac37925f0b1d1efe Parents: ebf909d c40ab67 Author: vozerov-gridgainAuthored: Wed Nov 25 11:11:24 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 11:11:24 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b4d7a114/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java --
[1/3] ignite git commit: IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams.
Repository: ignite Updated Branches: refs/heads/ignite-1956 ebf909d93 -> 462f8e618 IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c40ab677 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c40ab677 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c40ab677 Branch: refs/heads/ignite-1956 Commit: c40ab677e69f0d756281c62549cb2f63de907ed6 Parents: dafad52 Author: Pavel TupitsynAuthored: Wed Nov 25 10:14:26 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 10:14:26 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index 4809c3c..872d7a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -162,6 +162,20 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina */ public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, @Nullable BinaryReaderHandles hnds) { +this(ctx, in, ldr, hnds, false); +} + +/** + * Constructor. + * + * @param ctx Context. + * @param in Input stream. + * @param ldr Class loader. + * @param hnds Context. + * @param skipHdrCheck Whether to skip header check. + */ +public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, +@Nullable BinaryReaderHandles hnds, boolean skipHdrCheck) { // Initialize base members. this.ctx = ctx; this.in = in; @@ -170,10 +184,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina start = in.position(); -byte hdr = in.readByte(); - // Perform full header parsing in case of portable object. -if (hdr == GridPortableMarshaller.OBJ) { +if (!skipHdrCheck && (in.readByte() == GridPortableMarshaller.OBJ)) { // Ensure protocol is fine. PortableUtils.checkProtocolVersion(in.readByte()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index 9a7f0df..7db752a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -177,7 +177,7 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @Override public BinaryRawReaderEx reader(PlatformInputStream in) { // TODO: IGNITE-1272 - Is class loader needed here? -return new BinaryReaderExImpl(marsh.context(), in, null); +return new BinaryReaderExImpl(marsh.context(), in, null, null, true); } /** {@inheritDoc} */
ignite git commit: IGNITE-1989 Updated scala dependencies.
Repository: ignite Updated Branches: refs/heads/ignite-1.5 c40ab677e -> ef2007dcb IGNITE-1989 Updated scala dependencies. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ef2007dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ef2007dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ef2007dc Branch: refs/heads/ignite-1.5 Commit: ef2007dcba0405a2f8921ce2b324b9e7036143ad Parents: c40ab67 Author: Alexey KuznetsovAuthored: Wed Nov 25 16:29:22 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:29:22 2015 +0700 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/examples/pom.xml -- diff --git a/examples/pom.xml b/examples/pom.xml index 5129e7f..52b152e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -124,7 +124,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/scalar/pom.xml -- diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml index 1443cc1..c8dce64 100644 --- a/modules/scalar/pom.xml +++ b/modules/scalar/pom.xml @@ -44,7 +44,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -72,7 +72,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/spark/pom.xml -- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml index 942652c..93c3e41 100644 --- a/modules/spark/pom.xml +++ b/modules/spark/pom.xml @@ -52,7 +52,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -89,7 +89,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/visor-console/pom.xml -- diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml index b85cd69..e514a0f 100644 --- a/modules/visor-console/pom.xml +++ b/modules/visor-console/pom.xml @@ -80,7 +80,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 2d3ff5f..a7ae644 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -36,7 +36,7 @@ fabric 2.4.1 -1.5.1 +1.5.2 4.1.0.RELEASE UTF-8 d
[1/2] ignite git commit: IGNITE-1989 Updated scala dependencies.
Repository: ignite Updated Branches: refs/heads/ignite-1956 fdb9d7321 -> 16f6fb263 IGNITE-1989 Updated scala dependencies. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ef2007dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ef2007dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ef2007dc Branch: refs/heads/ignite-1956 Commit: ef2007dcba0405a2f8921ce2b324b9e7036143ad Parents: c40ab67 Author: Alexey KuznetsovAuthored: Wed Nov 25 16:29:22 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:29:22 2015 +0700 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/examples/pom.xml -- diff --git a/examples/pom.xml b/examples/pom.xml index 5129e7f..52b152e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -124,7 +124,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/scalar/pom.xml -- diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml index 1443cc1..c8dce64 100644 --- a/modules/scalar/pom.xml +++ b/modules/scalar/pom.xml @@ -44,7 +44,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -72,7 +72,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/spark/pom.xml -- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml index 942652c..93c3e41 100644 --- a/modules/spark/pom.xml +++ b/modules/spark/pom.xml @@ -52,7 +52,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -89,7 +89,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/visor-console/pom.xml -- diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml index b85cd69..e514a0f 100644 --- a/modules/visor-console/pom.xml +++ b/modules/visor-console/pom.xml @@ -80,7 +80,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 2d3ff5f..a7ae644 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -36,7 +36,7 @@ fabric 2.4.1 -1.5.1 +1.5.2 4.1.0.RELEASE UTF-8 d
[2/2] ignite git commit: Merge branch 'ignite-1.5' into ignite-1956
Merge branch 'ignite-1.5' into ignite-1956 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/16f6fb26 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/16f6fb26 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/16f6fb26 Branch: refs/heads/ignite-1956 Commit: 16f6fb263249653e94dbdd69351453be03423c58 Parents: fdb9d73 ef2007d Author: vozerov-gridgainAuthored: Wed Nov 25 13:07:00 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 13:07:00 2015 +0300 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) --
ignite git commit: Ignite 1924
Repository: ignite Updated Branches: refs/heads/ignite-1924 732c96f9f -> 8802d6e5a Ignite 1924 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8802d6e5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8802d6e5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8802d6e5 Branch: refs/heads/ignite-1924 Commit: 8802d6e5a41af95597eb6eef570a76dedb98ba9e Parents: 732c96f Author: Anton VinogradovAuthored: Wed Nov 25 12:21:33 2015 +0300 Committer: Anton Vinogradov Committed: Wed Nov 25 12:21:33 2015 +0300 -- .../util/nio/GridTcpNioCommunicationClient.java| 13 - 1 file changed, 12 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8802d6e5/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java index 4022bc5..5b29573 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java @@ -25,6 +25,9 @@ import java.util.UUID; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.managers.communication.GridIoMessage; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage; import org.apache.ignite.internal.util.lang.IgniteInClosure2X; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; @@ -104,7 +107,7 @@ public class GridTcpNioCommunicationClient extends GridAbstractCommunicationClie } /** {@inheritDoc} */ -@Override public boolean sendMessage(@Nullable UUID nodeId, Message msg, IgniteInClosure closure) +@Override public boolean sendMessage(@Nullable UUID nodeId, final Message msg, IgniteInClosure closure) throws IgniteCheckedException { // Node ID is never provided in asynchronous send mode. assert nodeId == null; @@ -114,6 +117,14 @@ public class GridTcpNioCommunicationClient extends GridAbstractCommunicationClie GridNioFuture fut = ses.send(msg); +if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { +fut.listen(new IgniteInClosure () { +@Override public void apply(IgniteInternalFuture future) { +U.log(log, "C1>> " + ((GridIoMessage)msg).message()); +} +}); +} + if (fut.isDone()) { try { fut.get();
[3/3] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-sql-opt-2
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-sql-opt-2 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3eeeb8c2 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3eeeb8c2 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3eeeb8c2 Branch: refs/heads/ignite-sql-opt-2 Commit: 3eeeb8c2988feb23258fcbff5b616fbd6b1c8e7c Parents: 2a6514a ef2007d Author: sboikovAuthored: Wed Nov 25 13:19:48 2015 +0300 Committer: sboikov Committed: Wed Nov 25 13:19:48 2015 +0300 -- examples/pom.xml | 2 +- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 7 files changed, 23 insertions(+), 11 deletions(-) --
[1/3] ignite git commit: IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams.
Repository: ignite Updated Branches: refs/heads/ignite-sql-opt-2 2a6514a91 -> 3eeeb8c29 IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c40ab677 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c40ab677 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c40ab677 Branch: refs/heads/ignite-sql-opt-2 Commit: c40ab677e69f0d756281c62549cb2f63de907ed6 Parents: dafad52 Author: Pavel TupitsynAuthored: Wed Nov 25 10:14:26 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 10:14:26 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index 4809c3c..872d7a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -162,6 +162,20 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina */ public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, @Nullable BinaryReaderHandles hnds) { +this(ctx, in, ldr, hnds, false); +} + +/** + * Constructor. + * + * @param ctx Context. + * @param in Input stream. + * @param ldr Class loader. + * @param hnds Context. + * @param skipHdrCheck Whether to skip header check. + */ +public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, +@Nullable BinaryReaderHandles hnds, boolean skipHdrCheck) { // Initialize base members. this.ctx = ctx; this.in = in; @@ -170,10 +184,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina start = in.position(); -byte hdr = in.readByte(); - // Perform full header parsing in case of portable object. -if (hdr == GridPortableMarshaller.OBJ) { +if (!skipHdrCheck && (in.readByte() == GridPortableMarshaller.OBJ)) { // Ensure protocol is fine. PortableUtils.checkProtocolVersion(in.readByte()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index 9a7f0df..7db752a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -177,7 +177,7 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @Override public BinaryRawReaderEx reader(PlatformInputStream in) { // TODO: IGNITE-1272 - Is class loader needed here? -return new BinaryReaderExImpl(marsh.context(), in, null); +return new BinaryReaderExImpl(marsh.context(), in, null, null, true); } /** {@inheritDoc} */
[2/3] ignite git commit: IGNITE-1989 Updated scala dependencies.
IGNITE-1989 Updated scala dependencies. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ef2007dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ef2007dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ef2007dc Branch: refs/heads/ignite-sql-opt-2 Commit: ef2007dcba0405a2f8921ce2b324b9e7036143ad Parents: c40ab67 Author: Alexey KuznetsovAuthored: Wed Nov 25 16:29:22 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:29:22 2015 +0700 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/examples/pom.xml -- diff --git a/examples/pom.xml b/examples/pom.xml index 5129e7f..52b152e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -124,7 +124,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/scalar/pom.xml -- diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml index 1443cc1..c8dce64 100644 --- a/modules/scalar/pom.xml +++ b/modules/scalar/pom.xml @@ -44,7 +44,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -72,7 +72,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/spark/pom.xml -- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml index 942652c..93c3e41 100644 --- a/modules/spark/pom.xml +++ b/modules/spark/pom.xml @@ -52,7 +52,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -89,7 +89,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/visor-console/pom.xml -- diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml index b85cd69..e514a0f 100644 --- a/modules/visor-console/pom.xml +++ b/modules/visor-console/pom.xml @@ -80,7 +80,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 2d3ff5f..a7ae644 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -36,7 +36,7 @@ fabric 2.4.1 -1.5.1 +1.5.2 4.1.0.RELEASE UTF-8 d
ignite git commit: Ignite 1924
Repository: ignite Updated Branches: refs/heads/ignite-1924 45dd0f77c -> 732c96f9f Ignite 1924 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/732c96f9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/732c96f9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/732c96f9 Branch: refs/heads/ignite-1924 Commit: 732c96f9fcad2bfc03e03e29e125160725744d19 Parents: 45dd0f7 Author: Anton VinogradovAuthored: Wed Nov 25 11:30:52 2015 +0300 Committer: Anton Vinogradov Committed: Wed Nov 25 11:30:52 2015 +0300 -- .../apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/732c96f9/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java index 8c001e1..60b1fe9 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java @@ -1939,7 +1939,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { -U.log(log, "B1>> " + ((GridIoMessage)msg).message()); +U.log(log, "B1>> " + ((GridIoMessage)msg).message() + " "+ retry); } client.release();
ignite git commit: IGNITE-1956: More sensible error message.
Repository: ignite Updated Branches: refs/heads/ignite-1956 462f8e618 -> fdb9d7321 IGNITE-1956: More sensible error message. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fdb9d732 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fdb9d732 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fdb9d732 Branch: refs/heads/ignite-1956 Commit: fdb9d7321cb4cadde931965c02b9eaa63298feee Parents: 462f8e6 Author: vozerov-gridgainAuthored: Wed Nov 25 11:44:00 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 11:44:00 2015 +0300 -- .../apache/ignite/internal/portable/PortableUtils.java| 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/fdb9d732/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java index 0d79741..5b47cc7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java @@ -877,10 +877,12 @@ public class PortableUtils { // Check enum flag. if (oldMeta.isEnum() != newMeta.isEnum()) { -throw new BinaryObjectException( -"Binary type has different enum flags [" + "typeName=" + newMeta.typeName() + -", isEnum1=" + oldMeta.isEnum() + ", isEnum2=" + newMeta.isEnum() + ']' -); +if (oldMeta.isEnum()) +throw new BinaryObjectException("Binary type already registered as enum: " + +newMeta.typeName()); +else +throw new BinaryObjectException("Binary type already registered as non-enum: " + +newMeta.typeName()); } // Check and merge fields.
[1/6] ignite git commit: IGNITE-1988 - Exception for explicit lock inside a transaction
Repository: ignite Updated Branches: refs/heads/ignite-1990 1d3cf5aab -> dc8268ae4 IGNITE-1988 - Exception for explicit lock inside a transaction Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4d29cb7f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4d29cb7f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4d29cb7f Branch: refs/heads/ignite-1990 Commit: 4d29cb7f87aafa505807f4b10cddd0264cdac85f Parents: c23cda1 Author: Valentin KulichenkoAuthored: Tue Nov 24 16:23:05 2015 -0800 Committer: Valentin Kulichenko Committed: Tue Nov 24 16:23:05 2015 -0800 -- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- 3 files changed, 61 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4d29cb7f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java index 2e8dc9b..ae7b42e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java @@ -69,6 +69,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + delegate.lockAll(keys, 0); incrementLockCounter(); @@ -102,6 +104,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + boolean res = delegate.lockAll(keys, -1); if (res) @@ -128,6 +132,8 @@ class CacheLockImpl implements Lock { CacheOperationContext prev = gate.enter(opCtx); try { +checkTx(); + IgniteInternalFuture fut = delegate.lockAllAsync(keys, unit.toMillis(time)); try { @@ -198,8 +204,18 @@ class CacheLockImpl implements Lock { throw new UnsupportedOperationException(); } +/** + * Verifies there is no ongoing user transaction. + * + * @throws CacheException + */ +private void checkTx() throws CacheException { +if (delegate.context().tm().inUserTx()) +throw new CacheException("Explicit lock can't be acquired within a transaction."); +} + /** {@inheritDoc} */ @Override public String toString() { return S.toString(CacheLockImpl.class, this); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/4d29cb7f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java index 7e6ce89..ecdf641 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java @@ -296,10 +296,6 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture GridCacheMvccCandidate cand = cctx.mvcc().explicitLock(threadId, txKey); if (inTx()) { -IgniteTxEntry txEntry = tx.entry(txKey); - -txEntry.cached(entry); - if (cand != null) { if (!tx.implicit()) throw new IgniteCheckedException("Cannot access key within transaction if lock is " + @@ -308,6 +304,10 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture return null; } else { +IgniteTxEntry txEntry = tx.entry(txKey); + +txEntry.cached(entry); + // Check transaction entries (corresponding tx entries must be enlisted in transaction). cand = new GridCacheMvccCandidate(entry, cctx.localNodeId(),
[6/6] ignite git commit: IGNITE-1990 Added support for collecting new query and JDBC types metadata for Visor.
IGNITE-1990 Added support for collecting new query and JDBC types metadata for Visor. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dc8268ae Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dc8268ae Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dc8268ae Branch: refs/heads/ignite-1990 Commit: dc8268ae494b6a403f8de6ff2bc0234fe2e1d7be Parents: 8537a7d Author: Alexey KuznetsovAuthored: Wed Nov 25 18:31:16 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 18:31:16 2015 +0700 -- .../visor/cache/VisorCacheConfiguration.java| 4 +- .../cache/VisorCacheTypeFieldMetadata.java | 30 +++- .../visor/cache/VisorCacheTypeMetadata.java | 137 +-- 3 files changed, 149 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/dc8268ae/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index 073ad22..69eb311 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -138,7 +138,7 @@ public class VisorCacheConfiguration implements Serializable { maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations(); memoryMode = ccfg.getMemoryMode(); interceptor = compactClass(ccfg.getInterceptor()); -typeMeta = VisorCacheTypeMetadata.list(ccfg.getTypeMetadata()); +typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory(), ccfg.getTypeMetadata()); statisticsEnabled = ccfg.isStatisticsEnabled(); mgmtEnabled = ccfg.isManagementEnabled(); ldrFactory = compactClass(ccfg.getCacheLoaderFactory()); @@ -350,4 +350,4 @@ public class VisorCacheConfiguration implements Serializable { @Override public String toString() { return S.toString(VisorCacheConfiguration.class, this); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/dc8268ae/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java index c21354b..323e536 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java @@ -45,14 +45,30 @@ public class VisorCacheTypeFieldMetadata implements Serializable { * @return Data transfer object for given cache field metadata. */ public static VisorCacheTypeFieldMetadata from(CacheTypeFieldMetadata f) { -VisorCacheTypeFieldMetadata fieldMetadata = new VisorCacheTypeFieldMetadata(); +return new VisorCacheTypeFieldMetadata(f.getDatabaseName(), f.getDatabaseType(), +f.getJavaName(), U.compact(f.getJavaType().getName())); +} -fieldMetadata.dbName = f.getDatabaseName(); -fieldMetadata.dbType = f.getDatabaseType(); -fieldMetadata.javaName = f.getJavaName(); -fieldMetadata.javaType = U.compact(f.getJavaType().getName()); +/** + * Empty constructor. + */ +public VisorCacheTypeFieldMetadata() { +// No-op. +} -return fieldMetadata; +/** + * Full constructor. + * + * @param dbName Column name in database. + * @param dbType Column JDBC type in database. + * @param javaName Field name in java object. + * @param javaType Corresponding java type. + */ +public VisorCacheTypeFieldMetadata(String dbName, int dbType, String javaName, String javaType) { +this.dbName = dbName; +this.dbType = dbType; +this.javaName = javaName; +this.javaType = javaType; } /** @@ -82,4 +98,4 @@ public class VisorCacheTypeFieldMetadata implements Serializable { public String javaType() { return javaType; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/dc8268ae/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
ignite git commit: IGNITE-843 Minor fix.
Repository: ignite Updated Branches: refs/heads/ignite-843-rc1 f5da1605a -> 2f6de8a8e IGNITE-843 Minor fix. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2f6de8a8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2f6de8a8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2f6de8a8 Branch: refs/heads/ignite-843-rc1 Commit: 2f6de8a8ec1bae65c4abee06b9d4bce74acafca7 Parents: f5da160 Author: AndreyAuthored: Wed Nov 25 18:30:58 2015 +0700 Committer: Andrey Committed: Wed Nov 25 18:30:58 2015 +0700 -- .../src/main/js/controllers/models/caches.json | 12 .../src/main/js/gulpfile.js/tasks/copy.js | 1 + .../src/main/js/views/includes/controls.jade| 4 +--- 3 files changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6de8a8/modules/control-center-web/src/main/js/controllers/models/caches.json -- diff --git a/modules/control-center-web/src/main/js/controllers/models/caches.json b/modules/control-center-web/src/main/js/controllers/models/caches.json index 7c40aba..bf3e81e 100644 --- a/modules/control-center-web/src/main/js/controllers/models/caches.json +++ b/modules/control-center-web/src/main/js/controllers/models/caches.json @@ -159,12 +159,16 @@ "", " ONHEAP_TIERED - entries are cached on heap memory first", "", -" If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory. If offheap memory is disabled, then entry is simply discarded", -" If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space. If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory is disabled, then entry will be evicted directly from heap memory into swap", +" If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory", +" If offheap memory is disabled, then entry is simply discarded", +" If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space", +" If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory is disabled, then entry will be evicted directly from heap memory into swap", "", " ", -" OFFHEAP_TIERED - works the same as ONHEAP_TIERED, except that entries never end up in heap memory and get stored in offheap memory right away. Entries get cached in offheap memory first and then get evicted to swap, if one is configured", -" OFFHEAP_VALUES - entry keys will be stored on heap memory, and values will be stored in offheap memory. Note that in this mode entries can be evicted only to swap", +" OFFHEAP_TIERED - works the same as ONHEAP_TIERED, except that entries never end up in heap memory and get stored in offheap memory right away", +" Entries get cached in offheap memory first and then get evicted to swap, if one is configured", +" OFFHEAP_VALUES - entry keys will be stored on heap memory, and values will be stored in offheap memory", +" Note that in this mode entries can be evicted only to swap", "" ] }, http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6de8a8/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js -- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js index 04a144f..fb9dff5 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js @@ -34,6 +34,7 @@ var paths = [ var igniteModulePaths = [ igniteModules + '/**/main.js', igniteModules + '/**/controllers/*.js', +igniteModules + '/**/generator/*.js', igniteModules + '/**/controllers/models/*.json' ]; http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6de8a8/modules/control-center-web/src/main/js/views/includes/controls.jade -- diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade index ce9760b..ec78928 100644 --- a/modules/control-center-web/src/main/js/views/includes/controls.jade +++
[4/6] ignite git commit: IGNITE-1989 Updated scala dependencies.
IGNITE-1989 Updated scala dependencies. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ef2007dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ef2007dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ef2007dc Branch: refs/heads/ignite-1990 Commit: ef2007dcba0405a2f8921ce2b324b9e7036143ad Parents: c40ab67 Author: Alexey KuznetsovAuthored: Wed Nov 25 16:29:22 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:29:22 2015 +0700 -- examples/pom.xml | 2 +- modules/scalar/pom.xml| 4 ++-- modules/spark/pom.xml | 4 ++-- modules/visor-console/pom.xml | 2 +- parent/pom.xml| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/examples/pom.xml -- diff --git a/examples/pom.xml b/examples/pom.xml index 5129e7f..52b152e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -124,7 +124,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/scalar/pom.xml -- diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml index 1443cc1..c8dce64 100644 --- a/modules/scalar/pom.xml +++ b/modules/scalar/pom.xml @@ -44,7 +44,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -72,7 +72,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/spark/pom.xml -- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml index 942652c..93c3e41 100644 --- a/modules/spark/pom.xml +++ b/modules/spark/pom.xml @@ -52,7 +52,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 @@ -89,7 +89,7 @@ org.scalatest scalatest_2.11 -2.2.2 +2.2.4 test http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/modules/visor-console/pom.xml -- diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml index b85cd69..e514a0f 100644 --- a/modules/visor-console/pom.xml +++ b/modules/visor-console/pom.xml @@ -80,7 +80,7 @@ org.scala-lang scala-library -2.11.2 +2.11.7 http://git-wip-us.apache.org/repos/asf/ignite/blob/ef2007dc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 2d3ff5f..a7ae644 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -36,7 +36,7 @@ fabric 2.4.1 -1.5.1 +1.5.2 4.1.0.RELEASE UTF-8 d
[2/6] ignite git commit: Better exception message if Ignite is not started
Better exception message if Ignite is not started Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dafad526 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dafad526 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dafad526 Branch: refs/heads/ignite-1990 Commit: dafad526f84ecbf503135c7538ffef07dd5e1c4f Parents: 4d29cb7 Author: Valentin KulichenkoAuthored: Tue Nov 24 16:34:37 2015 -0800 Committer: Valentin Kulichenko Committed: Tue Nov 24 16:34:37 2015 -0800 -- .../main/java/org/apache/ignite/internal/IgnitionEx.java| 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/dafad526/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java index 7d2b2dc..6bd74be 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java @@ -1187,8 +1187,8 @@ public class IgnitionEx { Ignite res; if (grid == null || (res = grid.grid()) == null) -throw new IgniteIllegalStateException("Grid instance was not properly started " + -"or was already stopped: " + name); +throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + +"Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -1205,7 +1205,8 @@ public class IgnitionEx { IgniteKernal res; if (grid == null || (res = grid.gridx()) == null) -throw new IllegalStateException("Grid instance was not properly started or was already stopped: " + name); +throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + +"Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -2388,4 +2389,4 @@ public class IgnitionEx { } } } -} \ No newline at end of file +}
[3/6] ignite git commit: IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams.
IGNITE-1983 Platforms: fixed a problem with incorrect reader behavior for platform streams. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c40ab677 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c40ab677 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c40ab677 Branch: refs/heads/ignite-1990 Commit: c40ab677e69f0d756281c62549cb2f63de907ed6 Parents: dafad52 Author: Pavel TupitsynAuthored: Wed Nov 25 10:14:26 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 10:14:26 2015 +0300 -- .../internal/portable/BinaryReaderExImpl.java | 18 +++--- .../processors/platform/PlatformContextImpl.java | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index 4809c3c..872d7a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -162,6 +162,20 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina */ public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, @Nullable BinaryReaderHandles hnds) { +this(ctx, in, ldr, hnds, false); +} + +/** + * Constructor. + * + * @param ctx Context. + * @param in Input stream. + * @param ldr Class loader. + * @param hnds Context. + * @param skipHdrCheck Whether to skip header check. + */ +public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, +@Nullable BinaryReaderHandles hnds, boolean skipHdrCheck) { // Initialize base members. this.ctx = ctx; this.in = in; @@ -170,10 +184,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Bina start = in.position(); -byte hdr = in.readByte(); - // Perform full header parsing in case of portable object. -if (hdr == GridPortableMarshaller.OBJ) { +if (!skipHdrCheck && (in.readByte() == GridPortableMarshaller.OBJ)) { // Ensure protocol is fine. PortableUtils.checkProtocolVersion(in.readByte()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c40ab677/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index 9a7f0df..7db752a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -177,7 +177,7 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @Override public BinaryRawReaderEx reader(PlatformInputStream in) { // TODO: IGNITE-1272 - Is class loader needed here? -return new BinaryReaderExImpl(marsh.context(), in, null); +return new BinaryReaderExImpl(marsh.context(), in, null, null, true); } /** {@inheritDoc} */
[5/6] ignite git commit: Merge branches 'ignite-1.5' and 'ignite-1990' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1990
Merge branches 'ignite-1.5' and 'ignite-1990' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1990 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8537a7d1 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8537a7d1 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8537a7d1 Branch: refs/heads/ignite-1990 Commit: 8537a7d1ef62b813ca8cbb82624f95f06d3e519b Parents: 1d3cf5a ef2007d Author: Alexey KuznetsovAuthored: Wed Nov 25 16:40:03 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Nov 25 16:40:03 2015 +0700 -- examples/pom.xml| 2 +- .../org/apache/ignite/internal/IgnitionEx.java | 9 +++-- .../internal/portable/BinaryReaderExImpl.java | 18 +++-- .../processors/cache/CacheLockImpl.java | 18 - .../colocated/GridDhtColocatedLockFuture.java | 8 ++-- .../platform/PlatformContextImpl.java | 2 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 42 +++- modules/scalar/pom.xml | 4 +- modules/spark/pom.xml | 4 +- modules/visor-console/pom.xml | 2 +- parent/pom.xml | 2 +- 11 files changed, 89 insertions(+), 22 deletions(-) --
ignite git commit: IGNITE-1956: Let old .Net version works.
Repository: ignite Updated Branches: refs/heads/ignite-1956 16f6fb263 -> d623ed3f8 IGNITE-1956: Let old .Net version works. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d623ed3f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d623ed3f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d623ed3f Branch: refs/heads/ignite-1956 Commit: d623ed3f8ca5e54d9f50ed4dbaf8aba0120cde63 Parents: 16f6fb2 Author: vozerov-gridgainAuthored: Wed Nov 25 15:34:37 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 15:34:37 2015 +0300 -- .../dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs | 2 ++ modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs | 2 ++ 2 files changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d623ed3f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs index 3e9a28d..a1a5eec 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs @@ -125,6 +125,8 @@ namespace Apache.Ignite.Core.Impl.Binary.Metadata TypeName = reader.ReadString(); AffinityKeyFieldName = reader.ReadString(); _fields = reader.ReadDictionaryAsGeneric (); + +reader.ReadBoolean(); } /// http://git-wip-us.apache.org/repos/asf/ignite/blob/d623ed3f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs index 115f30d..aeca403 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs @@ -606,6 +606,8 @@ namespace Apache.Ignite.Core.Impl metaWriter.WriteString(field.Key); metaWriter.WriteInt(field.Value); } + +metaWriter.WriteBoolean(false); } _marsh.FinishMarshal(metaWriter);
ignite git commit: Ignite 1924
Repository: ignite Updated Branches: refs/heads/ignite-1924 8802d6e5a -> df6a0e2c6 Ignite 1924 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/df6a0e2c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/df6a0e2c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/df6a0e2c Branch: refs/heads/ignite-1924 Commit: df6a0e2c65744324ebac3b83ddf39deadb90e6b0 Parents: 8802d6e Author: Anton VinogradovAuthored: Wed Nov 25 14:00:47 2015 +0300 Committer: Anton Vinogradov Committed: Wed Nov 25 14:00:47 2015 +0300 -- .../ignite/internal/util/nio/GridTcpNioCommunicationClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/df6a0e2c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java index 5b29573..bf3e3e1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java @@ -119,8 +119,8 @@ public class GridTcpNioCommunicationClient extends GridAbstractCommunicationClie if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionDemandMessage) { fut.listen(new IgniteInClosure () { -@Override public void apply(IgniteInternalFuture future) { -U.log(log, "C1>> " + ((GridIoMessage)msg).message()); +@Override public void apply(final IgniteInternalFuture future) { +U.log(log, "C1>> " + ((GridIoMessage)msg).message() + " " +future); } }); }
ignite git commit: Check whether deferred update response affects performance.
Repository: ignite Updated Branches: refs/heads/ignite-no-deferred-res [created] 9f0d4988a Check whether deferred update response affects performance. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9f0d4988 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9f0d4988 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9f0d4988 Branch: refs/heads/ignite-no-deferred-res Commit: 9f0d4988a776afc1d556985d6162d0ab76ba99f3 Parents: ef2007d Author: Alexey GoncharukAuthored: Wed Nov 25 16:15:04 2015 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 25 16:15:04 2015 +0300 -- .../cache/distributed/dht/atomic/GridDhtAtomicCache.java | 4 ++-- .../cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/9f0d4988/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index cd76a56..c6fdf14 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -1311,7 +1311,7 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { res.returnValue(retVal); -if (dhtFut != null) +if (dhtFut != null && ctx.config().getWriteSynchronizationMode() == FULL_SYNC) ctx.mvcc().addAtomicFuture(dhtFut.version(), dhtFut); } else @@ -2701,7 +2701,7 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { ctx.io().send(nodeId, res, ctx.ioPolicy()); else { // No failed keys and sync mode is not FULL_SYNC, thus sending deferred response. -sendDeferredUpdateResponse(nodeId, req.futureVersion()); +//sendDeferredUpdateResponse(nodeId, req.futureVersion()); } } catch (ClusterTopologyCheckedException ignored) { http://git-wip-us.apache.org/repos/asf/ignite/blob/9f0d4988/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java index e31af19..2269110 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java @@ -349,7 +349,8 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter /** {@inheritDoc} */ @Override public boolean onDone(@Nullable Void res, @Nullable Throwable err) { if (super.onDone(res, err)) { -cctx.mvcc().removeAtomicFuture(version()); +if (cctx.config().getWriteSynchronizationMode() == FULL_SYNC) +cctx.mvcc().removeAtomicFuture(version()); if (err != null) { if (!mappings.isEmpty()) {
ignite git commit: ignite-sql-opt-2
Repository: ignite Updated Branches: refs/heads/ignite-sql-opt-2 6975e5623 -> 587fb9f06 ignite-sql-opt-2 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/587fb9f0 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/587fb9f0 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/587fb9f0 Branch: refs/heads/ignite-sql-opt-2 Commit: 587fb9f065e7f56f41d2a972eb51d44f17ef4298 Parents: 6975e56 Author: sboikovAuthored: Wed Nov 25 16:32:34 2015 +0300 Committer: sboikov Committed: Wed Nov 25 16:33:16 2015 +0300 -- .../ignite/internal/processors/query/h2/IgniteH2Indexing.java | 2 +- .../ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/587fb9f0/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 4f2ed2d..7c137d2 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 @@ -2233,7 +2233,7 @@ public class IgniteH2Indexing implements GridQueryIndexing { } preferSwapVal = schema.ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED; -snapshotableIdx = schema.ccfg.isSnapshotableIndex(); +snapshotableIdx = schema.ccfg.isSnapshotableIndex() || schema.offheap != null; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/587fb9f0/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java -- diff --git 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 index 2911520..28adeee 100644 --- 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 @@ -119,6 +119,8 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator(desc, desc, desc.memory(), desc.guard(), this) {
ignite git commit: test
Repository: ignite Updated Branches: refs/heads/ignite-sql-opt-2 587fb9f06 -> 7d6b1e910 test Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7d6b1e91 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7d6b1e91 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7d6b1e91 Branch: refs/heads/ignite-sql-opt-2 Commit: 7d6b1e9102bf1fbb37db9f911c6d7d6489e79ac5 Parents: 587fb9f Author: sboikovAuthored: Wed Nov 25 16:39:45 2015 +0300 Committer: sboikov Committed: Wed Nov 25 16:39:45 2015 +0300 -- .../processors/query/h2/opt/GridH2Table.java| 55 ++-- 1 file changed, 28 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7d6b1e91/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java -- diff --git 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 index df4d031..898925e 100644 --- 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 @@ -72,7 +72,7 @@ public class GridH2Table extends TableBase { private final ArrayList idxs; /** */ -private final ReadWriteLock lock; +//private final ReadWriteLock lock; /** */ private final Set sessions = Collections.newSetFromMap(new ConcurrentHashMap8 ()); @@ -105,7 +105,7 @@ public class GridH2Table extends TableBase { assert idxs != null; assert idxs.size() >= 1; -lock = new ReentrantReadWriteLock(); +//lock = new ReentrantReadWriteLock(); // Add scan index at 0 which is required by H2. idxs.add(0, new ScanIndex(index(0))); @@ -168,7 +168,7 @@ public class GridH2Table extends TableBase { GridUnsafeMemory mem = desc.memory(); -lock.readLock().lock(); +//lock.readLock().lock(); if (mem != null) desc.guard().begin(); @@ -187,7 +187,7 @@ public class GridH2Table extends TableBase { return true; } finally { -lock.readLock().unlock(); +//lock.readLock().unlock(); if (mem != null) desc.guard().end(); @@ -226,13 +226,14 @@ public class GridH2Table extends TableBase { return; } -try { -if (lock.writeLock().tryLock(waitTime, TimeUnit.MILLISECONDS)) -break; -} -catch (InterruptedException e) { -throw new IgniteException("Thread got interrupted while trying to acquire index lock.", e); -} +break; +//try { +//if (lock.writeLock().tryLock(waitTime, TimeUnit.MILLISECONDS)) +//break; +//} +//catch (InterruptedException e) { +//throw new IgniteException("Thread got interrupted while trying to acquire index lock.", e); +//} } boolean snapshoted = false; @@ -250,7 +251,7 @@ public class GridH2Table extends TableBase { } } finally { -lock.writeLock().unlock(); +//lock.writeLock().unlock(); } if (!snapshoted) { @@ -301,17 +302,17 @@ public class GridH2Table extends TableBase { * Closes table and releases resources. */ public void close() { -Lock l = lock.writeLock(); - -l.lock(); - -try { -for (int i = 1, len = idxs.size(); i < len; i++) -index(i).close(null); -} -finally { -l.unlock(); -} +//Lock l = lock.writeLock(); +// +//l.lock(); +// +//try { +//for (int i = 1, len = idxs.size(); i < len; i++) +//index(i).close(null); +//} +//finally { +//l.unlock(); +//} } /** @@ -367,7 +368,7 @@ public class GridH2Table extends TableBase { // getting updated from different threads with different rows with the same key is impossible. GridUnsafeMemory mem = desc == null ? null : desc.memory(); -lock.readLock().lock(); +//lock.readLock().lock(); if (mem != null) desc.guard().begin(); @@ -440,7 +441,7 @@ public class GridH2Table extends TableBase { return true; } finally { -
ignite git commit: Check whether deferred update response affects performance.
Repository: ignite Updated Branches: refs/heads/ignite-no-deferred-res 9f0d4988a -> 24cbb4964 Check whether deferred update response affects performance. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/24cbb496 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/24cbb496 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/24cbb496 Branch: refs/heads/ignite-no-deferred-res Commit: 24cbb49642309b7d062070f243014e040ba7708b Parents: 9f0d498 Author: Alexey GoncharukAuthored: Wed Nov 25 16:45:27 2015 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 25 16:45:27 2015 +0300 -- .../dht/atomic/GridDhtAtomicUpdateFuture.java | 177 --- 1 file changed, 111 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/24cbb496/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java index 2269110..b837dd2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java @@ -84,6 +84,9 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter @GridToStringInclude private final Map mappings; +/** */ +private GridDhtAtomicUpdateRequest singleReq; + /** Entries with readers. */ private Map nearReadersEntries; @@ -129,7 +132,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter log = U.logger(cctx.kernalContext(), logRef, GridDhtAtomicUpdateFuture.class); keys = new ArrayList<>(updateReq.keys().size()); -mappings = U.newHashMap(updateReq.keys().size()); +mappings = updateReq.keys().size() == 1 ? U. newHashMap(updateReq.keys().size()) : null; boolean topLocked = updateReq.topologyLocked() || (updateReq.fastMap() && !updateReq.clientRequest()); @@ -161,22 +164,39 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter private boolean registerResponse(UUID nodeId) { int resCnt0; -GridDhtAtomicUpdateRequest req = mappings.get(nodeId); +Map map = mappings; -if (req != null) { -synchronized (this) { -if (req.onResponse()) { -resCnt0 = resCnt; +if (map != null) { +GridDhtAtomicUpdateRequest req = map.get(nodeId); + +if (req != null) { +synchronized (this) { +if (req.onResponse()) { +resCnt0 = resCnt; -resCnt0 += 1; +resCnt0 += 1; -resCnt = resCnt0; +resCnt = resCnt0; +} +else +return false; } -else -return false; + +if (resCnt0 == map.size()) +onDone(); + +return true; } +} +else { +boolean done = false; -if (resCnt0 == mappings.size()) +synchronized (this) { +if (singleReq.onResponse()) +done = true; +} + +if (done) onDone(); return true; @@ -241,7 +261,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter UUID nodeId = node.id(); if (!nodeId.equals(cctx.localNodeId())) { -GridDhtAtomicUpdateRequest updateReq = mappings.get(nodeId); +GridDhtAtomicUpdateRequest updateReq = mappings == null ? singleReq : mappings.get(nodeId); if (updateReq == null) { updateReq = new GridDhtAtomicUpdateRequest( @@ -258,7 +278,10 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter cctx.deploymentEnabled(), this.updateReq.keepBinary()); -mappings.put(nodeId, updateReq); +if (mappings != null) +mappings.put(nodeId, updateReq); +
ignite git commit: IGNITE-1956: Fixed builder metadata propagation.
Repository: ignite Updated Branches: refs/heads/ignite-1956 d623ed3f8 -> d44f68dd8 IGNITE-1956: Fixed builder metadata propagation. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d44f68dd Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d44f68dd Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d44f68dd Branch: refs/heads/ignite-1956 Commit: d44f68dd8aee512e04f99c9d3c55bed23aa8fe3d Parents: d623ed3 Author: vozerov-gridgainAuthored: Wed Nov 25 16:49:58 2015 +0300 Committer: vozerov-gridgain Committed: Wed Nov 25 16:49:58 2015 +0300 -- .../builder/PortableBuilderSerializer.java | 10 ++- .../internal/portable/BinaryEnumsSelfTest.java | 65 2 files changed, 48 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d44f68dd/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderSerializer.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderSerializer.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderSerializer.java index 0e8eaa4..bb7da19 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderSerializer.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderSerializer.java @@ -18,8 +18,10 @@ package org.apache.ignite.internal.portable.builder; import org.apache.ignite.binary.BinaryObject; +import org.apache.ignite.internal.portable.BinaryMetadata; import org.apache.ignite.internal.portable.GridPortableMarshaller; import org.apache.ignite.internal.portable.BinaryObjectEx; +import org.apache.ignite.internal.portable.PortableContext; import org.apache.ignite.internal.portable.PortableUtils; import org.apache.ignite.internal.portable.BinaryWriterExImpl; import org.apache.ignite.internal.util.*; @@ -97,8 +99,14 @@ class PortableBuilderSerializer { } if (val.getClass().isEnum()) { +String typeName = PortableContext.typeName(val.getClass().getName()); +int typeId = writer.context().typeId(typeName); + +BinaryMetadata meta = new BinaryMetadata(typeId, typeName, null, null, null, true); +writer.context().updateMetadata(typeId, meta); + writer.writeByte(GridPortableMarshaller.ENUM); -writer.writeInt(writer.context().typeId(val.getClass().getName())); +writer.writeInt(typeId); writer.writeInt(((Enum)val).ordinal()); return; http://git-wip-us.apache.org/repos/asf/ignite/blob/d44f68dd/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java index 203f723..ad1d40b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java @@ -196,7 +196,7 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest { cache1.put(1, EnumType.ONE); -validateSimple(1, EnumType.ONE); +validateSimple(1, EnumType.ONE, registered); } /** @@ -210,7 +210,7 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest { cache1.put(1, new EnumHolder(EnumType.ONE)); -validateNested(1, EnumType.ONE); +validateNested(1, EnumType.ONE, registered); } /** @@ -224,16 +224,19 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest { BinaryObject obj = node1.binary().builder("EnumHolder").setField("val", EnumType.ONE).build(); +assert node1.binary().metadata("EnumHolder") != null; +assert node1.binary().metadata("EnumType") != null; + cacheBinary1.put(1, obj); -validateNested(1, EnumType.ONE); +validateNested(1, EnumType.ONE, registered); obj = (BinaryObject)cacheBinary1.get(1); obj = node1.binary().builder(obj).setField("val", EnumType.TWO).build(); cacheBinary1.put(1, obj); -validateNested(1, EnumType.TWO); +validateNested(1, EnumType.TWO, registered); } /** @@ -241,14 +244,17 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest { * * @param key Key. * @param val Value. + * @param registered Registered flag. *
ignite git commit: ignite-1282 - Fixing tests.
Repository: ignite Updated Branches: refs/heads/ignite-1282 9c1b7656a -> 809a44260 ignite-1282 - Fixing tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/809a4426 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/809a4426 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/809a4426 Branch: refs/heads/ignite-1282 Commit: 809a44260d10fb394767ebb1df66857c22cc8cbd Parents: 9c1b765 Author: Alexey GoncharukAuthored: Wed Nov 25 15:16:23 2015 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 25 15:16:23 2015 +0300 -- .../apache/ignite/cache/CacheTypeMetadata.java | 2 ++ .../processors/cache/GridCacheEventManager.java | 38 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/809a4426/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java index 2b7205b..76dea6a 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java @@ -33,7 +33,9 @@ import org.apache.ignite.lang.IgniteBiTuple; /** * Cache type metadata need for configuration of indexes or automatic persistence. + * @deprecated Use {@link org.apache.ignite.cache.QueryEntity} instead. */ +@Deprecated public class CacheTypeMetadata implements Serializable { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/ignite/blob/809a4426/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java index afca43b..7ff3a99 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java @@ -39,6 +39,9 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_STOPPED; * Cache event manager. */ public class GridCacheEventManager extends GridCacheManagerAdapter { +/** Force keep binary flag. Will be set if event notification encountered exception during unmarshalling. */ +private boolean forceKeepBinary; + /** * Adds local event listener. * @@ -262,6 +265,35 @@ public class GridCacheEventManager extends GridCacheManagerAdapter { "(try to increase topology history size configuration property of configured " + "discovery SPI): " + evtNodeId); +keepPortable = keepPortable || forceKeepBinary; + +Object key0; +Object val0; +Object oldVal0; + +try { +key0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(key, keepPortable, false); +val0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(newVal, keepPortable, false); +oldVal0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(oldVal, keepPortable, false); +} +catch (Exception e) { +if (!cctx.cacheObjectContext().processor().isPortableEnabled(cctx.config())) +throw e; + +if (log.isDebugEnabled()) +log.debug("Failed to unmarshall cache object value for the event notification: " + e); + +if (!forceKeepBinary) +LT.warn(log, null, "Failed to unmarshall cache object value for the event notification " + +"(all further notifications will keep binary object format)."); + +forceKeepBinary = true; + +key0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(key, true, false); +val0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(newVal, true, false); +oldVal0 = cctx.cacheObjectContext().unwrapPortableIfNeeded(oldVal, true, false); +} + cctx.gridEvents().record(new CacheEvent(cctx.name(), cctx.localNode(), evtNode, @@ -269,12 +301,12 @@ public class GridCacheEventManager extends GridCacheManagerAdapter { type, part, cctx.isNear(), -