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 2017/05/29 14:32:29 UTC

[20/22] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-5075

Merge remote-tracking branch 'remotes/origin/master' into ignite-5075

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java


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

Branch: refs/heads/ignite-5075
Commit: 9284f8050fd8f83e496f874c144cc0b326da1f0e
Parents: 3733f6a 42293fa
Author: sboikov <sb...@gridgain.com>
Authored: Mon May 29 16:47:26 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon May 29 16:47:26 2017 +0300

----------------------------------------------------------------------
 .../datagrid/CacheClientBinaryQueryExample.java |   4 +-
 .../internal/jdbc2/JdbcNoDefaultCacheTest.java  |   2 -
 .../cache/affinity/AffinityKeyMapper.java       |   3 +
 .../configuration/CacheConfiguration.java       |  11 +
 .../ignite/internal/GridKernalContext.java      |   1 +
 .../ignite/internal/GridKernalContextImpl.java  |   1 +
 .../internal/binary/BinaryEnumObjectImpl.java   |  11 +-
 .../internal/binary/BinaryObjectImpl.java       |  24 +-
 .../binary/BinaryObjectOffheapImpl.java         |   9 +-
 .../internal/processors/cache/CacheObject.java  |   8 +-
 .../processors/cache/CacheObjectAdapter.java    |   4 +-
 .../cache/CacheObjectByteArrayImpl.java         |   8 +-
 .../processors/cache/CacheObjectContext.java    | 197 +----
 .../processors/cache/CacheObjectImpl.java       |  31 +-
 .../processors/cache/CacheObjectUtils.java      | 173 +++++
 .../cache/CacheObjectValueContext.java          |  50 ++
 .../processors/cache/ClusterCachesInfo.java     |   9 +-
 .../processors/cache/GridCacheContext.java      |  12 +-
 .../processors/cache/GridCacheEventManager.java |   2 +-
 .../processors/cache/GridCacheIoManager.java    |   6 +-
 .../processors/cache/GridCacheMapEntry.java     |   7 +-
 .../GridCachePartitionExchangeManager.java      |   2 +-
 .../processors/cache/GridCacheProcessor.java    |  16 +-
 .../processors/cache/KeyCacheObjectImpl.java    |  10 +-
 .../cache/binary/CacheObjectBinaryContext.java  |   6 +-
 .../binary/CacheObjectBinaryProcessorImpl.java  |  28 +-
 .../cache/database/CacheDataRowAdapter.java     |   8 +-
 .../dht/GridClientPartitionTopology.java        |  31 +-
 .../dht/GridDhtPartitionTopology.java           |   9 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  59 +-
 .../GridDhtPartitionsExchangeFuture.java        |  50 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../cache/query/GridCacheQueryRequest.java      |  14 +-
 .../CacheContinuousQueryAcknowledgeBuffer.java  | 120 +++
 .../CacheContinuousQueryDeployableObject.java   | 110 +++
 .../continuous/CacheContinuousQueryEntry.java   | 117 ++-
 .../CacheContinuousQueryEventBuffer.java        | 483 ++++++++++++
 .../continuous/CacheContinuousQueryHandler.java | 733 +++----------------
 .../CacheContinuousQueryHandlerV2.java          |   6 +-
 .../continuous/CacheContinuousQueryManager.java |  16 +-
 .../CacheContinuousQueryPartitionRecovery.java  | 267 +++++++
 .../cache/transactions/TxDeadlock.java          |   7 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |   6 +-
 .../IgniteCacheObjectProcessorImpl.java         |  39 +-
 .../continuous/GridContinuousBatchAdapter.java  |   2 +-
 .../continuous/GridContinuousProcessor.java     |  19 +-
 .../continuous/GridContinuousQueryBatch.java    |  16 +-
 .../query/CacheQueryObjectValueContext.java     |  64 ++
 .../query/GridQueryCacheObjectsIterator.java    |  16 +-
 .../processors/query/GridQueryIndexing.java     |  18 +-
 .../processors/query/GridQueryProcessor.java    |  80 +-
 .../query/GridQueryTypeDescriptor.java          |  15 +
 .../processors/query/GridRunningQueryInfo.java  |  16 +-
 .../processors/query/QueryIndexKey.java         |  28 +-
 .../internal/processors/query/QuerySchema.java  |   2 +-
 .../query/QueryTypeDescriptorImpl.java          |   9 +
 .../internal/processors/query/QueryUtils.java   | 268 +++++--
 .../query/property/QueryBinaryProperty.java     |   2 +-
 .../query/VisorRunningQueriesCollectorTask.java |   2 +-
 .../internal/GridAffinityNoCacheSelfTest.java   |  10 +-
 .../IgniteIncompleteCacheObjectSelfTest.java    |  10 +-
 .../BinaryAtomicCacheLocalEntriesSelfTest.java  |  30 +
 .../BinaryTxCacheLocalEntriesSelfTest.java      |  84 +++
 .../BinaryAtomicCacheLocalEntriesSelfTest.java  |  30 -
 .../BinaryTxCacheLocalEntriesSelfTest.java      |  84 ---
 ...tinuousQueryAsyncFailoverAtomicSelfTest.java |   1 -
 ...nuousQueryConcurrentPartitionUpdateTest.java | 304 ++++++++
 .../CacheContinuousQueryEventBufferTest.java    | 217 ++++++
 ...ContinuousQueryFailoverAbstractSelfTest.java |  79 +-
 ...niteCacheContinuousQueryBackupQueueTest.java |  13 +-
 ...eCacheContinuousQueryImmutableEntryTest.java |   6 +-
 .../database/FreeListImplSelfTest.java          |  10 +-
 .../IgniteBinaryObjectsTestSuite.java           |   4 +-
 .../query/h2/H2IndexingAbstractGeoSelfTest.java |  26 +-
 .../query/h2/H2IndexingBinaryGeoSelfTest.java   |  30 -
 .../H2IndexingBinarySegmentedGeoSelfTest.java   |  30 -
 .../query/h2/H2IndexingGeoSelfTest.java         |   2 +-
 .../h2/H2IndexingSegmentedGeoSelfTest.java      |   2 +-
 .../testsuites/GeoSpatialIndexingTestSuite.java |   5 -
 .../query/h2/DmlStatementsProcessor.java        |  32 +-
 .../processors/query/h2/H2DmlPlanKey.java       |  66 ++
 .../query/h2/H2ResultSetIterator.java           |   4 +-
 .../processors/query/h2/H2RowDescriptor.java    |  27 +-
 .../internal/processors/query/h2/H2Schema.java  |  46 +-
 .../processors/query/h2/H2TableDescriptor.java  |  52 +-
 .../processors/query/h2/H2TableEngine.java      |   2 +-
 .../query/h2/H2TwoStepCachedQuery.java          |  18 +-
 .../query/h2/H2TwoStepCachedQueryKey.java       |  19 +-
 .../internal/processors/query/h2/H2Utils.java   |  79 +-
 .../processors/query/h2/IgniteH2Indexing.java   | 201 ++---
 .../query/h2/ddl/DdlStatementsProcessor.java    |  66 +-
 .../processors/query/h2/opt/GridH2Table.java    |   6 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |  32 +-
 .../query/h2/opt/GridLuceneIndex.java           |   2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |  20 +-
 .../h2/twostep/GridReduceQueryExecutor.java     | 167 ++---
 .../query/h2/twostep/ReduceQueryRun.java        | 157 ++++
 .../query/h2/twostep/msg/GridH2CacheObject.java |  39 +-
 .../IgniteCacheInsertSqlQuerySelfTest.java      |  27 +-
 .../cache/index/AbstractSchemaSelfTest.java     | 123 +++-
 .../DynamicIndexAbstractBasicSelfTest.java      |  77 +-
 .../DynamicIndexAbstractConcurrentSelfTest.java |  36 +-
 .../index/DynamicIndexAbstractSelfTest.java     |  30 +-
 .../index/H2DynamicIndexAbstractSelfTest.java   |  48 +-
 .../cache/index/SchemaExchangeSelfTest.java     |  13 +-
 .../query/IgniteSqlSchemaIndexingTest.java      |   4 +-
 .../query/IgniteSqlSplitterSelfTest.java        |  61 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |  19 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |  12 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   4 +-
 .../query/h2/sql/H2CompareBigQueryTest.java     |   2 +-
 .../IgniteCacheQuerySelfTestSuite3.java         |   5 +
 .../processors/query/h2/sql/bigQuery.sql        |   8 +-
 .../Apache.Ignite.Core.Tests.csproj             |   1 +
 .../Cache/CacheConfigurationTest.cs             |   6 +-
 .../Cache/Query/CacheLinqTest.cs                | 131 +++-
 .../Cache/Query/CacheLinqTestSqlEscapeAll.cs    |  34 +
 .../Apache.Ignite.Core.csproj                   |   1 +
 .../Cache/Configuration/QueryEntity.cs          |  64 +-
 .../Impl/Cache/IQueryEntityInternal.cs          |  31 +
 .../Impl/CacheFieldsQueryProvider.cs            |   9 +
 .../Impl/CacheQueryExpressionVisitor.cs         |  76 +-
 .../Apache.Ignite.Linq/Impl/ExpressionWalker.cs |   7 +-
 modules/web-console/frontend/.babelrc           |   9 +-
 modules/web-console/frontend/.gitignore         |   1 -
 modules/web-console/frontend/app/app.js         |  18 +-
 .../components/web-console-header/component.js  |   6 +-
 .../app/modules/agent/AgentManager.service.js   |   2 -
 .../frontend/gulpfile.babel.js/index.js         |  26 -
 .../frontend/gulpfile.babel.js/paths.js         |  64 --
 .../frontend/gulpfile.babel.js/tasks/build.js   |  21 -
 .../frontend/gulpfile.babel.js/tasks/bundle.js  |  36 -
 .../frontend/gulpfile.babel.js/tasks/clean.js   |  32 -
 .../frontend/gulpfile.babel.js/tasks/copy.js    |  33 -
 .../gulpfile.babel.js/tasks/ignite-modules.js   |  55 --
 .../frontend/gulpfile.babel.js/tasks/watch.js   |  30 -
 .../gulpfile.babel.js/webpack/common.js         | 205 ------
 .../webpack/environments/development.js         |  60 --
 .../webpack/environments/production.js          |  41 --
 .../webpack/environments/test.js                |  44 --
 .../frontend/gulpfile.babel.js/webpack/index.js |  36 -
 .../frontend/ignite_modules/index.js            |   7 +-
 modules/web-console/frontend/package.json       | 104 ++-
 .../frontend/test/karma.conf.babel.js           |  13 +-
 modules/web-console/frontend/test/karma.conf.js |   2 +-
 .../frontend/webpack/webpack.common.js          | 188 +++++
 .../frontend/webpack/webpack.dev.babel.js       | 100 +++
 .../frontend/webpack/webpack.prod.babel.js      |  64 ++
 .../frontend/webpack/webpack.test.js            |  33 +
 149 files changed, 4387 insertions(+), 2954 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index 25f70da,c372037..287a30d
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@@ -820,10 -717,13 +820,15 @@@ class ClusterCachesInfo 
                      desc = desc0;
                  }
  
 -                if (locCfg != null || joinDiscoData.startCaches() || CU.affinityNode(ctx.discovery().localNode(), cfg.getNodeFilter())) {
 +                if (locCfg != null ||
 +                    joinDiscoData.startCaches() ||
-                     CU.affinityNode(ctx.discovery().localNode(), desc.groupDescriptor().config().getNodeFilter()))
-                     locJoinStartCaches.add(new T2<>(desc, nearCfg));
++                    CU.affinityNode(ctx.discovery().localNode(), desc.groupDescriptor().config().getNodeFilter())) {
+                     // Move system and internal caches first.
+                     if (desc.cacheType().userCache())
+                         locJoinStartCaches.add(new T2<>(desc, nearCfg));
+                     else
+                         locJoinStartCaches.add(0, new T2<>(desc, nearCfg));
+                 }
              }
          }
      }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/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 96ae0b9,2eec8f6..5c466f4
