ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [41/41] ignite git commit: Merge branch master into ignite-gg-12163
Date Wed, 24 May 2017 17:27:25 GMT
Merge branch master into ignite-gg-12163


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

Branch: refs/heads/ignite-5267
Commit: b84df567696454141507b4f5959878ca379c2421
Parents: dc3450e 8c75e4d
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Wed May 24 20:25:32 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Wed May 24 20:25:32 2017 +0300

----------------------------------------------------------------------
 examples/config/filesystem/example-igfs.xml     |    4 +
 .../examples/datagrid/CacheQueryExample.java    |    2 +-
 .../store/cassandra/CassandraCacheStore.java    |   15 +-
 .../ignite/tests/IgnitePersistentStoreTest.java |   62 +-
 .../persistence/loadall_blob/ignite-config.xml  |   90 +
 .../loadall_blob/persistence-settings.xml       |   29 +
 modules/clients/src/test/config/jdbc-config.xml |    6 -
 .../internal/jdbc2/JdbcMetadataSelfTest.java    |    5 +-
 .../internal/jdbc2/JdbcResultSetSelfTest.java   |   24 +-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |    4 +-
 .../ignite/jdbc/JdbcResultSetSelfTest.java      |  121 +-
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |    3 +
 .../jdbc/thin/JdbcConnectionSelfTest.java       |  195 ++
 .../java/org/apache/ignite/IgniteCache.java     |   13 +
 .../org/apache/ignite/IgniteJdbcThinDriver.java |  312 +++
 .../apache/ignite/IgniteSystemProperties.java   |    2 +-
 .../ignite/binary/BinaryBasicNameMapper.java    |    2 +-
 .../ignite/cache/query/FieldsQueryCursor.java   |   39 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |    6 +-
 .../configuration/AtomicConfiguration.java      |   25 +
 .../configuration/MemoryConfiguration.java      |    3 +-
 .../MemoryPolicyConfiguration.java              |    4 +-
 .../ignite/internal/GridKernalContext.java      |    8 +-
 .../ignite/internal/GridKernalContextImpl.java  |   12 +-
 .../apache/ignite/internal/IgniteKernal.java    |    6 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |    1 +
 .../internal/binary/BinaryClassDescriptor.java  |    1 +
 .../ignite/internal/binary/BinaryContext.java   |   58 +-
 .../internal/binary/BinaryWriterExImpl.java     |   16 +-
 .../GridClientOptimizedMarshaller.java          |    2 +-
 .../GridClientZipOptimizedMarshaller.java       |    2 +-
 .../internal/jdbc/thin/JdbcConnection.java      |  529 +++++
 .../ignite/internal/jdbc/thin/JdbcTcpIo.java    |  207 ++
 .../ignite/internal/jdbc2/JdbcConnection.java   |    3 +-
 .../managers/communication/GridIoManager.java   |  366 ++-
 .../communication/GridIoMessageFactory.java     |    2 +
 .../communication/IgniteIoTestMessage.java      |  362 ++-
 .../managers/indexing/GridIndexingManager.java  |   19 +-
 .../optimized/OptimizedClassDescriptor.java     |    2 +-
 .../optimized/OptimizedMarshaller.java          |    2 +-
 .../marshaller/optimized/package-info.java      |   22 +
 .../mem/unsafe/UnsafeMemoryProvider.java        |   18 +-
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |   22 +-
 .../processors/cache/GridCacheMapEntry.java     |    4 +-
 .../processors/cache/IgniteCacheProxy.java      |   22 +-
 .../processors/cache/QueryCursorImpl.java       |   19 +-
 .../IgniteCacheDatabaseSharedManager.java       |   29 +-
 .../cache/database/tree/BPlusTree.java          |   64 +-
 .../cache/query/GridCacheQueryManager.java      |   32 +-
 .../processors/odbc/OdbcNioListener.java        |  242 --
 .../internal/processors/odbc/OdbcProcessor.java |  199 --
 .../odbc/SqlListenerAbstractMessageParser.java  |  265 +++
 .../odbc/SqlListenerAbstractObjectReader.java   |  137 ++
 .../odbc/SqlListenerAbstractObjectWriter.java   |  111 +
 .../processors/odbc/SqlListenerNioListener.java |  263 +++
 .../processors/odbc/SqlListenerProcessor.java   |  191 ++
 .../odbc/SqlListenerRequestHandlerImpl.java     |  494 ++++
 .../processors/odbc/jdbc/JdbcMessageParser.java |   50 +
 .../processors/odbc/jdbc/JdbcObjectReader.java  |   33 +
 .../processors/odbc/jdbc/JdbcObjectWriter.java  |   33 +
 .../processors/odbc/odbc/OdbcMessageParser.java |  249 +-
 .../processors/odbc/odbc/OdbcObjectReader.java  |   33 +
 .../processors/odbc/odbc/OdbcObjectWriter.java  |   32 +
 .../odbc/odbc/OdbcRequestHandler.java           |  513 ----
 .../platform/cache/PlatformCache.java           |   28 +-
 .../processors/query/GridQueryIndexing.java     |  100 +-
 .../processors/query/GridQueryProcessor.java    |  317 +--
 .../processors/query/QueryIndexKey.java         |   20 +-
 .../query/QueryTypeDescriptorImpl.java          |   16 +-
 .../processors/query/QueryTypeIdKey.java        |   26 +-
 .../processors/query/QueryTypeNameKey.java      |   12 +-
 .../internal/processors/query/QueryUtils.java   |   14 +-
 .../schema/SchemaIndexCacheVisitorImpl.java     |   12 +-
 .../processors/query/schema/SchemaKey.java      |   59 -
 .../message/SchemaProposeDiscoveryMessage.java  |    7 +-
 .../operation/SchemaAbstractOperation.java      |   27 +-
 .../operation/SchemaIndexAbstractOperation.java |    7 +-
 .../operation/SchemaIndexCreateOperation.java   |    8 +-
 .../operation/SchemaIndexDropOperation.java     |    7 +-
 .../handlers/GridRestCommandHandlerAdapter.java |    3 +
 .../handlers/cache/GridCacheCommandHandler.java |    2 +-
 .../handlers/query/QueryCommandHandler.java     |   13 +-
 .../ignite/internal/util/IgniteUtils.java       |   17 +
 .../apache/ignite/marshaller/Marshaller.java    |    3 -
 .../ignite/marshaller/jdk/JdkMarshaller.java    |    5 +-
 .../spi/indexing/IndexingQueryFilter.java       |    8 +-
 .../apache/ignite/spi/indexing/IndexingSpi.java |   17 +-
 .../spi/indexing/noop/NoopIndexingSpi.java      |    6 +-
 modules/core/src/test/config/example-cache.xml  |    5 +-
 .../src/test/config/spring-start-nodes-attr.xml |    4 +-
 .../core/src/test/config/spring-start-nodes.xml |    4 +-
 .../config/websession/example-cache-base.xml    |    5 +-
 .../IgniteExternalizableAbstractTest.java       |   15 +-
 ...dbcPojoStoreOptimizedMarshallerSelfTest.java |   31 -
 ...ptimizedMarshallerWithSqlEscapeSelfTest.java |   28 -
 .../apache/ignite/igfs/IgfsPathSelfTest.java    |    7 +-
 .../internal/GridLifecycleAwareSelfTest.java    |    3 +-
 .../BinarySimpleNameTestPropertySelfTest.java   |   17 +
 .../managers/GridManagerStopSelfTest.java       |    3 +-
 .../GridDiscoveryManagerAttributesSelfTest.java |    2 +-
 .../optimized/OptimizedMarshallerTest.java      |    8 +
 .../marshaller/optimized/package-info.java      |   22 +
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  |   31 +-
 .../AtomicCacheAffinityConfigurationTest.java   |  175 ++
 .../CacheStartupInDeploymentModesTest.java      |   37 -
 .../cache/GridCacheEntryMemorySizeSelfTest.java |    2 +-
 ...ridCacheStoreManagerDeserializationTest.java |    4 +-
 .../cache/GridCacheVersionSelfTest.java         |    7 +-
 .../IgniteTxExceptionAbstractSelfTest.java      |    6 +-
 .../distributed/CacheAffinityEarlyTest.java     |    7 +-
 .../CacheGetFutureHangsSelfTest.java            |    6 +-
 .../IgniteCacheCreatePutMultiNodeSelfTest.java  |    7 +-
 .../distributed/IgniteCacheCreatePutTest.java   |    7 +-
 .../IgniteCachePartitionLossPolicySelfTest.java |    1 +
 .../cache/query/IndexingSpiQuerySelfTest.java   |   14 +-
 .../cache/query/IndexingSpiQueryTxSelfTest.java |    6 +-
 .../CacheEntryProcessorNonSerializableTest.java |    5 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |   10 -
 .../processors/igfs/IgfsFileInfoSelfTest.java   |   16 +-
 .../IgfsPrimaryOptimziedMarshallerSelfTest.java |   28 -
 .../odbc/OdbcProcessorValidationSelfTest.java   |  182 --
 .../SqlListenerProcessorValidationSelfTest.java |  184 ++
 .../service/ClosureServiceClientsNodesTest.java |    4 +-
 ...namicProxySerializationMultiJvmSelfTest.java |   13 -
 .../GridMarshallerPerformanceTest.java          |    8 +-
 .../IgniteMessagingWithClientTest.java          |    4 +-
 ...pClientDiscoveryMarshallerCheckSelfTest.java |    4 +-
 .../TcpDiscoveryMarshallerCheckSelfTest.java    |    4 +-
 .../ignite/testframework/GridTestUtils.java     |    2 +-
 .../config/GridTestProperties.java              |    3 +-
 .../configvariations/ConfigVariations.java      |   14 +-
 .../testframework/junits/GridAbstractTest.java  |   33 +
 .../junits/IgniteTestResources.java             |    8 +-
 .../multijvm/IgniteCacheProcessProxy.java       |    8 +
 ...naryObjectsTxDeadlockDetectionTestSuite.java |   37 -
 .../ignite/testsuites/IgniteBasicTestSuite.java |    4 +-
 .../testsuites/IgniteBinaryBasicTestSuite.java  |   14 +-
 .../IgniteBinaryCacheFullApiTestSuite.java      |   37 -
 .../testsuites/IgniteBinaryCacheTestSuite.java  |    4 -
 ...ObjectsCacheDataStructuresSelfTestSuite.java |   42 -
 ...BinaryObjectsCacheExpiryPolicyTestSuite.java |   38 -
 ...gniteBinaryObjectsCacheRestartTestSuite.java |   37 -
 .../IgniteBinaryObjectsCacheTestSuite2.java     |   37 -
 .../IgniteBinaryObjectsCacheTestSuite3.java     |    2 -
 .../IgniteBinaryObjectsCacheTestSuite4.java     |   37 -
 ...IgniteBinaryObjectsComputeGridTestSuite.java |    4 -
 .../IgniteCacheDataStructuresSelfTestSuite.java |    3 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |    4 -
 ...teBasicConfigVariationsFullApiTestSuite.java |    2 +-
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |    3 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |    4 -
 .../IgniteMarshallerSelfTestSuite.java          |    8 +-
 ...essagingConfigVariationFullApiTestSuite.java |    2 +-
 ...ServiceConfigVariationsFullApiTestSuite.java |    2 +-
 .../webapp/META-INF/ignite-webapp-config.xml    |   15 +-
 .../test/config/hadoop-fs-open-test/grid-0.xml  |    3 +-
 .../test/config/hadoop-fs-open-test/grid-1.xml  |    3 +-
 .../test/config/hadoop-fs-open-test/grid-2.xml  |    3 +-
 .../test/config/igfs-cli-config-dual-async.xml  |    3 +-
 .../test/config/igfs-cli-config-dual-sync.xml   |    3 +-
 .../src/test/config/igfs-cli-config-primary.xml |    3 +-
 .../src/test/config/igfs-cli-config-proxy.xml   |    3 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |    4 +-
 .../cache/query/GridCacheTwoStepQuery.java      |   84 +-
 .../processors/cache/query/QueryTable.java      |  164 ++
 .../query/h2/DmlStatementsProcessor.java        |   71 +-
 .../query/h2/GridH2ResultSetIterator.java       |  191 --
 .../query/h2/H2ConnectionWrapper.java           |   67 +
 .../processors/query/h2/H2DatabaseType.java     |  161 ++
 .../processors/query/h2/H2FieldsIterator.java   |   50 +
 .../processors/query/h2/H2KeyValueIterator.java |   48 +
 .../query/h2/H2ResultSetIterator.java           |  191 ++
 .../processors/query/h2/H2RowDescriptor.java    |  479 ++++
 .../internal/processors/query/h2/H2Schema.java  |  135 ++
 .../processors/query/h2/H2SqlFieldMetadata.java |  111 +
 .../processors/query/h2/H2StatementCache.java   |   73 +
 .../processors/query/h2/H2TableDescriptor.java  |  345 +++
 .../processors/query/h2/H2TableEngine.java      |   89 +
 .../query/h2/H2TwoStepCachedQuery.java          |   49 +
 .../query/h2/H2TwoStepCachedQueryKey.java       |  107 +
 .../internal/processors/query/h2/H2Utils.java   |  299 +++
 .../processors/query/h2/IgniteH2Indexing.java   | 2212 +++---------------
 .../query/h2/database/H2PkHashIndex.java        |    4 +-
 .../query/h2/database/H2TreeIndex.java          |    4 +-
 .../query/h2/ddl/DdlStatementsProcessor.java    |   25 +-
 .../query/h2/opt/GridH2CollocationModel.java    |    6 +-
 .../query/h2/opt/GridH2IndexBase.java           |   14 +-
 .../processors/query/h2/opt/GridH2Table.java    |  177 +-
 .../query/h2/opt/GridH2TreeIndex.java           |    2 +-
 .../query/h2/opt/GridLuceneIndex.java           |   15 +-
 .../query/h2/sql/GridSqlDropIndex.java          |   14 +-
 .../query/h2/sql/GridSqlQueryParser.java        |    2 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   25 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   23 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  272 +--
 .../h2/twostep/msg/GridH2QueryRequest.java      |   13 +-
 .../twostep/msg/GridH2ValueMessageFactory.java  |    4 +
 .../cache/GridCacheCrossCacheQuerySelfTest.java |   12 +-
 .../cache/IgniteCacheNoClassQuerySelfTest.java  |    4 +-
 .../cache/SqlFieldsQuerySelfTest.java           |   12 +-
 .../DynamicIndexAbstractBasicSelfTest.java      |   26 +-
 .../DynamicIndexAbstractConcurrentSelfTest.java |   74 +-
 .../cache/index/SchemaExchangeSelfTest.java     |    2 +-
 .../query/IgniteQueryDedicatedPoolTest.java     |    6 +-
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |   25 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |  140 +-
 .../h2/sql/AbstractH2CompareQueryTest.java      |    4 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    6 +-
 .../FetchingQueryCursorStressTest.java          |    4 +-
 .../IgniteBinaryCacheQueryTestSuite.java        |    4 -
 .../IgniteBinaryCacheQueryTestSuite2.java       |    4 -
 .../IgniteBinaryCacheQueryTestSuite3.java       |   39 -
 .../IgniteBinaryCacheQueryTestSuite4.java       |   39 -
 .../core/include/ignite/cache/query/query_sql.h |    2 +
 .../ignite/cache/query/query_sql_fields.h       |    3 +
 .../cpp/odbc/include/ignite/odbc/message.h      |   10 +
 .../Cache/Query/CacheLinqTest.cs                |   36 +-
 .../Cache/Query/CacheQueriesTest.cs             |   60 +-
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |    2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |   29 +-
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |   31 +
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |    3 +
 .../Apache.Ignite.Linq/CacheExtensions.cs       |   10 +
 .../Impl/CacheFieldsQueryExecutor.cs            |   42 +-
 .../Apache.Ignite.Linq/Impl/CacheQueryable.cs   |    3 +-
 .../dotnet/Apache.Ignite.Linq/QueryOptions.cs   |   23 +
 modules/spark/pom.xml                           |    6 -
 .../spring/SpringTransactionManager.java        |   13 +
 .../GridSpringBeanSerializationSelfTest.java    |   15 +-
 .../GridSpringTransactionManagerSelfTest.java   |   45 +
 .../webapp2/META-INF/ignite-webapp-config.xml   |   15 +-
 .../ignite-int-max-values-onheap-config.xml     |    4 +-
 modules/yardstick/config/ignite-jdbc-config.xml |    4 +-
 parent/pom.xml                                  |    2 +-
 234 files changed, 8710 insertions(+), 5305 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------

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

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

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index f600066,4b9c0e2..192ff8a
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@@ -237,17 -231,19 +231,17 @@@ public interface GridQueryIndexing 
      /**
       * Rebuilds all indexes of given type from hash index.
       *
-      * @param spaceName Space name.
+      * @param cacheName Cache name.
 -     * @param type Type descriptor.
       * @throws IgniteCheckedException If failed.
       */
