Merge with master - WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2e55963e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2e55963e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2e55963e Branch: refs/heads/ignite-3477 Commit: 2e55963eb987f4fb24b716178f6408782b590f28 Parents: 100f9bb 41dddb8 Author: Ilya Lantukh <[email protected]> Authored: Thu Dec 22 15:50:58 2016 +0300 Committer: Ilya Lantukh <[email protected]> Committed: Thu Dec 22 15:50:58 2016 +0300 ---------------------------------------------------------------------- .gitignore | 1 + assembly/release-base.xml | 5 + bin/ignite.sh | 9 + config/dotnet/default-dotnet.xml | 45 + examples/pom-standalone.xml | 6 + modules/cassandra/pom.xml | 24 +- .../processors/cache/GridCacheAdapter.java | 748 +++++------ .../GridCachePartitionExchangeManager.java | 39 +- .../processors/cache/GridCacheProcessor.java | 2 +- .../processors/cache/GridCacheUtils.java | 10 +- .../processors/cache/IgniteCacheProxy.java | 8 - .../distributed/GridCacheTxRecoveryFuture.java | 4 +- .../GridDistributedTxFinishResponse.java | 6 - .../cache/distributed/dht/GridDhtGetFuture.java | 2 +- .../distributed/dht/GridDhtLockFuture.java | 4 +- .../distributed/dht/GridDhtTxFinishFuture.java | 74 +- .../cache/distributed/dht/GridDhtTxLocal.java | 125 +- .../distributed/dht/GridDhtTxLocalAdapter.java | 7 +- .../distributed/dht/GridDhtTxPrepareFuture.java | 4 +- .../dht/atomic/GridDhtAtomicCache.java | 448 ++++--- .../dht/colocated/GridDhtColocatedCache.java | 13 - .../colocated/GridDhtColocatedLockFuture.java | 4 +- .../GridDhtPartitionsExchangeFuture.java | 6 +- .../distributed/near/GridNearAtomicCache.java | 65 +- .../distributed/near/GridNearLockFuture.java | 4 +- ...arOptimisticSerializableTxPrepareFuture.java | 4 +- .../near/GridNearOptimisticTxPrepareFuture.java | 15 +- .../GridNearPessimisticTxPrepareFuture.java | 4 +- .../near/GridNearTxFinishFuture.java | 46 +- .../cache/distributed/near/GridNearTxLocal.java | 48 +- .../local/atomic/GridLocalAtomicCache.java | 177 +-- .../cache/store/CacheStoreManager.java | 4 +- .../store/GridCacheStoreManagerAdapter.java | 34 +- .../cache/store/GridCacheWriteBehindStore.java | 6 +- .../cache/transactions/IgniteTxHandler.java | 13 +- .../transactions/IgniteTxLocalAdapter.java | 30 +- .../cache/transactions/IgniteTxManager.java | 7 +- .../GridCacheAtomicSequenceImpl.java | 12 +- .../processors/hadoop/HadoopClassLoader.java | 11 + .../processors/hadoop/HadoopJobProperty.java | 16 +- .../processors/hadoop/HadoopTaskContext.java | 8 + .../io/PartiallyOffheapRawComparatorEx.java | 33 + .../cache/PlatformCacheEntryFilterImpl.java | 4 +- .../cache/PlatformCacheEntryProcessorImpl.java | 43 +- .../affinity/PlatformAffinityFunction.java | 52 +- .../callback/PlatformCallbackGateway.java | 266 ++-- .../platform/callback/PlatformCallbackOp.java | 206 +++ .../callback/PlatformCallbackUtils.java | 544 +------- .../platform/compute/PlatformAbstractJob.java | 2 +- .../platform/compute/PlatformAbstractTask.java | 15 +- .../platform/compute/PlatformClosureJob.java | 12 +- .../platform/compute/PlatformFullJob.java | 15 +- .../platform/compute/PlatformFullTask.java | 18 +- .../PlatformStreamReceiverImpl.java | 3 + .../dotnet/PlatformDotNetCacheStore.java | 6 +- .../services/PlatformAbstractService.java | 25 +- .../platform/utils/PlatformFutureUtils.java | 4 +- .../platform/utils/PlatformUtils.java | 8 +- .../util/future/GridCompoundFuture.java | 56 +- .../ignite/spi/discovery/tcp/ServerImpl.java | 2 +- .../spi/discovery/tcp/TcpDiscoverySpi.java | 14 +- .../GridCacheMissingCommitVersionSelfTest.java | 6 +- .../IgniteTxStoreExceptionAbstractSelfTest.java | 1 + ...achePartitionedAtomicSequenceTxSelfTest.java | 169 +++ .../CacheLockReleaseNodeLeaveTest.java | 135 ++ ...nabledMultiNodeLongTxTimeoutFullApiTest.java | 2 +- ...achePartitionedMultiNodeFullApiSelfTest.java | 37 +- ...lockMessageSystemPoolStarvationSelfTest.java | 14 +- .../IgniteCacheDataStructuresSelfTestSuite.java | 2 + modules/hadoop/pom.xml | 7 + .../hadoop/io/PartiallyRawComparator.java | 33 + .../org/apache/ignite/hadoop/io/RawMemory.java | 86 ++ .../hadoop/io/TextPartiallyRawComparator.java | 115 ++ .../apache/ignite/hadoop/io/package-info.java | 22 + .../IgniteHadoopClientProtocolProvider.java | 70 +- .../hadoop/impl/fs/HadoopFileSystemsUtils.java | 11 + .../hadoop/impl/proto/HadoopClientProtocol.java | 55 +- ...DelegatingPartiallyOffheapRawComparator.java | 54 + .../processors/hadoop/impl/v2/HadoopV2Job.java | 22 +- .../impl/v2/HadoopV2JobResourceManager.java | 25 +- .../hadoop/impl/v2/HadoopV2TaskContext.java | 21 + .../processors/hadoop/io/OffheapRawMemory.java | 131 ++ .../hadoop/mapreduce/MapReduceClient.java | 147 +++ .../hadoop/shuffle/HadoopShuffleJob.java | 2 +- .../shuffle/collections/HadoopMultimapBase.java | 5 +- .../shuffle/collections/HadoopSkipList.java | 14 +- .../hadoop/impl/HadoopAbstractSelfTest.java | 13 +- .../impl/HadoopAbstractWordCountTest.java | 6 +- .../hadoop/impl/HadoopFileSystemsTest.java | 9 + .../hadoop/impl/HadoopJobTrackerSelfTest.java | 4 +- .../impl/HadoopTaskExecutionSelfTest.java | 4 +- .../hadoop/impl/HadoopTeraSortTest.java | 383 ++++++ ...opClientProtocolMultipleServersSelfTest.java | 93 +- .../client/HadoopClientProtocolSelfTest.java | 232 ++-- .../collections/HadoopAbstractMapTest.java | 6 + .../collections/HadoopSkipListSelfTest.java | 14 +- .../HadoopExternalTaskExecutionSelfTest.java | 2 + .../testsuites/IgniteHadoopTestSuite.java | 3 + .../cache/IgniteCacheLargeResultSelfTest.java | 15 +- .../IgniteCacheQuerySelfTestSuite.java | 130 +- .../IgniteCacheQuerySelfTestSuite2.java | 111 +- .../IgniteH2IndexingSpiTestSuite.java | 16 +- .../include/ignite/binary/binary_raw_reader.h | 21 + .../ignite/impl/binary/binary_reader_impl.h | 9 +- .../src/impl/binary/binary_reader_impl.cpp | 17 + .../platforms/cpp/common/include/Makefile.am | 5 +- .../common/include/ignite/common/concurrent.h | 90 +- .../include/ignite/common/reference_impl.h | 286 ++++ .../cpp/common/include/ignite/reference.h | 564 ++++++++ .../cpp/common/project/vs/common.vcxproj | 2 + .../common/project/vs/common.vcxproj.filters | 6 + modules/platforms/cpp/core-test/Makefile.am | 7 +- .../core-test/config/cache-query-continuous.xml | 87 ++ .../cpp/core-test/config/cache-test.xml | 1 + .../platforms/cpp/core-test/config/invalid.xml | 39 + .../cpp/core-test/project/vs/core-test.vcxproj | 13 +- .../project/vs/core-test.vcxproj.filters | 11 +- .../cpp/core-test/src/cache_query_test.cpp | 76 +- .../cpp/core-test/src/continuous_query_test.cpp | 611 +++++++++ .../cpp/core-test/src/handle_registry_test.cpp | 18 +- .../cpp/core-test/src/interop_test.cpp | 17 +- .../cpp/core-test/src/reference_test.cpp | 412 ++++++ modules/platforms/cpp/core/Makefile.am | 1 + .../cpp/core/include/ignite/cache/cache.h | 104 +- .../cpp/core/include/ignite/cache/cache_entry.h | 40 +- .../ignite/cache/event/cache_entry_event.h | 139 ++ .../cache/event/cache_entry_event_listener.h | 71 + .../cache/query/continuous/continuous_query.h | 239 ++++ .../query/continuous/continuous_query_handle.h | 133 ++ .../core/include/ignite/impl/cache/cache_impl.h | 116 +- .../continuous/continuous_query_handle_impl.h | 101 ++ .../query/continuous/continuous_query_impl.h | 351 +++++ .../core/include/ignite/impl/handle_registry.h | 62 +- .../include/ignite/impl/ignite_environment.h | 34 +- modules/platforms/cpp/core/namespaces.dox | 74 +- .../platforms/cpp/core/project/vs/core.vcxproj | 7 + .../cpp/core/project/vs/core.vcxproj.filters | 30 + modules/platforms/cpp/core/src/ignition.cpp | 15 +- .../cpp/core/src/impl/cache/cache_impl.cpp | 31 + .../continuous/continuous_query_handle_impl.cpp | 96 ++ .../cpp/core/src/impl/handle_registry.cpp | 102 +- .../cpp/core/src/impl/ignite_environment.cpp | 146 ++- modules/platforms/cpp/examples/Makefile.am | 1 + modules/platforms/cpp/examples/configure.ac | 1 + .../continuous-query-example/Makefile.am | 58 + .../config/continuous-query-example.xml | 52 + .../project/vs/continuous-query-example.vcxproj | 110 ++ .../vs/continuous-query-example.vcxproj.filters | 35 + .../src/continuous_query_example.cpp | 142 ++ .../examples/include/ignite/examples/person.h | 2 +- .../cpp/examples/project/vs/ignite-examples.sln | 6 + .../platforms/cpp/jni/include/ignite/jni/java.h | 87 +- modules/platforms/cpp/jni/project/vs/module.def | 4 +- modules/platforms/cpp/jni/src/java.cpp | 343 +---- .../cpp/odbc-test/config/queries-test.xml | 37 + .../platforms/cpp/odbc-test/include/Makefile.am | 1 + .../cpp/odbc-test/include/complex_type.h | 122 ++ .../cpp/odbc-test/project/vs/odbc-test.vcxproj | 5 +- .../project/vs/odbc-test.vcxproj.filters | 3 + .../cpp/odbc-test/src/queries_test.cpp | 101 +- modules/platforms/cpp/odbc/src/column.cpp | 41 +- modules/platforms/cpp/odbc/src/type_traits.cpp | 3 + modules/platforms/cpp/project/vs/ignite.slnrel | 3 + .../platforms/cpp/project/vs/ignite_x86.slnrel | 3 + .../Cache/Query/CacheLinqTest.cs | 21 +- .../Query/CacheQueriesCodeConfigurationTest.cs | 17 +- .../Cache/Query/CacheQueriesTest.cs | 8 + .../Services/ServicesTest.cs | 3 +- .../Apache.Ignite.Core.Tests/TestUtils.cs | 3 +- .../Apache.Ignite.Core.csproj | 1 + .../dotnet/Apache.Ignite.Core/Binary/IBinary.cs | 3 +- .../Apache.Ignite.Core/Cache/Query/QueryBase.cs | 15 +- .../Impl/Binary/BinaryUtils.cs | 16 + .../Impl/Binary/Io/BinaryStreamBase.cs | 4 +- .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 29 +- .../Impl/Compute/ComputeTaskHolder.cs | 14 +- .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs | 79 +- .../Impl/Unmanaged/UnmanagedCallbackOp.cs | 86 ++ .../Impl/Unmanaged/UnmanagedCallbacks.cs | 1229 +++++++++--------- .../Impl/CacheQueryExpressionVisitor.cs | 12 +- .../Apache.Ignite.Linq/Impl/MethodVisitor.cs | 34 +- modules/platforms/dotnet/Apache.Ignite.sln | 2 + modules/platforms/dotnet/DEVNOTES.txt | 12 +- modules/platforms/dotnet/build.bat | 14 + modules/platforms/dotnet/build.ps1 | 211 +++ .../yardstick/IgniteAbstractBenchmark.java | 30 + .../yardstick/IgniteBenchmarkArguments.java | 11 + .../ignite/yardstick/IgniteBenchmarkUtils.java | 42 +- .../apache/ignite/yardstick/PreloadLogger.java | 155 +++ .../IgniteCacheRandomOperationBenchmark.java | 22 +- 190 files changed, 9267 insertions(+), 3803 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 4c62371,74d1553..b89d618 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@@ -487,8 -467,8 +472,8 @@@ public abstract class GridCacheAdapter< } /** {@inheritDoc} */ - @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { + @Override public final GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { - CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null, false, null); + CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null, false, null, false); return new GridCacheProxyImpl<>(ctx, this, opCtx); } @@@ -499,15 -479,15 +484,15 @@@ } /** {@inheritDoc} */ - @Override public GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) { + @Override public final GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) { - CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null, false, null); + CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null, false, null, false); return new GridCacheProxyImpl<>(ctx, this, opCtx); } /** {@inheritDoc} */ - @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() { + @Override public final <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() { - CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null, false, null); + CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null, false, null, false); return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)this, opCtx); } @@@ -529,8 -509,8 +514,8 @@@ } /** {@inheritDoc} */ - @Override public IgniteInternalCache<K, V> withNoRetries() { + @Override public final IgniteInternalCache<K, V> withNoRetries() { - CacheOperationContext opCtx = new CacheOperationContext(false, null, false, null, true, null); + CacheOperationContext opCtx = new CacheOperationContext(false, null, false, null, true, null, false); return new GridCacheProxyImpl<>(ctx, this, opCtx); } @@@ -635,9 -615,9 +620,9 @@@ } /** {@inheritDoc} */ - @Override public boolean isEmpty() { + @Override public final boolean isEmpty() { try { - return localSize(CachePeekModes.ONHEAP_ONLY) == 0; + return localSize(null) == 0; } catch (IgniteCheckedException e) { throw new IgniteException(e); @@@ -682,11 -662,9 +667,11 @@@ } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<Boolean> containsKeysAsync(final Collection<? extends K> keys) { + @Override public final IgniteInternalFuture<Boolean> containsKeysAsync(final Collection<? extends K> keys) { A.notNull(keys, "keys"); + CacheOperationContext opCtx = ctx.operationContextPerCall(); + return getAllAsync( keys, /*force primary*/false, @@@ -1029,13 -997,8 +1014,13 @@@ return entrySet((CacheEntryPredicate[])null); } - /** {@inheritDoc} */ + /** - * Gets entry set containing internal entries. - * - * @param filter Filter. - * @return Entry set. - */ - private Set<Cache.Entry<K, V>> entrySetx(final CacheEntryPredicate... filter) { ++ * Gets entry set containing internal entries. ++ * ++ * @param filter Filter. ++ * @return Entry set. ++ */ + @Override public final Set<Cache.Entry<K, V>> entrySetx(final CacheEntryPredicate... filter) { boolean keepBinary = ctx.keepBinary(); return new EntrySet(map.entrySet(filter), keepBinary); @@@ -1333,19 -1296,9 +1318,19 @@@ } /** {@inheritDoc} */ + @Override public Collection<Integer> lostPartitions() { + if (isLocal()) + return Collections.emptyList(); + + return ctx.topology().lostPartitions(); + } + + /** {@inheritDoc} */ - @Override public V getForcePrimary(K key) throws IgniteCheckedException { + @Override public final V getForcePrimary(K key) throws IgniteCheckedException { String taskName = ctx.kernalContext().job().currentTaskName(); + CacheOperationContext opCtx = ctx.operationContextPerCall(); + return getAllAsync( F.asList(key), /*force primary*/true, @@@ -1361,11 -1313,9 +1346,11 @@@ } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<V> getForcePrimaryAsync(final K key) { + @Override public final IgniteInternalFuture<V> getForcePrimaryAsync(final K key) { String taskName = ctx.kernalContext().job().currentTaskName(); + CacheOperationContext opCtx = ctx.operationContextPerCall(); + return getAllAsync( Collections.singletonList(key), /*force primary*/true, @@@ -1384,11 -1334,9 +1369,11 @@@ } /** {@inheritDoc} */ - @Override public V getTopologySafe(K key) throws IgniteCheckedException { - public final V getTopologySafe(K key) throws IgniteCheckedException { ++ @Override public final V getTopologySafe(K key) throws IgniteCheckedException { String taskName = ctx.kernalContext().job().currentTaskName(); + CacheOperationContext opCtx = ctx.operationContextPerCall(); + return getAllAsync( F.asList(key), /*force primary*/false, @@@ -1409,32 -1356,20 +1394,23 @@@ } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) { + @Override public final IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) { String taskName = ctx.kernalContext().job().currentTaskName(); + CacheOperationContext opCtx = ctx.operationContextPerCall(); + return getAllAsync(keys, !ctx.config().isReadFromBackup(), /*skip tx*/true, null, taskName, - !ctx.keepBinary(), - /*skip values*/false, - /*can remap*/true, - false); + !(opCtx != null && opCtx.isKeepBinary()), + opCtx != null && opCtx.recovery(), + /*skip values*/ + /*can remap*/false, + true, false); } - /** - * @param key Key. - * @param topVer Topology version. - * @return Entry. - */ - @Nullable protected GridCacheEntryEx entryExSafe(KeyCacheObject key, AffinityTopologyVersion topVer) { - return entryEx(key); - } - /** {@inheritDoc} */ @Nullable @Override public V get(K key) throws IgniteCheckedException { A.notNull(key, "key"); http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index 27bc542,ef8c994e..15c060a --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@@ -58,8 -56,8 +58,9 @@@ import org.apache.ignite.internal.Ignit import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; import org.apache.ignite.internal.events.DiscoveryCustomEvent; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; +import org.apache.ignite.internal.pagemem.backup.StartFullBackupAckDiscoveryMessage; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; + import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache; import org.apache.ignite.internal.processors.cache.distributed.dht.GridClientPartitionTopology; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopology; @@@ -884,25 -853,30 +885,31 @@@ public class GridCachePartitionExchange ready = cacheCtx.started(); if (ready) { - GridDhtPartitionFullMap locMap = cacheCtx.topology().partitionMap(true); + GridAffinityAssignmentCache affCache = cacheCtx.affinity().affinityCache(); - if (useOldApi) { - locMap = new GridDhtPartitionFullMap(locMap.nodeId(), - locMap.nodeOrder(), - locMap.updateSequence(), - locMap, - true); - } + if (affCache != null) { + GridDhtPartitionFullMap locMap = cacheCtx.topology().partitionMap(true); - addFullPartitionsMap(m, - dupData, - compress, - cacheCtx.cacheId(), - locMap, - cacheCtx.affinity().affinityCache().similarAffinityKey()); + if (useOldApi) { + locMap = new GridDhtPartitionFullMap(locMap.nodeId(), + locMap.nodeOrder(), + locMap.updateSequence(), - locMap); ++ locMap, ++ true); + } - if (exchId != null) - m.addPartitionUpdateCounters(cacheCtx.cacheId(), cacheCtx.topology().updateCounters(true)); + addFullPartitionsMap(m, + dupData, + compress, + cacheCtx.cacheId(), + locMap, + affCache.similarAffinityKey()); + + if (exchId != null) + m.addPartitionUpdateCounters(cacheCtx.cacheId(), cacheCtx.topology().updateCounters(true)); + } + else + assert cctx.cacheContext(cacheCtx.cacheId()) == null : cacheCtx.name(); } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 0119afa,9487589..58fe61d mode 100644,100755..100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/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/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/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/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index be32767,07b9dad..2f2706e --- 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 @@@ -461,7 -468,8 +466,7 @@@ public class GridDhtAtomicCache<K, V> e } /** {@inheritDoc} */ - @Nullable @Override public V get(K key, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException { - @Override protected V get0(K key, String taskName, boolean deserializeBinary, boolean needVer) - throws IgniteCheckedException { ++ @Nullable @Override public V get0(K key, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException { ctx.checkSecurity(SecurityPermission.CACHE_READ); if (keyCheck) @@@ -554,6 -571,43 +574,44 @@@ final boolean canRemap, final boolean needVer ) { + return getAllAsyncInternal(keys, + forcePrimary, + skipTx, + subjId, + taskName, + deserializeBinary, + skipVals, + canRemap, + needVer, + true); + } + + /** + * @param keys Keys. + * @param forcePrimary Force primary flag. + * @param skipTx Skip tx flag. + * @param subjId Subject ID. + * @param taskName Task name. + * @param deserializeBinary Deserialize binary flag. + * @param skipVals Skip values flag. + * @param canRemap Can remap flag. + * @param needVer Need version flag. + * @param asyncOp Async operation flag. + * @return Future. + */ + private IgniteInternalFuture<Map<K, V>> getAllAsyncInternal( + @Nullable final Collection<? extends K> keys, + final boolean forcePrimary, + boolean skipTx, + @Nullable UUID subjId, + final String taskName, + final boolean deserializeBinary, ++ final boolean recovery, + final boolean skipVals, + final boolean canRemap, + final boolean needVer, + boolean asyncOp + ) { ctx.checkSecurity(SecurityPermission.CACHE_READ); if (F.isEmpty(keys)) @@@ -572,21 -626,34 +630,34 @@@ final boolean skipStore = opCtx != null && opCtx.skipStore(); - return asyncOp(new CO<IgniteInternalFuture<Map<K, V>>>() { - if (asyncOp) { - return asyncOp(new CO<IgniteInternalFuture<Map<K, V>>>() { - @Override public IgniteInternalFuture<Map<K, V>> apply() { - return getAllAsync0(ctx.cacheKeysView(keys), - forcePrimary, - subjId0, - taskName, - deserializeBinary, - expiryPlc, - skipVals, - skipStore, - canRemap, - needVer); - } - }); - } ++ if (asyncOp) {return asyncOp(new CO<IgniteInternalFuture<Map<K, V>>>() { + @Override public IgniteInternalFuture<Map<K, V>> apply() { + return getAllAsync0(ctx.cacheKeysView(keys), + forcePrimary, + subjId0, + taskName, + deserializeBinary, + recovery, + expiryPlc, + skipVals, + skipStore, + canRemap, + needVer); + } - }); ++ });} + else { + return getAllAsync0(ctx.cacheKeysView(keys), + forcePrimary, + subjId0, + taskName, + deserializeBinary, ++ recovery, + expiryPlc, + skipVals, + skipStore, + canRemap, + needVer); + } } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java index f1ff668,a26d2f3..7aaa476 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java @@@ -399,12 -295,15 +295,14 @@@ public class GridLocalAtomicCache<K, V } /** {@inheritDoc} */ - @SuppressWarnings("unchecked") - @Override @Nullable public V get(K key, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException { - String taskName = ctx.kernalContext().job().currentTaskName(); - + @Override protected V get0( + final K key, + String taskName, + boolean deserializeBinary, + boolean needVer) throws IgniteCheckedException + { Map<K, V> m = getAllInternal(Collections.singleton(key), - ctx.isSwapOrOffheapEnabled(), ctx.readThrough(), taskName, deserializeBinary, http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/CacheStoreManager.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java index 18e40bb,8b93afa..253197d --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java @@@ -555,7 -554,7 +555,7 @@@ public abstract class GridCacheStoreMan } /** {@inheritDoc} */ - @Override public boolean put(@Nullable IgniteInternalTx tx, KeyCacheObject key, CacheObject val, GridCacheVersion ver) - @Override public final boolean put(@Nullable IgniteInternalTx tx, Object key, Object val, GridCacheVersion ver) ++ @Override public final boolean put(@Nullable IgniteInternalTx tx, KeyCacheObject key, CacheObject val, GridCacheVersion ver) throws IgniteCheckedException { if (store != null) { // Never persist internal keys. @@@ -600,10 -599,7 +600,10 @@@ } /** {@inheritDoc} */ - @Override public boolean putAll( - @Override public final boolean putAll(@Nullable IgniteInternalTx tx, Map map) throws IgniteCheckedException { ++ @Override public final boolean putAll( + @Nullable IgniteInternalTx tx, + Map<? extends KeyCacheObject, IgniteBiTuple<? extends CacheObject, GridCacheVersion>> map + ) throws IgniteCheckedException { if (F.isEmpty(map)) return true; @@@ -662,7 -658,7 +662,7 @@@ } /** {@inheritDoc} */ - @Override public boolean remove(@Nullable IgniteInternalTx tx, KeyCacheObject key) throws IgniteCheckedException { - @Override public final boolean remove(@Nullable IgniteInternalTx tx, Object key) throws IgniteCheckedException { ++ @Override public final boolean remove(@Nullable IgniteInternalTx tx, KeyCacheObject key) throws IgniteCheckedException { if (store != null) { // Never remove internal key from store as it is never persisted. if (key instanceof GridCacheInternal) @@@ -705,10 -701,7 +705,10 @@@ } /** {@inheritDoc} */ - @Override public boolean removeAll( - @Override public final boolean removeAll(@Nullable IgniteInternalTx tx, Collection keys) throws IgniteCheckedException { ++ @Override public final boolean removeAll( + @Nullable IgniteInternalTx tx, + Collection<? extends KeyCacheObject> keys + ) throws IgniteCheckedException { if (F.isEmpty(keys)) return true; http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java ---------------------------------------------------------------------- diff --cc modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java index babd332,1e98eb5..b48d253 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java @@@ -43,13 -58,11 +58,12 @@@ import org.apache.ignite.internal.proce import org.apache.ignite.internal.processors.cache.IgniteCacheJoinQueryWithAffinityKeyTest; import org.apache.ignite.internal.processors.cache.IgniteCacheLargeResultSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheMergeSqlQuerySelfTest; +import org.apache.ignite.internal.processors.cache.IgniteCacheMultipleIndexedTypesTest; + import org.apache.ignite.internal.processors.cache.IgniteCacheNoClassQuerySelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapEvictQueryTest; import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapIndexScanTest; - import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest; - import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest; + import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest; import org.apache.ignite.internal.processors.cache.IgniteCachePrimitiveFieldsQuerySelfTest; - import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheQueryH2IndexingLeakTest; import org.apache.ignite.internal.processors.cache.IgniteCacheQueryIndexSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheQueryLoadSelfTest; @@@ -166,8 -187,58 +188,60 @@@ public class IgniteCacheQuerySelfTestSu suite.addTestSuite(IndexingSpiQuerySelfTest.class); suite.addTestSuite(IndexingSpiQueryTxSelfTest.class); + suite.addTestSuite(IgniteCacheMultipleIndexedTypesTest.class); + + // Fields queries. + suite.addTestSuite(SqlFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCacheReplicatedFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class); + suite.addTestSuite(IgniteCachePartitionedFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCacheAtomicFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class); + suite.addTestSuite(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class); + suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class); + + suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class); + + suite.addTestSuite(GridCacheSwapScanQuerySelfTest.class); + + suite.addTestSuite(GridOrderedMessageCancelSelfTest.class); + + suite.addTestSuite(CacheQueryOffheapEvictDataLostTest.class); + + // Ignite cache and H2 comparison. + suite.addTestSuite(BaseH2CompareQueryTest.class); + suite.addTestSuite(H2CompareBigQueryTest.class); + + // Cache query metrics. + suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class); + suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class); + suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class); + suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class); + suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class); + + // Cache query metrics. + suite.addTestSuite(CacheLocalQueryDetailMetricsSelfTest.class); + suite.addTestSuite(CachePartitionedQueryDetailMetricsDistributedSelfTest.class); + suite.addTestSuite(CachePartitionedQueryDetailMetricsLocalSelfTest.class); + suite.addTestSuite(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class); + suite.addTestSuite(CacheReplicatedQueryDetailMetricsLocalSelfTest.class); + + // Unmarshalling query test. + suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class); + suite.addTestSuite(IgniteCacheNoClassQuerySelfTest.class); + + // Cancellation. + + suite.addTestSuite(IgniteCacheDistributedQueryCancelSelfTest.class); + suite.addTestSuite(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class); + suite.addTestSuite(IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.class); + + // Other. + suite.addTestSuite(CacheQueryNewClientSelfTest.class); + suite.addTestSuite(CacheOffheapBatchIndexingSingleTypeTest.class); + suite.addTestSuite(CacheSqlQueryValueCopySelfTest.class); + return suite; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2e55963e/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java ----------------------------------------------------------------------
