Merge branches 'ignite-692' and 'ignite-sprint-3' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692


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

Branch: refs/heads/ignite-692
Commit: 6bf2f4ed7a139b1d68003ca6920b4fe7e4d2a6a1
Parents: c06a4ae 080376a
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Wed Apr 8 14:57:05 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Wed Apr 8 14:57:05 2015 +0700

----------------------------------------------------------------------
 bin/ignite.bat                                  |   2 +-
 bin/ignite.sh                                   |   2 +-
 bin/include/service.sh                          |   8 +-
 config/hadoop/default-config.xml                |  15 +-
 .../streaming/StreamTransformerExample.java     |   3 +-
 .../configuration/CacheConfiguration.java       |   3 -
 .../processors/cache/CacheLazyEntry.java        |  10 +-
 .../processors/cache/GridCacheIoManager.java    |   2 +-
 .../processors/cache/KeyCacheObjectImpl.java    |  13 +-
 .../dht/GridClientPartitionTopology.java        |   6 +-
 .../distributed/dht/GridDhtLockFuture.java      |  10 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   6 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |  49 ++---
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |   3 +-
 .../IgniteCacheObjectProcessorImpl.java         |  28 +--
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  48 +++--
 .../internal/visor/log/VisorLogSearchTask.java  |   3 +-
 .../visor/query/VisorQueryNextPageTask.java     |   5 +-
 .../org/apache/ignite/lang/IgniteImmutable.java |  49 -----
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  24 ++-
 .../communication/tcp/TcpCommunicationSpi.java  |  14 +-
 .../discovery/tcp/TcpClientDiscoverySpi.java    |  47 +++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  78 ++++----
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |   8 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |   4 +-
 .../resources/META-INF/classnames.properties    |  19 +-
 .../ignite/IgniteCacheAffinitySelfTest.java     |   5 +
 .../GridCacheOnCopyFlagAbstractSelfTest.java    | 112 +----------
 .../GridCacheReturnValueTransferSelfTest.java   |   1 -
 .../IgniteCacheStoreValueAbstractTest.java      | 186 ++++++++++++++++++-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  23 +++
 ...ePartitionedBasicStoreMultiNodeSelfTest.java | 110 +----------
 ...ridCacheFifoBatchEvictionPolicySelfTest.java |   3 +-
 .../GridAbstractCommunicationSelfTest.java      |   3 +-
 .../GridTcpCommunicationSpiAbstractTest.java    |   5 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java |   3 +-
 ...cpCommunicationSpiMultithreadedSelfTest.java |   3 +-
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |   3 +-
 ...GridTcpCommunicationSpiRecoverySelfTest.java |   2 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |   1 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   3 +-
 .../commands/cache/VisorCacheClearCommand.scala |   3 +-
 .../scala/org/apache/ignite/visor/visor.scala   |  12 +-
 parent/pom.xml                                  |   2 +-
 pom.xml                                         |  14 +-
 46 files changed, 477 insertions(+), 478 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6bf2f4ed/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index 8d21fcf,3f13d5f..320bdde
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@@ -77,22 -70,20 +76,22 @@@ public class VisorQueryNextPageTask ext
          private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> 
arg) throws IgniteCheckedException {
              long start = U.currentTimeMillis();
  
 -            ConcurrentMap<String, 
VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage =
 +            ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> 
storage =
                  ignite.cluster().nodeLocalMap();
  
 -            VisorQueryTask.VisorFutureResultSetHolder<List<?>> t = 
storage.get(arg.get1());
 +            VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
  
              if (t == null)
-                 throw new GridInternalException("SQL query results are 
expired.");
+                 throw new IgniteException("SQL query results are expired.");
  
 -            IgniteBiTuple<List<Object[]>, List<?>> nextRows = 
VisorQueryUtils.fetchSqlQueryRows(t.future(), t.next(), arg.get2());
 +            VisorQueryCursor cur = t.cursor();
 +
 +            List<Object[]> nextRows = VisorQueryUtils.fetchSqlQueryRows(cur, 
arg.get2());
  
 -            boolean hasMore = nextRows.get2() != null;
 +            boolean hasMore = cur.hasNext();
  
              if (hasMore)
 -                storage.put(arg.get1(), new 
VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), nextRows.get2(), true));
 +                storage.put(arg.get1(), new 
VisorQueryTask.VisorQueryCursorHolder(t.cursor(), true));
              else
                  storage.remove(arg.get1());
  
@@@ -109,22 -94,21 +108,22 @@@
          private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> 
arg) throws IgniteCheckedException {
              long start = U.currentTimeMillis();
  
 -            ConcurrentMap<String, 
VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage =
 +            ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> 
storage =
                  ignite.cluster().nodeLocalMap();
  
 -            VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, 
Object>> t = storage.get(arg.get1());
 +            VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
  
              if (t == null)
-                 throw new GridInternalException("Scan query results are 
expired.");
+                 throw new IgniteException("Scan query results are expired.");
  
 -            IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>> rows =
 -                VisorQueryUtils.fetchScanQueryRows(t.future(), t.next(), 
arg.get2());
 +            VisorQueryCursor cur = t.cursor();
 +
 +            List<Object[]> rows = VisorQueryUtils.fetchScanQueryRows(cur, 
arg.get2());
  
 -            Boolean hasMore = rows.get2() != null;
 +            Boolean hasMore = cur.hasNext();
  
              if (hasMore)
 -                storage.put(arg.get1(), new 
VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), rows.get2(), true));
 +                storage.put(arg.get1(), new 
VisorQueryTask.VisorQueryCursorHolder(cur, true));
              else
                  storage.remove(arg.get1());
  

Reply via email to