--- 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
@@@ -1300,15 -1306,15 +1300,15 @@@ public class GridCachePartitionExchange
  
                      GridDhtPartitionTopology top = null;
  
 -                    if (cacheCtx == null)
 -                        top = clientTops.get(cacheId);
 -                    else if (!cacheCtx.isLocal())
 -                        top = cacheCtx.topology();
 +                    if (grp == null)
 +                        top = clientTops.get(grpId);
 +                    else if (!grp.isLocal())
 +                        top = grp.topology();
  
                      if (top != null) {
-                         updated |= top.update(null, entry.getValue(), null) != null;
+                         updated |= top.update(null, entry.getValue()) != null;
  
 -                        cctx.affinity().checkRebalanceState(top, cacheId);
 +                        cctx.affinity().checkRebalanceState(top, grpId);
                      }
                  }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 6725773,72c5bbc..bc6f8c7
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@@ -55,11 -55,10 +55,11 @@@ import org.apache.ignite.internal.pagem
  import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
  import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
  import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
 +import org.apache.ignite.internal.processors.cache.CacheGroupInfrastructure;
  import org.apache.ignite.internal.processors.cache.CacheInvalidStateException;
+ import org.apache.ignite.internal.processors.cache.CachePartitionExchangeWorkerTask;
  import org.apache.ignite.internal.processors.cache.ClusterState;
  import org.apache.ignite.internal.processors.cache.DynamicCacheChangeBatch;
