ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [04/10] ignite git commit: Merged ignite-1.6.11 into ignite-1.7.4.
Date Tue, 22 Nov 2016 10:49:07 GMT
Merged ignite-1.6.11 into ignite-1.7.4.


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

Branch: refs/heads/ignite-4259
Commit: f2dc1d71705b86428a04a69c4f2d4ee3a82ed1bd
Parents: 551f90d 6e36a79
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Nov 21 18:12:27 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Nov 21 18:12:27 2016 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                  |   5 +
 .../org/apache/ignite/IgniteDataStreamer.java   |   2 +-
 .../apache/ignite/IgniteSystemProperties.java   |  13 +
 .../internal/ComputeTaskInternalFuture.java     |  11 +
 .../internal/binary/BinaryClassDescriptor.java  |  37 +-
 .../ignite/internal/binary/BinaryContext.java   |  13 +-
 .../internal/binary/BinaryObjectExImpl.java     |  57 +-
 .../internal/binary/BinaryObjectImpl.java       |  23 +
 .../binary/BinaryObjectOffheapImpl.java         |  24 +-
 .../ignite/internal/binary/BinaryUtils.java     |   4 +
 .../binary/builder/BinaryObjectBuilderImpl.java |   6 +-
 .../processors/affinity/AffinityAssignment.java |  88 +++
 .../affinity/GridAffinityAssignment.java        |   8 +-
 .../affinity/GridAffinityAssignmentCache.java   |  35 +-
 .../affinity/GridAffinityProcessor.java         |  89 ++-
 .../processors/affinity/GridAffinityUtils.java  |   8 +-
 .../affinity/HistoryAffinityAssignment.java     | 169 ++++++
 .../cache/CacheAffinitySharedManager.java       |  57 +-
 .../cache/DynamicCacheChangeBatch.java          |   7 +
 .../cache/GridCacheAffinityManager.java         |   6 +-
 .../processors/cache/GridCacheContext.java      |   8 +
 .../processors/cache/GridCacheMapEntry.java     |   5 +-
 .../processors/cache/GridCacheMvccManager.java  |  77 +++
 .../GridCachePartitionExchangeManager.java      | 299 +++++++--
 .../processors/cache/GridCacheProcessor.java    |   5 +-
 .../cache/GridCacheSharedContext.java           |   1 +
 .../processors/cache/GridCacheUtils.java        |  67 --
 .../dht/GridClientPartitionTopology.java        |  33 +-
 .../dht/GridDhtPartitionTopology.java           |   3 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  31 +-
 .../dht/preloader/GridDhtPartitionFullMap.java  |  18 +
 .../dht/preloader/GridDhtPartitionMap2.java     |  53 +-
 .../GridDhtPartitionsAbstractMessage.java       |  40 +-
 .../GridDhtPartitionsExchangeFuture.java        |  84 +--
 .../preloader/GridDhtPartitionsFullMessage.java | 150 ++++-
 .../GridDhtPartitionsSingleMessage.java         | 132 +++-
 .../GridDhtPartitionsSingleRequest.java         |   4 +-
 .../dht/preloader/GridDhtPreloader.java         |   4 +-
 .../query/GridCacheQueryMetricsAdapter.java     |   2 +-
 .../continuous/GridContinuousProcessor.java     |   4 +-
 .../datastreamer/DataStreamProcessor.java       | 104 +++-
 .../datastreamer/DataStreamerImpl.java          | 607 ++++++++++++++-----
 .../internal/processors/igfs/IgfsProcessor.java |  15 +
 .../ignite/internal/util/GridLogThrottle.java   |  29 +-
 .../ignite/internal/util/IgniteUtils.java       | 111 +++-
 .../internal/util/future/GridFutureAdapter.java |  12 +-
 .../util/offheap/unsafe/GridUnsafeMemory.java   |  33 +-
 .../visor/misc/VisorResolveHostNameTask.java    |   4 +-
 .../security/SecurityBasicPermissionSet.java    | 107 ++++
 .../security/SecurityPermissionSetBuilder.java  | 222 +++++++
 .../ignite/spi/discovery/tcp/ClientImpl.java    |  38 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 510 +++++++++++++---
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  59 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |   7 +
 .../messages/TcpDiscoveryClientAckResponse.java |   5 +
 .../TcpDiscoveryClientHeartbeatMessage.java     |   7 +-
 .../TcpDiscoveryConnectionCheckMessage.java     |   5 +
 .../messages/TcpDiscoveryHeartbeatMessage.java  |   5 +
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  11 +
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  33 +-
 .../binary/BinaryMarshallerSelfTest.java        | 343 ++++++++++-
 ...CacheExchangeMessageDuplicatedStateTest.java | 393 ++++++++++++
 .../cache/IgniteCacheDynamicStopSelfTest.java   |  48 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |   2 +-
 ...CacheLoadingConcurrentGridStartSelfTest.java | 251 +++++++-
 ...ncurrentGridStartSelfTestAllowOverwrite.java |  30 +
 .../distributed/IgniteCacheGetRestartTest.java  |   3 +
 ...cingDelayedPartitionMapExchangeSelfTest.java |   8 +-
 .../GridCacheRebalancingSyncSelfTest.java       |  18 +-
 .../GridCacheSyncReplicatedPreloadSelfTest.java |   3 -
 .../IgniteCacheSyncRebalanceModeSelfTest.java   |   2 +-
 ...ContinuousQueryFailoverAbstractSelfTest.java |   2 +-
 ...ComputeJobExecutionErrorToLogManualTest.java |  88 +++
 .../IgniteNoCustomEventsOnNodeStart.java        |   7 +
 .../DataStreamProcessorSelfTest.java            |   4 +-
 .../datastreamer/DataStreamerImplSelfTest.java  | 170 ++++--
 .../DataStreamerMultiThreadedSelfTest.java      |   2 -
 .../datastreamer/DataStreamerTimeoutTest.java   |  92 ++-
 .../igfs/IgfsProcessorValidationSelfTest.java   |  30 +
 ...IpcEndpointRegistrationAbstractSelfTest.java |  76 ++-
 ...dpointRegistrationOnLinuxAndMacSelfTest.java |  11 +-
 .../SecurityPermissionSetBuilderTest.java       | 110 ++++
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 134 +++-
 .../junits/common/GridCommonAbstractTest.java   |  25 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   3 +
 .../testsuites/IgniteCacheTestSuite2.java       |   5 +
 ...opClientProtocolMultipleServersSelfTest.java | 102 ++--
 .../query/h2/GridH2ResultSetIterator.java       |  62 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   4 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |  10 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |  34 +-
 .../query/h2/twostep/GridMergeIndex.java        |  49 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |   2 +-
 .../cache/CacheSqlQueryValueCopySelfTest.java   | 226 +++++++
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   7 +
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |  59 ++
 ...lientQueryReplicatedNodeRestartSelfTest.java |   7 +
 ...butedQueryStopOnCancelOrTimeoutSelfTest.java |   7 +
 .../query/IgniteSqlSplitterSelfTest.java        |   2 +
 .../query/h2/sql/GridQueryParsingTest.java      |  11 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |   2 +
 modules/platforms/cpp/DEVNOTES.txt              |  22 +-
 modules/platforms/cpp/README.txt                |  10 +-
 modules/platforms/cpp/binary/Makefile.am        |   4 +-
 .../cpp/binary/project/vs/binary.vcxproj        |   2 -
 .../cpp/common/project/vs/common.vcxproj        |   1 -
 modules/platforms/cpp/core/Makefile.am          |   4 +-
 .../platforms/cpp/core/project/vs/core.vcxproj  |   2 -
 modules/platforms/cpp/examples/README.txt       |   9 +-
 .../cpp/examples/odbc-example/Makefile.am       |   4 +-
 .../cpp/examples/putget-example/Makefile.am     |   4 +-
 .../cpp/examples/query-example/Makefile.am      |   4 +-
 modules/platforms/cpp/ignite/Makefile.am        |   4 +-
 .../cpp/ignite/project/vs/ignite.vcxproj        |   4 +-
 modules/platforms/cpp/jni/Makefile.am           |   4 +-
 .../platforms/cpp/jni/project/vs/jni.vcxproj    |   1 -
 .../platforms/cpp/odbc-test/include/test_type.h |  42 +-
 .../cpp/odbc-test/src/api_robustness_test.cpp   |  63 ++
 .../cpp/odbc-test/src/queries_test.cpp          | 153 ++++-
 .../cpp/odbc-test/src/sql_outer_join_test.cpp   |   2 +-
 modules/platforms/cpp/odbc/Makefile.am          |   4 +-
 modules/platforms/cpp/odbc/README.txt           |  23 +-
 .../cpp/odbc/include/ignite/odbc/statement.h    |  42 ++
 .../cpp/odbc/install/ignite-odbc-amd64.wxs      | 114 ++++
 .../cpp/odbc/install/ignite-odbc-x86.wxs        | 114 ++++
 .../platforms/cpp/odbc/project/vs/odbc.vcxproj  |   4 +-
 .../odbc/src/app/application_data_buffer.cpp    |  34 +-
 modules/platforms/cpp/odbc/src/odbc.cpp         | 116 +---
 modules/platforms/cpp/odbc/src/statement.cpp    | 151 +++++
 .../Dataload/DataStreamerTestTopologyChange.cs  |  27 +-
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   2 +-
 .../src/test/config/incorrect-store-cache.xml   |   2 +
 .../src/test/config/jdbc-pojo-store-builtin.xml |   3 +
 .../src/test/config/jdbc-pojo-store-obj.xml     |   3 +
 modules/spring/src/test/config/node.xml         |   2 +
 modules/spring/src/test/config/node1.xml        |   2 +
 .../test/config/pojo-incorrect-store-cache.xml  |   2 +
 modules/spring/src/test/config/store-cache.xml  |   2 +
 modules/spring/src/test/config/store-cache1.xml |   2 +
 .../IgniteStartFromStreamConfigurationTest.java |  18 +-
 pom.xml                                         |   8 +
 141 files changed, 5973 insertions(+), 1091 deletions(-)
