You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2017/01/16 15:21:38 UTC
[12/12] ignite git commit: merge from master
merge from master
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ecd727c4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ecd727c4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ecd727c4
Branch: refs/heads/ignite-comm-balance-master
Commit: ecd727c4df9d9f53ece4a24182d964102e2c1508
Parents: 18229e8 b7908d7
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jan 16 18:21:10 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jan 16 18:21:10 2017 +0300
----------------------------------------------------------------------
.../ignite/cache/query/SqlFieldsQuery.java | 6 +
.../store/jdbc/dialect/BasicJdbcDialect.java | 31 +-
.../GridClientConnectionManagerAdapter.java | 7 +-
.../impl/connection/GridClientTopology.java | 53 +++-
.../GridNearAtomicAbstractUpdateFuture.java | 34 ++-
.../GridNearAtomicSingleUpdateFuture.java | 48 ++-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 61 ++--
.../IgniteCacheObjectProcessorImpl.java | 5 +-
.../utils/PlatformConfigurationUtils.java | 128 +++++++-
.../processors/query/GridQueryProcessor.java | 2 +-
.../store/jdbc/CacheJdbcPojoStoreTest.java | 48 ++-
.../ignite/cache/store/jdbc/model/Person.java | 2 +-
.../cache/CacheEntryProcessorCopySelfTest.java | 6 +-
.../cache/GridCacheBasicStoreAbstractTest.java | 2 +-
.../GridCacheDhtEvictionsDisabledSelfTest.java | 5 +-
.../AtomicPutAllChangingTopologyTest.java | 212 +++++++++++++
.../IgniteCacheFailoverTestSuite.java | 3 +
.../apache/ignite/stream/flume/IgniteSink.java | 7 +-
.../hadoop/impl/v2/HadoopV2TaskContext.java | 7 -
...niteCacheAbstractInsertSqlQuerySelfTest.java | 14 +-
.../IgniteCacheAbstractSqlDmlQuerySelfTest.java | 6 +-
.../IgniteCacheInsertSqlQuerySelfTest.java | 18 +-
.../cache/IgniteCacheMergeSqlQuerySelfTest.java | 14 +-
.../IgniteCacheUpdateSqlQuerySelfTest.java | 4 +-
.../Apache.Ignite.Core.Tests.csproj | 3 +
.../Binary/BinaryBuilderSelfTest.cs | 159 ++++++----
.../BinaryBuilderSelfTestArrayIdentity.cs | 34 +++
.../Binary/BinaryEqualityComparerTest.cs | 279 +++++++++++++++++
.../Binary/IO/BinaryStreamsTest.cs | 19 ++
.../Cache/CacheConfigurationTest.cs | 5 +-
.../Cache/Query/CacheDmlQueriesTest.cs | 296 +++++++++++++++++++
.../IgniteConfigurationSerializerTest.cs | 46 ++-
.../IgniteConfigurationTest.cs | 28 ++
.../Apache.Ignite.Core.csproj | 4 +
.../Binary/BinaryArrayEqualityComparer.cs | 149 ++++++++++
.../Binary/BinaryConfiguration.cs | 24 ++
.../Binary/BinaryTypeConfiguration.cs | 14 +
.../Cache/Configuration/QueryEntity.cs | 33 ++-
.../Cache/Configuration/QueryField.cs | 6 +
.../Apache.Ignite.Core/IgniteConfiguration.cs | 85 ++++--
.../IgniteConfigurationSection.xsd | 19 ++
.../Apache.Ignite.Core/Impl/Binary/Binary.cs | 28 +-
.../Binary/BinaryEqualityComparerSerializer.cs | 99 +++++++
.../Impl/Binary/BinaryFieldEqualityComparer.cs | 138 +++++++++
.../Impl/Binary/BinaryFullTypeDescriptor.cs | 21 +-
.../Impl/Binary/BinaryObject.cs | 31 +-
.../Impl/Binary/BinaryObjectBuilder.cs | 62 +++-
.../Impl/Binary/BinaryObjectHeader.cs | 21 +-
.../Impl/Binary/BinaryObjectSchemaHolder.cs | 22 ++
.../Impl/Binary/BinaryReader.cs | 16 +-
.../Binary/BinarySurrogateTypeDescriptor.cs | 6 +
.../Impl/Binary/BinarySystemHandlers.cs | 6 +-
.../Impl/Binary/BinaryWriter.cs | 11 +-
.../Impl/Binary/DateTimeHolder.cs | 15 +-
.../Impl/Binary/IBinaryEqualityComparer.cs | 53 ++++
.../Impl/Binary/IBinaryTypeDescriptor.cs | 5 +
.../Impl/Binary/Io/BinaryHeapStream.cs | 9 +
.../Impl/Binary/Io/BinaryStreamBase.cs | 13 +
.../Impl/Binary/Io/IBinaryStream.cs | 25 ++
.../Impl/Binary/Marshaller.cs | 22 +-
.../Impl/Binary/SerializableObjectHolder.cs | 16 +
.../Common/IgniteConfigurationXmlSerializer.cs | 5 +-
.../Impl/Memory/PlatformMemoryStream.cs | 16 +
63 files changed, 2271 insertions(+), 295 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/ecd727c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
index fb4ca78,c92e0f5..a77facc
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
@@@ -220,26 -220,10 +223,27 @@@ public abstract class GridNearAtomicAbs
}
/**
+ * @param completer
+ */
+ public void completer(Runnable completer) {
+ this.completer = completer;
+ }
+
+ /** {@inheritDoc} */
+ protected Runnable clearCompleter() {
+ Runnable r = completer;
+
+ if (r != null)
+ completer = null;
+
+ return r;
+ }
+
+ /**
* @param topVer Topology version.
+ * @param futVer Future version
*/
- protected abstract void map(AffinityTopologyVersion topVer);
+ protected abstract void map(AffinityTopologyVersion topVer, GridCacheVersion futVer);
/**
* Maps future on ready topology.
http://git-wip-us.apache.org/repos/asf/ignite/blob/ecd727c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index f148cbb,7376aff..06076be
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@@ -386,60 -379,61 +379,67 @@@ public class GridNearAtomicSingleUpdate
/** {@inheritDoc} */
@Override protected void mapOnTopology() {
- AffinityTopologyVersion topVer = null;
- cache.topology().readLock();
-
+ AffinityTopologyVersion topVer;
-
+ GridCacheVersion futVer;
- try {
- if (cache.topology().stopping()) {
- onDone(new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " +
- cache.name()));
+ if (!CU.cheatCache(cctx.cacheId())) {
+ cache.topology().readLock();
- return;
- }
+ try {
+ if (cache.topology().stopping()) {
+ onDone(new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " +
+ cache.name()));
- GridDhtTopologyFuture fut = cache.topology().topologyVersionFuture();
+ return;
+ }
- if (fut.isDone()) {
- Throwable err = fut.validateCache(cctx);
+ GridDhtTopologyFuture fut = cache.topology().topologyVersionFuture();
- if (err != null) {
- onDone(err);
+ if (fut.isDone()) {
+ Throwable err = fut.validateCache(cctx);
- return;
- }
+ if (err != null) {
+ onDone(err);
- topVer = fut.topologyVersion();
+ return;
+ }
- futVer = addAtomicFuture(topVer);
- }
- else {
- if (waitTopFut) {
- assert !topLocked : this;
-
- fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
- @Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
- cctx.kernalContext().closure().runLocalSafe(new Runnable() {
- @Override public void run() {
- mapOnTopology();
- }
- });
- }
- });
+ topVer = fut.topologyVersion();
++
++ futVer = addAtomicFuture(topVer);
}
- else
- onDone(new GridCacheTryPutFailedException());
+ else {
+ if (waitTopFut) {
+ assert !topLocked : this;
+
+ fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
+ @Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
+ cctx.kernalContext().closure().runLocalSafe(new Runnable() {
+ @Override public void run() {
+ mapOnTopology();
+ }
+ });
+ }
+ });
+ }
+ else
+ onDone(new GridCacheTryPutFailedException());
- return;
+ return;
+ }
+ }
+ finally {
+ cache.topology().readUnlock();
}
}
- else
- finally {
- cache.topology().readUnlock();
++ else {
+ topVer = cache.topology().topologyVersionFuture().topologyVersion();
+
- map(topVer);
++ futVer = addAtomicFuture(topVer);
+ }
+
+ if (futVer != null)
+ map(topVer, futVer);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/ecd727c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 0b917e9,950e5bd..9f6e761
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@@ -495,60 -488,61 +488,67 @@@ public class GridNearAtomicUpdateFutur
/** {@inheritDoc} */
@Override protected void mapOnTopology() {
- AffinityTopologyVersion topVer = null;
- cache.topology().readLock();
-
+ AffinityTopologyVersion topVer;
-
+ GridCacheVersion futVer;
- try {
- if (cache.topology().stopping()) {
- onDone(new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " +
- cache.name()));
+ if (!CU.cheatCache(cctx.cacheId())) {
+ cache.topology().readLock();
- return;
- }
+ try {
+ if (cache.topology().stopping()) {
+ onDone(new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " +
+ cache.name()));
- GridDhtTopologyFuture fut = cache.topology().topologyVersionFuture();
+ return;
+ }
- if (fut.isDone()) {
- Throwable err = fut.validateCache(cctx);
+ GridDhtTopologyFuture fut = cache.topology().topologyVersionFuture();
- if (err != null) {
- onDone(err);
+ if (fut.isDone()) {
+ Throwable err = fut.validateCache(cctx);
- return;
- }
+ if (err != null) {
+ onDone(err);
- topVer = fut.topologyVersion();
+ return;
+ }
- futVer = addAtomicFuture(topVer);
- }
- else {
- if (waitTopFut) {
- assert !topLocked : this;
-
- fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
- @Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
- cctx.kernalContext().closure().runLocalSafe(new Runnable() {
- @Override public void run() {
- mapOnTopology();
- }
- });
- }
- });
+ topVer = fut.topologyVersion();
++
++ futVer = addAtomicFuture(topVer);
}
- else
- onDone(new GridCacheTryPutFailedException());
+ else {
+ if (waitTopFut) {
+ assert !topLocked : this;
+
+ fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
+ @Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
+ cctx.kernalContext().closure().runLocalSafe(new Runnable() {
+ @Override public void run() {
+ mapOnTopology();
+ }
+ });
+ }
+ });
+ }
+ else
+ onDone(new GridCacheTryPutFailedException());
- return;
+ return;
+ }
+ }
+ finally {
+ cache.topology().readUnlock();
}
}
- else
- finally {
- cache.topology().readUnlock();
++ else {
+ topVer = cache.topology().topologyVersionFuture().topologyVersion();
+
- map(topVer, null);
++ futVer = addAtomicFuture(topVer);
+ }
+
+ if (futVer != null)
+ map(topVer, futVer, remapKeys);
}
/**