Merge branch 'master' into ignite-5896

# Conflicts:
#       
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
#       modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj


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

Branch: refs/heads/ignite-5896
Commit: 6533e1d12409ccec2da494dde92cffcfaf549bc6
Parents: 29bc29e b08eef2
Author: Pavel Tupitsyn <[email protected]>
Authored: Wed Sep 6 17:16:13 2017 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Wed Sep 6 17:16:13 2017 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |    2 +-
 modules/aop/pom.xml                             |    2 +-
 modules/apache-license-gen/pom.xml              |    2 +-
 modules/aws/pom.xml                             |    2 +-
 modules/benchmarks/pom.xml                      |    2 +-
 modules/camel/pom.xml                           |    2 +-
 modules/cassandra/pom.xml                       |    2 +-
 modules/cassandra/serializers/pom.xml           |    4 +-
 modules/cassandra/store/pom.xml                 |    4 +-
 modules/clients/pom.xml                         |    8 +-
 .../jdbc/thin/JdbcThinStatementSelfTest.java    |   62 +-
 modules/cloud/pom.xml                           |    2 +-
 modules/codegen/pom.xml                         |    2 +-
 modules/core/pom.xml                            |    2 +-
 .../java/org/apache/ignite/IgniteServices.java  |  112 +-
 .../ignite/internal/IgniteServicesImpl.java     |   64 +-
 .../internal/jdbc/thin/JdbcThinResultSet.java   |   29 +-
 .../internal/jdbc/thin/JdbcThinStatement.java   |   22 +-
 .../internal/managers/discovery/DiscoCache.java |   62 +-
 .../discovery/GridDiscoveryManager.java         |   43 +-
 .../cache/CacheAffinitySharedManager.java       |   17 +-
 .../GridCachePartitionExchangeManager.java      |    9 +-
 .../processors/cache/GridCacheUtils.java        |   56 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    | 1192 +-----------------
 .../dht/GridClientPartitionTopology.java        |   11 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |    6 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   48 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  440 ++++---
 .../dht/atomic/GridDhtAtomicCache.java          |    2 +-
 .../dht/colocated/GridDhtColocatedCache.java    |    4 +-
 .../GridDhtPartitionsExchangeFuture.java        |   12 +-
 .../near/GridNearTransactionalCache.java        |    4 +-
 .../cache/distributed/near/GridNearTxLocal.java |   20 +-
 .../persistence/GridCacheOffheapManager.java    |    3 +
 .../cache/persistence/tree/io/PageIO.java       |   25 +-
 .../cache/query/GridCacheQueryAdapter.java      |    2 +-
 .../cache/query/GridCacheQueryManager.java      |    6 +-
 .../cache/transactions/IgniteTxHandler.java     |   27 +-
 .../cache/tree/AbstractDataInnerIO.java         |  109 ++
 .../cache/tree/AbstractDataLeafIO.java          |  108 ++
 .../cache/tree/AbstractPendingEntryInnerIO.java |   99 ++
 .../cache/tree/AbstractPendingEntryLeafIO.java  |   98 ++
 .../cache/tree/CacheDataRowStore.java           |   80 ++
 .../processors/cache/tree/CacheDataTree.java    |  256 ++++
 .../cache/tree/CacheIdAwareDataInnerIO.java     |   48 +
 .../cache/tree/CacheIdAwareDataLeafIO.java      |   48 +
 .../tree/CacheIdAwarePendingEntryInnerIO.java   |   48 +
 .../tree/CacheIdAwarePendingEntryLeafIO.java    |   48 +
 .../processors/cache/tree/DataInnerIO.java      |   48 +
 .../processors/cache/tree/DataLeafIO.java       |   48 +
 .../internal/processors/cache/tree/DataRow.java |  105 ++
 .../cache/tree/PendingEntriesTree.java          |  118 ++
 .../cache/tree/PendingEntryInnerIO.java         |   48 +
 .../cache/tree/PendingEntryLeafIO.java          |   48 +
 .../processors/cache/tree/PendingRow.java       |   83 ++
 .../processors/cache/tree/PendingRowIO.java     |   44 +
 .../processors/cache/tree/RowLinkIO.java        |   44 +
 .../processors/cache/tree/SearchRow.java        |   76 ++
 .../odbc/SqlListenerConnectionContext.java      |   36 +-
 .../processors/odbc/SqlListenerNioListener.java |  102 +-
 .../odbc/jdbc/JdbcConnectionContext.java        |  118 ++
 .../odbc/odbc/OdbcConnectionContext.java        |  116 ++
 .../odbc/odbc/OdbcRequestHandler.java           |   56 +-
 .../services/PlatformAbstractService.java       |    8 +
 .../platform/services/PlatformServices.java     |   64 +-
 .../platform/utils/PlatformUtils.java           |    2 +-
 .../GridServiceDeploymentCompoundFuture.java    |  197 +++
 .../service/GridServiceProcessor.java           |  560 +++++---
 .../service/PreparedConfigurations.java         |   53 +
 .../processors/task/GridTaskWorker.java         |   22 +-
 .../util/future/GridCompoundFuture.java         |   15 +-
 .../ignite/internal/util/lang/GridFunc.java     |    1 +
 .../services/ServiceDeploymentException.java    |   77 ++
 .../core/src/main/resources/ignite.properties   |    2 +-
 .../org.apache.ignite.plugin.PluginProvider     |    3 +-
 ...atformCachePluginConfigurationClosureFactory |    1 -
 ...rm.PlatformPluginConfigurationClosureFactory |    1 -
 .../cache/store/GridStoreLoadCacheTest.java     |  120 ++
 .../CacheLateAffinityAssignmentTest.java        |    2 +-
 ...ServiceDeploymentCompoundFutureSelfTest.java |  242 ++++
 ...GridServiceProcessorBatchDeploySelfTest.java |  742 +++++++++++
 .../platform/plugin/PlatformTestPlugin.java     |   27 -
 .../plugin/PlatformTestPluginConfiguration.java |   63 -
 ...rmTestPluginConfigurationClosureFactory.java |   61 -
 .../plugin/PlatformTestPluginException.java     |   34 -
 .../plugin/PlatformTestPluginExtension.java     |   51 -
 .../plugin/PlatformTestPluginProvider.java      |  103 --
 .../plugin/PlatformTestPluginTarget.java        |  236 ----
 .../cache/PlatformGetCachePluginsTask.java      |   85 --
 .../PlatformTestCachePluginConfiguration.java   |   55 -
 ...formTestCachePluginConfigurationClosure.java |   48 -
 ...tCachePluginConfigurationClosureFactory.java |   37 -
 .../cache/PlatformTestCachePluginProvider.java  |   72 --
 .../ignite/testsuites/IgniteCacheTestSuite.java |    5 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |    4 +
 modules/extdata/p2p/pom.xml                     |    2 +-
 modules/extdata/platform/README.txt             |    4 +
 .../extdata/platform/licenses/apache-2.0.txt    |  202 +++
 modules/extdata/platform/pom.xml                |   46 +
 .../platform/plugin/PlatformTestPlugin.java     |   27 +
 .../plugin/PlatformTestPluginConfiguration.java |   63 +
 ...rmTestPluginConfigurationClosureFactory.java |   61 +
 .../plugin/PlatformTestPluginException.java     |   34 +
 .../plugin/PlatformTestPluginExtension.java     |   51 +
 .../plugin/PlatformTestPluginProvider.java      |  103 ++
 .../plugin/PlatformTestPluginTarget.java        |  236 ++++
 .../cache/PlatformGetCachePluginsTask.java      |   85 ++
 .../PlatformTestCachePluginConfiguration.java   |   55 +
 ...formTestCachePluginConfigurationClosure.java |   48 +
 ...tCachePluginConfigurationClosureFactory.java |   37 +
 .../cache/PlatformTestCachePluginProvider.java  |   72 ++
 .../platform/plugin/cache/package-info.java     |   22 +
 .../ignite/platform/plugin/package-info.java    |   22 +
 .../org.apache.ignite.plugin.PluginProvider     |    1 +
 ...atformCachePluginConfigurationClosureFactory |    1 +
 ...rm.PlatformPluginConfigurationClosureFactory |    1 +
 .../extdata/uri/modules/uri-dependency/pom.xml  |    2 +-
 modules/extdata/uri/pom.xml                     |    2 +-
 modules/flink/pom.xml                           |    2 +-
 modules/flume/pom.xml                           |    2 +-
 modules/gce/pom.xml                             |    2 +-
 modules/geospatial/pom.xml                      |    2 +-
 modules/hadoop/pom.xml                          |    2 +-
 modules/hibernate-4.2/pom.xml                   |    2 +-
 modules/hibernate-5.1/pom.xml                   |    2 +-
 modules/hibernate-core/pom.xml                  |    2 +-
 modules/indexing/pom.xml                        |    2 +-
 .../DynamicIndexAbstractConcurrentSelfTest.java |    2 +-
 modules/jcl/pom.xml                             |    2 +-
 modules/jms11/pom.xml                           |    2 +-
 modules/jta/pom.xml                             |    2 +-
 modules/kafka/pom.xml                           |    2 +-
 modules/kubernetes/pom.xml                      |    2 +-
 modules/log4j/pom.xml                           |    2 +-
 modules/log4j2/pom.xml                          |    2 +-
 modules/mesos/pom.xml                           |    2 +-
 modules/ml/pom.xml                              |    2 +-
 modules/mqtt/pom.xml                            |    2 +-
 modules/osgi-karaf/pom.xml                      |    2 +-
 modules/osgi-paxlogging/pom.xml                 |    2 +-
 modules/osgi/pom.xml                            |    2 +-
 .../cpp/odbc-test/src/configuration_test.cpp    |   11 +
 .../include/ignite/odbc/config/configuration.h  |   26 +
 .../cpp/odbc/include/ignite/odbc/message.h      |    6 +-
 .../odbc/include/ignite/odbc/protocol_version.h |    1 +
 .../odbc/system/ui/dsn_configuration_window.h   |    4 +
 .../src/system/ui/dsn_configuration_window.cpp  |   41 +-
 .../cpp/odbc/src/config/configuration.cpp       |    2 +
 modules/platforms/cpp/odbc/src/connection.cpp   |    6 +-
 modules/platforms/cpp/odbc/src/dsn_config.cpp   |    3 +
 modules/platforms/cpp/odbc/src/message.cpp      |   15 +-
 .../platforms/cpp/odbc/src/protocol_version.cpp |    8 +-
 .../Services/ServicesAsyncWrapper.cs            |    9 +-
 .../Services/ServicesTest.cs                    |   81 +-
 .../Apache.Ignite.Core.csproj                   |    4 +-
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 ----
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |    2 +-
 .../Impl/Cache/Query/PlatformQueryQursorBase.cs |   84 ++
 .../Impl/Cache/Query/QueryCursor.cs             |    2 +-
 .../Impl/Cache/Query/QueryCursorBase.cs         |  288 +++++
 .../Apache.Ignite.Core/Impl/Common/Classpath.cs |    1 +
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |    6 +-
 .../Impl/Services/ServiceProxySerializer.cs     |   36 +
 .../Impl/Services/Services.cs                   |   30 +-
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   37 +-
 .../Resource/InstanceResourceAttribute.cs       |    3 +-
 .../Services/ServiceDeploymentException.cs      |  111 ++
 modules/platforms/dotnet/docfx/.gitignore       |    9 +
 .../dotnet/docfx/Apache.Ignite.docfx.json       |   88 ++
 modules/platforms/dotnet/docfx/README.txt       |    2 +
 modules/platforms/dotnet/docfx/api/index.md     |    5 +
 modules/platforms/dotnet/docfx/filterConfig.yml |    3 +
 .../platforms/dotnet/docfx/generate-docs.cmd    |    1 +
 .../platforms/dotnet/docfx/images/favicon.ico   |  Bin 0 -> 1150 bytes
 .../dotnet/docfx/images/logo_ignite_32_32.png   |  Bin 0 -> 1676 bytes
 modules/platforms/dotnet/docfx/index.md         |   10 +
 modules/platforms/dotnet/docfx/toc.yml          |    3 +
 modules/rest-http/pom.xml                       |    2 +-
 modules/rocketmq/pom.xml                        |    2 +-
 modules/scalar-2.10/pom.xml                     |    2 +-
 modules/scalar/pom.xml                          |    2 +-
 modules/schedule/pom.xml                        |    2 +-
 modules/slf4j/pom.xml                           |    2 +-
 modules/spark-2.10/pom.xml                      |    2 +-
 modules/spark/pom.xml                           |    2 +-
 modules/spring-data/pom.xml                     |    2 +-
 modules/spring/pom.xml                          |    2 +-
 modules/ssh/pom.xml                             |    2 +-
 modules/storm/pom.xml                           |    2 +-
 modules/tools/pom.xml                           |    2 +-
 modules/twitter/pom.xml                         |    2 +-
 modules/urideploy/pom.xml                       |    2 +-
 modules/visor-console-2.10/pom.xml              |    2 +-
 modules/visor-console/pom.xml                   |    2 +-
 modules/visor-plugins/pom.xml                   |    2 +-
 modules/web-console/pom.xml                     |    2 +-
 modules/web-console/web-agent/pom.xml           |    2 +-
 modules/web/ignite-appserver-test/pom.xml       |    2 +-
 modules/web/ignite-websphere-test/pom.xml       |    2 +-
 modules/web/pom.xml                             |    2 +-
 modules/yardstick/pom.xml                       |    2 +-
 modules/yarn/pom.xml                            |    2 +-
 modules/zeromq/pom.xml                          |    2 +-
 modules/zookeeper/pom.xml                       |    2 +-
 parent/pom.xml                                  |    1 +
 pom.xml                                         |  156 +--
 206 files changed, 6556 insertions(+), 3419 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6533e1d1/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