- import org.apache.ignite.internal.processors.cache.CachePartitionExchangeWorkerTask;
  import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
  import org.apache.ignite.internal.processors.cache.ExchangeActions;
  import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@@ -1138,9 -1111,21 +1145,21 @@@ public class GridDhtPartitionsExchangeF
      @Override public boolean onDone(@Nullable AffinityTopologyVersion res, @Nullable Throwable err) {
          boolean realExchange = !dummy && !forcePreload;
  
+         if (err == null &&
+             realExchange &&
+             !cctx.kernalContext().clientNode() &&
+             (serverNodeDiscoveryEvent() || affChangeMsg != null)) {
+             for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
+                 if (!cacheCtx.affinityNode() || cacheCtx.isLocal())
+                     continue;
+ 
+                 cacheCtx.continuousQueries().flushBackupQueue(exchId.topologyVersion());
+             }
+        }
+ 
          if (err == null && realExchange) {
 -            for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
 -                if (cacheCtx.isLocal())
 +            for (CacheGroupInfrastructure grp : cctx.cache().cacheGroups()) {
 +                if (grp.isLocal())
                      continue;
  
                  try {
@@@ -1824,13 -1816,13 +1862,13 @@@
          msgs.put(node.id(), msg);
  
          for (Map.Entry<Integer, GridDhtPartitionMap> entry : msg.partitions().entrySet()) {
 -            Integer cacheId = entry.getKey();
 -            GridCacheContext cacheCtx = cctx.cacheContext(cacheId);
 +            Integer grpId = entry.getKey();
 +            CacheGroupInfrastructure grp = cctx.cache().cacheGroup(grpId);
  
 -            GridDhtPartitionTopology top = cacheCtx != null ? cacheCtx.topology() :
 -                cctx.exchange().clientTopology(cacheId, this);
 +            GridDhtPartitionTopology top = grp != null ? grp.topology() :
 +                cctx.exchange().clientTopology(grpId, this);
  
-             top.update(exchId, entry.getValue(), msg.partitionUpdateCounters(grpId));
+             top.update(exchId, entry.getValue());
          }
      }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
index bc75858,c327820..569200d
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
@@@ -17,18 -17,8 +17,19 @@@
  
  package org.apache.ignite.internal.processors.query;
  
 +import java.lang.reflect.Method;
 +import java.math.BigDecimal;
 +import java.sql.Time;
 +import java.sql.Timestamp;
 +import java.util.Collection;
 +import java.util.HashSet;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.UUID;
 +import java.util.concurrent.TimeUnit;
  import org.apache.ignite.IgniteCheckedException;
+ import org.apache.ignite.IgniteException;
  import org.apache.ignite.cache.QueryEntity;
  import org.apache.ignite.cache.QueryIndex;
  import org.apache.ignite.cache.QueryIndexType;
@@@ -59,14 -63,15 +60,14 @@@ import static org.apache.ignite.IgniteS
   * Utility methods for queries.
   */
  public class QueryUtils {
 -
      /** Field name for key. */
-     public static final String KEY_FIELD_NAME = "_key";
+     public static final String KEY_FIELD_NAME = "_KEY";
  
      /** Field name for value. */
-     public static final String VAL_FIELD_NAME = "_val";
+     public static final String VAL_FIELD_NAME = "_VAL";
  
      /** Version field name. */
-     public static final String VER_FIELD_NAME = "_ver";
+     public static final String VER_FIELD_NAME = "_VER";
  
      /** Discovery history size. */
      private static final int DISCO_HIST_SIZE = getInteger(IGNITE_INDEXING_DISCOVERY_HISTORY_SIZE, 1000);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9284f805/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------