-     public void rebuildIndexesFromHash(String spaceName) throws IgniteCheckedException;
 -    public void rebuildIndexesFromHash(String cacheName, GridQueryTypeDescriptor type) throws
IgniteCheckedException;
++    public void rebuildIndexesFromHash(String cacheName) throws IgniteCheckedException;
  
      /**
       * Marks all indexes of given type for rebuild from hash index, making them unusable
until rebuild finishes.
       *
-      * @param spaceName Space name.
+      * @param cacheName Cache name.
 -     * @param type Type descriptor.
       */
-     public void markForRebuildFromHash(String spaceName);
 -    public void markForRebuildFromHash(String cacheName, GridQueryTypeDescriptor type);
++    public void markForRebuildFromHash(String cacheName);
  
      /**
       * Returns backup filter.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 62242f1,a40c9e9..5245cf8
--- 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
@@@ -693,17 -696,15 +695,17 @@@ public class GridQueryProcessor extend
                      QueryTypeDescriptorImpl oldDesc = tblTypMap.put(desc.tableName(), desc);
  
                      if (oldDesc != null)
-                         throw new IgniteException("Duplicate table name [cache=" + space
+
+                         throw new IgniteException("Duplicate table name [cache=" + cacheName
+
 -                            ", tblName=" + desc.tableName() + ", type1=" + desc.name() +
", type2=" + oldDesc.name() + ']');
 +                            ",tblName=" + desc.tableName() +
 +                            ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
  
                      for (String idxName : desc.indexes().keySet()) {
                          oldDesc = idxTypMap.put(idxName, desc);
  
                          if (oldDesc != null)
-                             throw new IgniteException("Duplicate index name [cache=" + space
+
+                             throw new IgniteException("Duplicate index name [cache=" + cacheName
+
 -                                ", idxName=" + idxName + ", type1=" + desc.name() + ", type2="
+ oldDesc.name() + ']');
 +                                ",idxName=" + idxName +
 +                                ", type1=" + desc.name() + ", type2=" + oldDesc.name() +
']');
                      }
                  }
  
@@@ -1454,12 -1460,12 +1461,12 @@@
  
          final GridWorkerFuture<Object> fut = new GridWorkerFuture<>();
  
-         idx.markForRebuildFromHash(space);
 -        idx.markForRebuildFromHash(cacheName, desc);
++        idx.markForRebuildFromHash(cacheName);
  
          GridWorker w = new GridWorker(ctx.igniteInstanceName(), "index-rebuild-worker",
log) {
              @Override protected void body() {
                  try {
-                     idx.rebuildIndexesFromHash(space);
 -                    idx.rebuildIndexesFromHash(cacheName, desc);
++                    idx.rebuildIndexesFromHash(cacheName);
  
                      fut.onDone();
                  }
@@@ -1467,8 -1473,7 +1474,8 @@@
                      fut.onDone(e);
                  }
                  catch (Throwable e) {
-                     U.error(log, "Failed to rebuild indexes for type [space=" + space +
 -                    log.error("Failed to rebuild indexes for type: " + desc.name(), e);
++                    U.error(log, "Failed to rebuild indexes for type [cacheName=" + cacheName
+
 +                        ", name=" + desc.name() + ']', e);
  
                      fut.onDone(e);
  

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index c3de1f7,4e9d0c7..d57c0f1
mode 100755,100644..100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b84df567/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 5f16fdd,8e6eeba..9de971a
--- 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
@@@ -163,42 -138,14 +139,13 @@@ import org.h2.command.Prepared
  import org.h2.command.dml.Insert;
  import org.h2.engine.Session;
  import org.h2.engine.SysProperties;
 -import org.h2.index.Cursor;
  import org.h2.index.Index;
- import org.h2.jdbc.JdbcConnection;
  import org.h2.jdbc.JdbcPreparedStatement;
  import org.h2.jdbc.JdbcStatement;
- import org.h2.message.DbException;
- import org.h2.mvstore.cache.CacheLongKeyLIRS;
- import org.h2.result.SearchRow;
- import org.h2.result.SimpleRow;
- import org.h2.result.SortOrder;
  import org.h2.server.web.WebServer;
- import org.h2.table.Column;
  import org.h2.table.IndexColumn;
- import org.h2.table.TableBase;
  import org.h2.tools.Server;
  import org.h2.util.JdbcUtils;
- import org.h2.value.DataType;
- import org.h2.value.Value;
- import org.h2.value.ValueArray;
- import org.h2.value.ValueBoolean;
- import org.h2.value.ValueByte;
- import org.h2.value.ValueBytes;
- import org.h2.value.ValueDate;
- import org.h2.value.ValueDecimal;
- import org.h2.value.ValueDouble;
- import org.h2.value.ValueFloat;
- import org.h2.value.ValueGeometry;
- import org.h2.value.ValueInt;
- import org.h2.value.ValueJavaObject;
- import org.h2.value.ValueLong;
- import org.h2.value.ValueNull;
- import org.h2.value.ValueShort;
- import org.h2.value.ValueString;
- import org.h2.value.ValueTime;
- import org.h2.value.ValueTimestamp;
- import org.h2.value.ValueUuid;
  import org.jetbrains.annotations.Nullable;
  import org.jsr166.ConcurrentHashMap8;
  
@@@ -2076,16 -1816,6 +1816,21 @@@ public class IgniteH2Indexing implement
      }
  
      /**
-      * Gets database schema from space.
++     * Gets collection of table for given schema name.
 +     *
-      * @param space Space name. {@code null} would be converted to an empty string.
-      * @return Schema name. Should not be null since we should not fail for an invalid space
name.
++     * @param cacheName Schema name.
++     * @return Collection of table descriptors.
 +     */