----------------------------------------------------------------------


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

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

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

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/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/f2dc1d71/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 558a654,f3751ac..ab573bd
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@@ -1475,10 -1507,25 +1478,25 @@@ class GridDhtPartitionTopologyImpl impl
          lock.readLock().lock();
  
          try {
-             Map<Integer, Long> res = new HashMap<>(cntrMap);
+             Map<Integer, Long> res;
+ 
+             if (skipZeros) {
+                 res = U.newHashMap(cntrMap.size());
+ 
+                 for (Map.Entry<Integer, Long> e : cntrMap.entrySet()) {
+                     Long cntr = e.getValue();
+ 
+                     if (ZERO.equals(cntr))
+                         continue;
+ 
+                     res.put(e.getKey(), cntr);
+                 }
+             }
+             else
+                 res = new HashMap<>(cntrMap);
  
 -            for (int i = 0; i < locParts.length; i++) {
 -                GridDhtLocalPartition part = locParts[i];
 +            for (int i = 0; i < locParts.length(); i++) {
 +                GridDhtLocalPartition part = locParts.get(i);
  
                  if (part == null)
                      continue;

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

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

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
----------------------------------------------------------------------
diff --cc modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
index cb83a73,d6e0743..0805be1
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
@@@ -86,14 -88,25 +86,27 @@@ public class HadoopClientProtocolMultip
      }
  
      /** {@inheritDoc} */
 -    @Override protected void beforeTest() throws Exception {
 -        super.beforeTest();
 +    @Override protected void afterTest() throws Exception {
 +        stopAllGrids();
  
 -        clearConnectionMap();
 +        clearClients();
 +
 +        super.afterTest();
      }
  
+     /**
+      * @throws IgniteCheckedException If failed.
+      */
+     private void clearConnectionMap() throws IgniteCheckedException {
+         ConcurrentHashMap<String, IgniteInternalFuture<GridClient>> cliMap =
+             GridTestUtils.getFieldValue(IgniteHadoopClientProtocolProvider.class, "cliMap");
+ 
+         for(IgniteInternalFuture<GridClient> fut : cliMap.values())
+             fut.get().close();
+ 
+         cliMap.clear();
+     }
+ 
      /** {@inheritDoc} */
      @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
          IgniteConfiguration cfg = super.getConfiguration(gridName);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ValueCacheObject.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 0314b3d,7e4d5b6..ac1a6a6
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@@ -56,9 -52,7 +56,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery;
  import org.apache.ignite.internal.processors.query.GridQueryCancel;
  import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing;
 +import org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryContext;
 +import org.apache.ignite.internal.processors.query.h2.opt.GridH2RetryException;
 +import org.apache.ignite.internal.processors.query.h2.opt.GridH2Table;
+ import org.apache.ignite.internal.processors.query.h2.opt.GridH2ValueCacheObject;
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryCancelRequest;
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse;
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageRequest;
@@@ -933,9 -757,12 +934,12 @@@ public class GridMapQueryExecutor 
          private int page;
  
          /** */
 -        private final int rowCount;
 +        private final int rowCnt;
  
          /** */
+         private boolean cpNeeded;
+ 
+         /** */
          private volatile boolean closed;
  
          /**

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

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java
index a92bf2b,072a081..80c4a08
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java
@@@ -96,9 -95,16 +96,16 @@@ public class IgniteCacheDistributedQuer
              g.cache(null).removeAll();
      }
  
+     /** {@inheritDoc} */
+     @Override protected void afterTestsStopped() throws Exception {
+         stopAllGrids();
+ 
+         super.afterTestsStopped();
+     }
+ 
      /** */
      public void testRemoteQueryExecutionTimeout() throws Exception {
 -        testQuery(CACHE_SIZE, VAL_SIZE, QUERY_1, 500, TimeUnit.MILLISECONDS, true);
 +        testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 500, TimeUnit.MILLISECONDS, true);
      }
  
      /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index 50f2ef0,56658df..e72c9cb
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@@ -30,12 -28,9 +30,14 @@@ import javax.cache.CacheException
  import org.apache.ignite.Ignite;
  import org.apache.ignite.IgniteCache;
  import org.apache.ignite.cache.CacheAtomicityMode;
 +import org.apache.ignite.cache.CacheKeyConfiguration;
  import org.apache.ignite.cache.CacheMode;
 +import org.apache.ignite.cache.CachePeekMode;
 +import org.apache.ignite.cache.affinity.AffinityKeyMapped;
 +import org.apache.ignite.cache.affinity.Affinity;
 +import org.apache.ignite.cache.query.QueryCursor;
+ import org.apache.ignite.cache.affinity.Affinity;
+ import org.apache.ignite.cache.query.QueryCursor;
  import org.apache.ignite.cache.query.SqlFieldsQuery;
  import org.apache.ignite.cache.query.annotations.QuerySqlField;
  import org.apache.ignite.cluster.ClusterNode;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/platforms/cpp/examples/README.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/platforms/cpp/odbc-test/src/queries_test.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/odbc-test/src/queries_test.cpp
index 21edf4e,a7fc7a9..db9dafb
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@@ -314,14 -294,9 +316,14 @@@ BOOST_AUTO_TEST_CASE(TestConnectionProt
      Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;PROTOCOL_VERSION=1.6.0");
  }
  
 +BOOST_AUTO_TEST_CASE(TestConnectionProtocolVersion_1_8_0)
 +{
 +    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;PROTOCOL_VERSION=1.8.0");
 +}
 +
  BOOST_AUTO_TEST_CASE(TestTwoRowsInt8)
  {
-     CheckTwoRowsInt<int8_t>(SQL_C_STINYINT);
+     CheckTwoRowsInt<signed char>(SQL_C_STINYINT);
  }
  
  BOOST_AUTO_TEST_CASE(TestTwoRowsUint8)
@@@ -693,131 -674,115 +701,242 @@@ BOOST_AUTO_TEST_CASE(TestDataAtExecutio
      BOOST_CHECK(ret == SQL_NO_DATA);
  }
  
+ BOOST_AUTO_TEST_CASE(TestNullFields)
+ {
+     Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+ 
+     SQLRETURN ret;
+ 
+     TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987,
6, 5),
+         BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ 
+     TestType inNull;
+ 
+     inNull.allNulls = true;
+ 
+     testCache.Put(1, in);
+     testCache.Put(2, inNull);
+     testCache.Put(3, in);
+ 
+     const size_t columnsCnt = 10;
+ 
+     SQLLEN columnLens[columnsCnt] = { 0 };
+ 
+     int8_t i8Column;
+     int16_t i16Column;
+     int32_t i32Column;
+     int64_t i64Column;
+     char strColumn[ODBC_BUFFER_SIZE];
+     float floatColumn;
+     double doubleColumn;
+     bool boolColumn;
+     SQL_DATE_STRUCT dateColumn;
+     SQL_TIMESTAMP_STRUCT timestampColumn;
+ 
+     // Binding columns.
+     ret = SQLBindCol(stmt, 1, SQL_C_STINYINT, &i8Column, 0, &columnLens[0]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 2, SQL_C_SSHORT, &i16Column, 0, &columnLens[1]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 3, SQL_C_SLONG, &i32Column, 0, &columnLens[2]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 4, SQL_C_SBIGINT, &i64Column, 0, &columnLens[3]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 5, SQL_C_CHAR, &strColumn, ODBC_BUFFER_SIZE, &columnLens[4]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 6, SQL_C_FLOAT, &floatColumn, 0, &columnLens[5]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 7, SQL_C_DOUBLE, &doubleColumn, 0, &columnLens[6]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 8, SQL_C_BIT, &boolColumn, 0, &columnLens[7]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 9, SQL_C_DATE, &dateColumn, 0, &columnLens[8]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     ret = SQLBindCol(stmt, 10, SQL_C_TIMESTAMP, &timestampColumn, 0, &columnLens[9]);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     SQLCHAR request[] = "SELECT i8Field, i16Field, i32Field, i64Field, strField, "
+         "floatField, doubleField, boolField, dateField, timestampField FROM TestType ORDER
BY _key";
+ 
+     ret = SQLExecDirect(stmt, request, SQL_NTS);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     // Fetching the first non-null row.
+     ret = SQLFetch(stmt);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     // Checking that columns are not null.
+     for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+         BOOST_CHECK_NE(columnLens[i], SQL_NULL_DATA);
+ 
+     // Fetching null row.
+     ret = SQLFetch(stmt);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     // Checking that columns are null.
+     for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+         BOOST_CHECK_EQUAL(columnLens[i], SQL_NULL_DATA);
+ 
+     // Fetching the last non-null row.
+     ret = SQLFetch(stmt);
+     if (!SQL_SUCCEEDED(ret))
+         BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+ 
+     // Checking that columns are not null.
+     for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+         BOOST_CHECK_NE(columnLens[i], SQL_NULL_DATA);
+ 
+     ret = SQLFetch(stmt);
+     BOOST_CHECK(ret == SQL_NO_DATA);
+ }
+ 
++
 +BOOST_AUTO_TEST_CASE(TestDistributedJoins)
 +{
 +    // Starting additional node.
 +    Ignite node1 = StartAdditionalNode("Node1");
 +    Ignite node2 = StartAdditionalNode("Node2");
 +
 +    const int entriesNum = 1000;
 +
 +    // Filling cache with data.
 +    for (int i = 0; i < entriesNum; ++i)
 +    {
 +        TestType entry;
 +
 +        entry.i32Field = i;
 +        entry.i64Field = entriesNum - i - 1;
 +
 +        testCache.Put(i, entry);
 +    }
 +
 +    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
 +
 +    SQLRETURN ret;
 +
 +    const size_t columnsCnt = 2;
 +
 +    SQLBIGINT columns[columnsCnt] = { 0 };
 +
 +    // Binding colums.
 +    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
 +    {
 +        ret = SQLBindCol(stmt, i + 1, SQL_C_SLONG, &columns[i], 0, 0);
 +
 +        if (!SQL_SUCCEEDED(ret))
 +            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +    }
 +
 +    SQLCHAR request[] =
 +        "SELECT T0.i32Field, T1.i64Field FROM TestType AS T0 "
 +        "INNER JOIN TestType AS T1 "
 +        "ON (T0.i32Field = T1.i64Field)";
 +
 +    ret = SQLExecDirect(stmt, request, SQL_NTS);
 +
 +    if (!SQL_SUCCEEDED(ret))
 +        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +
 +    int rowsNum = CountRows(stmt);
 +
 +    BOOST_CHECK_GT(rowsNum, 0);
 +    BOOST_CHECK_LT(rowsNum, entriesNum);
 +
 +    Disconnect();
 +
 +    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;DISTRIBUTED_JOINS=true;");
 +
 +    // Binding colums.
 +    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
 +    {
 +        ret = SQLBindCol(stmt, i + 1, SQL_C_SLONG, &columns[i], 0, 0);
 +
 +        if (!SQL_SUCCEEDED(ret))
 +            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +    }
 +
 +    ret = SQLExecDirect(stmt, request, SQL_NTS);
 +
 +    if (!SQL_SUCCEEDED(ret))
 +        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +
 +    rowsNum = CountRows(stmt);
 +
 +    BOOST_CHECK_EQUAL(rowsNum, entriesNum);
 +}
 +
 +BOOST_AUTO_TEST_CASE(TestDistributedJoinsWithOldVersion)
 +{
 +    // Starting additional node.
 +    Ignite node1 = StartAdditionalNode("Node1");
 +    Ignite node2 = StartAdditionalNode("Node2");
 +
 +    const int entriesNum = 1000;
 +
 +    // Filling cache with data.
 +    for (int i = 0; i < entriesNum; ++i)
 +    {
 +        TestType entry;
 +
 +        entry.i32Field = i;
 +        entry.i64Field = entriesNum - i - 1;
 +
 +        testCache.Put(i, entry);
 +    }
 +
 +    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;DISTRIBUTED_JOINS=true;PROTOCOL_VERSION=1.6.0");
 +
 +    SQLRETURN ret;
 +
 +    const size_t columnsCnt = 2;
 +
 +    SQLBIGINT columns[columnsCnt] = { 0 };
 +
 +    // Binding colums.
 +    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
 +    {
 +        ret = SQLBindCol(stmt, i + 1, SQL_C_SLONG, &columns[i], 0, 0);
 +
 +        if (!SQL_SUCCEEDED(ret))
 +            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +    }
 +
 +    SQLCHAR request[] =
 +        "SELECT T0.i32Field, T1.i64Field FROM TestType AS T0 "
 +        "INNER JOIN TestType AS T1 "
 +        "ON (T0.i32Field = T1.i64Field)";
 +
 +    ret = SQLExecDirect(stmt, request, SQL_NTS);
 +
 +    if (!SQL_SUCCEEDED(ret))
 +        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
 +
 +    int rowsNum = CountRows(stmt);
 +
 +    BOOST_CHECK_GT(rowsNum, 0);
 +    BOOST_CHECK_LT(rowsNum, entriesNum);
 +}
 +
- 
  BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/platforms/cpp/odbc/project/vs/odbc.vcxproj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/platforms/cpp/odbc/src/odbc.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
index bafc759,f7906ff..f4a07f6
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
@@@ -483,82 -483,7 +483,82 @@@ namespace Apache.Ignite.Core.Imp
                  }
              }
          }
 -        
 +
 +        /// <summary>
 +        /// Perform out-in operation with a single stream.
 +        /// </summary>
 +        /// <typeparam name="TR">The type of the r.</typeparam>
 +        /// <param name="type">Operation type.</param>
 +        /// <param name="outAction">Out action.</param>
 +        /// <param name="inAction">In action.</param>
 +        /// <param name="inErrorAction">The action to read an error.</param>
 +        /// <returns>
 +        /// Result.
 +        /// </returns>
 +        protected TR DoOutInOpX<TR>(int type, Action<BinaryWriter> outAction,
Func<IBinaryStream, long, TR> inAction,
 +            Func<IBinaryStream, Exception> inErrorAction)
 +        {
 +            Debug.Assert(inErrorAction != null);
 +
 +            using (var stream = IgniteManager.Memory.Allocate().GetStream())
 +            {
 +                var writer = _marsh.StartMarshal(stream);
 +
 +                outAction(writer);
 +
 +                FinishMarshal(writer);
 +
 +                var res = UU.TargetInStreamOutLong(_target, type, stream.SynchronizeOutput());
 +
 +                if (res != Error && inAction == null)
 +                    return default(TR);  // quick path for void operations
 +
 +                stream.SynchronizeInput();
 +
 +                stream.Seek(0, SeekOrigin.Begin);
 +
 +                if (res != Error)
 +                    return inAction != null ? inAction(stream, res) : default(TR);
 +
 +                throw inErrorAction(stream);
 +            }
 +        }
 +
 +        /// <summary>
 +        /// Perform out-in operation with a single stream.
 +        /// </summary>
 +        /// <param name="type">Operation type.</param>
 +        /// <param name="outAction">Out action.</param>
 +        /// <param name="inErrorAction">The action to read an error.</param>
 +        /// <returns>
 +        /// Result.
 +        /// </returns>
-         protected bool DoOutInOpX(int type, Action<BinaryWriter> outAction, 
++        protected bool DoOutInOpX(int type, Action<BinaryWriter> outAction,
 +            Func<IBinaryStream, Exception> inErrorAction)
 +        {
 +            Debug.Assert(inErrorAction != null);
 +
 +            using (var stream = IgniteManager.Memory.Allocate().GetStream())
 +            {
 +                var writer = _marsh.StartMarshal(stream);
 +
 +                outAction(writer);
 +
 +                FinishMarshal(writer);
 +
 +                var res = UU.TargetInStreamOutLong(_target, type, stream.SynchronizeOutput());
 +
 +                if (res != Error)
 +                    return res == True;
 +
 +                stream.SynchronizeInput();
 +
 +                stream.Seek(0, SeekOrigin.Begin);
 +
 +                throw inErrorAction(stream);
 +            }
 +        }
 +
          /// <summary>
          /// Perform out-in operation.
          /// </summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2dc1d71/pom.xml
----------------------------------------------------------------------


Mime
View raw message