You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/11/23 20:07:35 UTC

[26/27] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-single-op-get

Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-single-op-get


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1cce2c1b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1cce2c1b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1cce2c1b

Branch: refs/heads/ignite-single-op-get
Commit: 1cce2c1b8110b0a12f871a0213db5598c22f8b87
Parents: 4b9eae8 e4109f9
Author: sboikov <sb...@gridgain.com>
Authored: Mon Nov 23 21:50:25 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Nov 23 21:50:25 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 +
 .../internal/GridEventConsumeHandler.java       |    6 +-
 .../internal/GridMessageListenHandler.java      |    6 +-
 .../internal/portable/BinaryObjectImpl.java     |   32 +-
 .../portable/BinaryObjectOffheapImpl.java       |   27 +-
 .../internal/portable/BinaryReaderExImpl.java   | 1115 +++---------------
 .../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 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   22 +-
 .../distributed/dht/GridDhtLockFuture.java      |   77 +-
 .../colocated/GridDhtColocatedLockFuture.java   |  595 +++++-----
 .../distributed/near/GridNearLockFuture.java    |  739 ++++++------
 .../distributed/near/GridNearLockMapping.java   |    6 +-
 .../continuous/CacheContinuousQueryHandler.java |    7 +-
 .../continuous/GridContinuousHandler.java       |    6 +-
 .../continuous/GridContinuousProcessor.java     |   50 +-
 .../platform/PlatformContextImpl.java           |    4 +-
 .../services/PlatformAbstractService.java       |    4 +-
 .../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 +
 ...ContinuousQueryFailoverAbstractSelfTest.java |    2 +-
 .../continuous/GridEventConsumeSelfTest.java    |    2 +-
 .../platform/PlatformComputeEchoTask.java       |   18 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |    6 +-
 .../Binary/BinarySelfTest.cs                    |   35 +
 .../Compute/ComputeApiTest.cs                   |   51 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |    2 +-
 .../Impl/Binary/BinaryUtils.cs                  |   36 +-
 .../Impl/Binary/BinaryWriter.cs                 |   32 +-
 modules/schema-import/README.txt                |  176 +--
 .../ignite/schema/generator/CodeGenerator.java  |  281 +++--
 .../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 +-
 72 files changed, 5161 insertions(+), 3118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1cce2c1b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 08e20c2,6b696b0..ea630e0
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@@ -208,51 -208,51 +208,59 @@@ public final class GridDhtGetFuture<K, 
       * @param keys Keys.
       */
      private void map(final LinkedHashMap<KeyCacheObject, Boolean> keys) {
 -        GridDhtFuture<Object> fut = cctx.dht().dhtPreloader().request(keys.keySet(), topVer);
 +        GridDhtFuture<Object> fut = (GridDhtFuture)cctx.dht().dhtPreloader().request(keys.keySet(), topVer, true);
  
 -        if (!F.isEmpty(fut.invalidPartitions())) {
 -            if (retries == null)
 -                retries = new HashSet<>();
 +        if (fut != null) {
-             if (!F.isEmpty(fut.invalidPartitions()))
++            if (!F.isEmpty(fut.invalidPartitions())) {
++                if (retries == null)
++                    retries = new HashSet<>();
+ 
 -            retries.addAll(fut.invalidPartitions());
 -        }
 +                retries.addAll(fut.invalidPartitions());
++            }
  
 -        add(new GridEmbeddedFuture<>(
 -            new IgniteBiClosure<Object, Exception, Collection<GridCacheEntryInfo>>() {
 -                @Override public Collection<GridCacheEntryInfo> apply(Object o, Exception e) {
 -                    if (e != null) { // Check error first.
 -                        if (log.isDebugEnabled())
 -                            log.debug("Failed to request keys from preloader [keys=" + keys + ", err=" + e + ']');
 +            add(new GridEmbeddedFuture<>(
 +                new IgniteBiClosure<Object, Exception, Collection<GridCacheEntryInfo>>() {
 +                    @Override public Collection<GridCacheEntryInfo> apply(Object o, Exception e) {
 +                        if (e != null) { // Check error first.
 +                            if (log.isDebugEnabled())
 +                                log.debug("Failed to request keys from preloader [keys=" + keys + ", err=" + e + ']');
  
 -                        onDone(e);
 -                    }
 +                            onDone(e);
 +                        }
  
 -                    LinkedHashMap<KeyCacheObject, Boolean> mappedKeys = U.newLinkedHashMap(keys.size());
 +                        map0(keys);
  
 -                    // Assign keys to primary nodes.
 -                    for (Map.Entry<KeyCacheObject, Boolean> key : keys.entrySet()) {
 -                        int part = cctx.affinity().partition(key.getKey());
 +                        // Finish this one.
 +                        return Collections.emptyList();
 +                    }
 +                },
 +                fut));
 +        }
 +        else
 +            map0(keys);
 +    }
  
 -                        if (retries == null || !retries.contains(part)) {
 -                            if (!map(key.getKey(), parts)) {
 -                                if (retries == null)
 -                                    retries = new HashSet<>();
 +    private void map0(LinkedHashMap<KeyCacheObject, Boolean> keys) {
 +        LinkedHashMap<KeyCacheObject, Boolean> mappedKeys = U.newLinkedHashMap(keys.size());
  
 -                                retries.add(part);
 -                            }
 -                            else
 -                                mappedKeys.put(key.getKey(), key.getValue());
 -                        }
 -                    }
 +        // Assign keys to primary nodes.
 +        for (Map.Entry<KeyCacheObject, Boolean> key : keys.entrySet()) {
 +            int part = cctx.affinity().partition(key.getKey());
  
 -                    // Add new future.
 -                    add(getAsync(mappedKeys));
 +            if (!retries.contains(part)) {
-                 if (!map(key.getKey(), parts))
++                if (!map(key.getKey(), parts)) {
++                    if (retries == null)
++                        retries = new HashSet<>();
+ 
 -                    // Finish this one.
 -                    return Collections.emptyList();
 +                    retries.add(part);
+                 }
 -            },
 -            fut));
 +                else
 +                    mappedKeys.put(key.getKey(), key.getValue());
 +            }
 +        }
 +
 +        // Add new future.
 +        add(getAsync(mappedKeys));
      }
  
      /**