-     private String schema(String space) {
-         return emptyIfNull(space2schema.get(emptyIfNull(space)));
++    private Collection<H2TableDescriptor> tables(String cacheName) {
++        H2Schema s = schemas.get(schema(cacheName));
++
++        if (s == null)
++            return Collections.emptySet();
++
++        return s.tables().values();
 +    }
 +
 +    /**
       * Called periodically by {@link GridTimeoutProcessor} to clean up the {@link #stmtCache}.
       */
      private void cleanupStatementCache() {
@@@ -2121,59 -1851,79 +1866,59 @@@
      /**
       * Rebuild indexes from hash index.
       *
-      * @param spaceName Space name.
+      * @param cacheName Cache name.
 -     * @param type Type descriptor.
       * @throws IgniteCheckedException If failed.
       */
-     @Override public void rebuildIndexesFromHash(String spaceName) throws IgniteCheckedException
{
-         int cacheId = CU.cacheId(spaceName);
 -    @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
 -    @Override public void rebuildIndexesFromHash(String cacheName,
 -        GridQueryTypeDescriptor type) throws IgniteCheckedException {
 -        H2TableDescriptor tbl = tableDescriptor(type.name(), cacheName);
 -
 -        if (tbl == null)
 -            return;
 -
 -        assert tbl.table() != null;
 -
 -        assert tbl.table().rebuildFromHashInProgress();
 -
 -        H2PkHashIndex hashIdx = tbl.primaryKeyHashIndex();
 -
 -        Cursor cursor = hashIdx.find((Session)null, null, null);
 -
 -        int cacheId = CU.cacheId(tbl.schema().cacheName());
++    @Override public void rebuildIndexesFromHash(String cacheName) throws IgniteCheckedException
{
++        int cacheId = CU.cacheId(cacheName);
  
          GridCacheContext cctx = ctx.cache().context().cacheContext(cacheId);
  
 -        while (cursor.next()) {
 -            CacheDataRow dataRow = (CacheDataRow)cursor.get();
 +        IgniteCacheOffheapManager offheapMgr = cctx.isNear() ? cctx.near().dht().context().offheap()
: cctx.offheap();
  
 -            boolean done = false;
 +        for (int p = 0; p < cctx.affinity().partitions(); p++) {
 +            try (GridCloseableIterator<KeyCacheObject> keyIter = offheapMgr.keysIterator(p))
{
 +                while (keyIter.hasNext()) {
 +                    cctx.shared().database().checkpointReadLock();
  
 -            while (!done) {
 -                GridCacheEntryEx entry = cctx.cache().entryEx(dataRow.key());
 -
 -                try {
 -                    synchronized (entry) {
 -                        // TODO : How to correctly get current value and link here?
 -
 -                        GridH2Row row = tbl.table().rowDescriptor().createRow(entry.key(),
entry.partition(),
 -                            dataRow.value(), entry.version(), entry.expireTime());
 -
 -                        row.link(dataRow.link());
 +                    try {
 +                        KeyCacheObject key = keyIter.next();
  
 -                        List<Index> indexes = tbl.table().getAllIndexes();
 +                        while (true) {
 +                            try {
 +                                GridCacheEntryEx entry = cctx.isNear() ?
 +                                    cctx.near().dht().entryEx(key) : cctx.cache().entryEx(key);
  
 -                        for (int i = 2; i < indexes.size(); i++) {
 -                            Index idx = indexes.get(i);
 +                                entry.ensureIndexed();
  
 -                            if (idx instanceof H2TreeIndex)
 -                                ((H2TreeIndex)idx).put(row);
 +                                break;
 +                            }
 +                            catch (GridCacheEntryRemovedException ignore) {
 +                                // Retry.
 +                            }
 +                            catch (GridDhtInvalidPartitionException ignore) {
 +                                break;
 +                            }
                          }
 -
 -                        done = true;
                      }
 -                }
 -                catch (GridCacheEntryRemovedException e) {
 -                    // No-op
 +                    finally {
 +                        cctx.shared().database().checkpointReadUnlock();
 +                    }
                  }
              }
 -
          }
  
-         for (TableDescriptor tblDesc : tables(spaceName))
-             tblDesc.tbl.markRebuildFromHashInProgress(false);
 -        tbl.table().markRebuildFromHashInProgress(false);
++        for (H2TableDescriptor tblDesc : tables(cacheName))
++            tblDesc.table().markRebuildFromHashInProgress(false);
      }
  
      /** {@inheritDoc} */
-     @Override public void markForRebuildFromHash(String spaceName) {
-         for (TableDescriptor tblDesc : tables(spaceName)) {
-             assert tblDesc.tbl != null;
 -    @Override public void markForRebuildFromHash(String cacheName, GridQueryTypeDescriptor
type) {
 -        H2TableDescriptor tbl = tableDescriptor(type.name(), cacheName);
++    @Override public void markForRebuildFromHash(String cacheName) {
++        for (H2TableDescriptor tblDesc : tables(cacheName)) {
++            assert tblDesc.table() != null;
  
-             tblDesc.tbl.markRebuildFromHashInProgress(true);
 -        if (tbl == null)
 -            return;
 -
 -        assert tbl.table() != null;
 -
 -        tbl.table().markRebuildFromHashInProgress(true);
++            tblDesc.table().markRebuildFromHashInProgress(true);
 +        }
      }
  
      /**


Mime
View raw message