index 4567cb8,e2d444b..09a9c53
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
@@@ -28,12 -26,8 +26,10 @@@ import org.apache.ignite.internal.binar
  import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream;
  import org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream;
  import org.apache.ignite.internal.binary.streams.BinaryInputStream;
- import org.apache.ignite.internal.processors.odbc.jdbc.JdbcMessageParser;
- import org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler;
- import org.apache.ignite.internal.processors.odbc.odbc.OdbcMessageParser;
- import org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler;
+ import org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext;
+ import org.apache.ignite.internal.processors.odbc.odbc.OdbcConnectionContext;
 +import 
org.apache.ignite.internal.processors.platform.client.ClientMessageParser;
 +import 
org.apache.ignite.internal.processors.platform.client.ClientRequestHandler;
  import org.apache.ignite.internal.util.GridSpinBusyLock;
  import org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter;
  import org.apache.ignite.internal.util.nio.GridNioSession;
@@@ -44,27 -38,12 +40,15 @@@ import org.jetbrains.annotations.Nullab
   * SQL message listener.
   */
  public class SqlListenerNioListener extends 
GridNioServerListenerAdapter<byte[]> {
 -    /** The value corresponds to ODBC driver of the parser field of the 
handshake request. */
 +    /** ODBC driver handshake code. */
      public static final byte ODBC_CLIENT = 0;
  
 -    /** The value corresponds to JDBC driver of the parser field of the 
handshake request. */
 +    /** JDBC driver handshake code. */
      public static final byte JDBC_CLIENT = 1;
  
 +    /** Thin client handshake code. */
 +    public static final byte THIN_CLIENT = 2;
 +
-     /** Version 2.1.0. */
-     private static final SqlListenerProtocolVersion VER_2_1_0 = 
SqlListenerProtocolVersion.create(2, 1, 0);
- 
-     /** Version 2.1.5: added "lazy" flag. */
-     private static final SqlListenerProtocolVersion VER_2_1_5 = 
SqlListenerProtocolVersion.create(2, 1, 5);
- 
-     /** Current version. */
-     private static final SqlListenerProtocolVersion CURRENT_VER = VER_2_1_5;
- 
-     /** Supported versions. */
-     private static final Set<SqlListenerProtocolVersion> SUPPORTED_VERS = new 
HashSet<>();
- 
      /** Connection-related metadata key. */
      private static final int CONN_CTX_META_KEY = 
GridNioSessionMetaKey.nextUniqueKey();
  
@@@ -244,52 -221,19 +226,22 @@@
      /**
       * Prepare context.
       *
-      * @param ver Version.
-      * @param reader Reader.
+      * @param clientType Client type.
       * @return Context.
       */
-     private SqlListenerConnectionContext 
prepareContext(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader) {
-         byte clientType = reader.readByte();
- 
-         if (clientType == ODBC_CLIENT) {
-             boolean distributedJoins = reader.readBoolean();
-             boolean enforceJoinOrder = reader.readBoolean();
-             boolean replicatedOnly = reader.readBoolean();
-             boolean collocated = reader.readBoolean();
- 
-             SqlListenerRequestHandler handler = new OdbcRequestHandler(ctx, 
busyLock, maxCursors, distributedJoins,
-                 enforceJoinOrder, replicatedOnly, collocated);
- 
-             SqlListenerMessageParser parser = new OdbcMessageParser(ctx);
- 
-             return new SqlListenerConnectionContext(handler, parser);
-         }
-         else if (clientType == JDBC_CLIENT) {
-             boolean distributedJoins = reader.readBoolean();
-             boolean enforceJoinOrder = reader.readBoolean();
-             boolean collocated = reader.readBoolean();
-             boolean replicatedOnly = reader.readBoolean();
-             boolean autoCloseCursors = reader.readBoolean();
- 
-             boolean lazyExec = false;
- 
-             if (ver.compareTo(VER_2_1_5) >= 0)
-                 lazyExec = reader.readBoolean();
+     private SqlListenerConnectionContext prepareContext(byte clientType) {
+         switch (clientType) {
+             case ODBC_CLIENT:
+                 return new OdbcConnectionContext(ctx, busyLock, maxCursors);
  
-             SqlListenerRequestHandler handler = new JdbcRequestHandler(ctx, 
busyLock, maxCursors, distributedJoins,
-                 enforceJoinOrder, collocated, replicatedOnly, 
autoCloseCursors, lazyExec);
+             case JDBC_CLIENT:
+                 return new JdbcConnectionContext(ctx, busyLock, maxCursors);
  
-             SqlListenerMessageParser parser = new JdbcMessageParser(ctx);
- 
-             return new SqlListenerConnectionContext(handler, parser);
-         }
-         else if (clientType == THIN_CLIENT) {
-             ClientMessageParser parser = new ClientMessageParser(ctx);
-             ClientRequestHandler handler = new ClientRequestHandler(ctx);
++            case THIN_CLIENT:
++                return new ClientConnectionContext(ctx, busyLock, maxCursors);
 +
-             return new SqlListenerConnectionContext(handler, parser);
+             default:
+                 throw new IgniteException("Unknown client type: " + 
clientType);
          }
-         else
-             throw new IgniteException("Unknown client type: " + clientType);
      }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6533e1d1/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/6533e1d1/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 2ac2cea,0a100f7..1dd9292
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@@ -101,14 -100,8 +101,15 @@@
      <Compile Include="Common\ExceptionFactory.cs" />
      <Compile Include="Configuration\Package-Info.cs" />
      <Compile Include="Impl\Binary\BinaryTypeId.cs" />
+     <Compile Include="Impl\Cache\Query\PlatformQueryQursorBase.cs" />
 +    <Compile Include="Impl\Binary\BinaryProcessorClient.cs" />
 +    <Compile Include="Impl\Binary\IBinaryProcessor.cs" />
      <Compile Include="Impl\IIgniteInternal.cs" />
 +    <Compile Include="Impl\Cache\CacheClient.cs" />
 +    <Compile Include="Impl\Client\ClientOp.cs" />
 +    <Compile Include="Impl\Client\ClientProtocolVersion.cs" />
 +    <Compile Include="Impl\Client\ClientSocket.cs" />
 +    <Compile Include="Impl\Client\IgniteClient.cs" />
      <Compile Include="Impl\IPlatformTargetInternal.cs" />
      <Compile Include="Impl\PersistentStore\PersistentStoreMetrics.cs" />
      <Compile Include="Impl\PlatformDisposableTargetAdapter.cs" />

Reply via email to