ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [49/50] incubator-ignite git commit: Merge branch ignite-sprint-3 into ignite-80
Date Sat, 11 Apr 2015 04:40:22 GMT
Merge branch ignite-sprint-3 into ignite-80


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

Branch: refs/heads/ignite-80
Commit: 4c0436ffb590c7ec8cec5f17dfb13689ec12ad79
Parents: 0117135 df1fbef
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Fri Apr 10 21:38:59 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Fri Apr 10 21:38:59 2015 -0700

----------------------------------------------------------------------
 .../apache/ignite/internal/GridComponent.java   |   5 +-
 .../ignite/internal/GridPluginComponent.java    |   5 +-
 .../internal/managers/GridManagerAdapter.java   |   4 +-
 .../discovery/GridDiscoveryManager.java         |  10 +-
 .../processors/GridProcessorAdapter.java        |   5 +-
 .../processors/cache/GridCacheProcessor.java    |   7 +-
 .../continuous/GridContinuousProcessor.java     |   4 +-
 .../processors/igfs/IgfsInputStreamImpl.java    |   2 +-
 .../processors/igfs/IgfsOutputStreamImpl.java   |   6 +-
 .../plugin/IgnitePluginProcessor.java           |  13 +-
 .../ignite/internal/util/GridJavaProcess.java   |  38 +-
 .../internal/visor/query/VisorQueryTask.java    |   4 +-
 .../apache/ignite/plugin/PluginProvider.java    |   5 +-
 .../spi/discovery/DiscoverySpiDataExchange.java |   5 +-
 .../discovery/tcp/TcpClientDiscoverySpi.java    |  10 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 480 +++++++++++++++++--
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |  27 ++
 .../tcp/internal/TcpDiscoveryNode.java          |  12 +-
 .../tcp/messages/TcpDiscoveryClassRequest.java  |  55 +++
 .../tcp/messages/TcpDiscoveryClassResponse.java |  76 +++
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../TcpDiscoveryJoinRequestMessage.java         |   6 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  16 +-
 .../CacheMetricsForClusterGroupSelfTest.java    |  18 +-
 .../continuous/GridEventConsumeSelfTest.java    |   3 +-
 .../discovery/AbstractDiscoverySelfTest.java    |   4 +-
 .../tcp/TcpDiscoverySpiStartStopSelfTest.java   |   5 +-
 .../junits/spi/GridSpiAbstractTest.java         |   4 +-
 .../p2p/startcache/CacheAllNodesFilter.java     |  31 ++
 .../CacheConfigurationP2PTestClient.java        | 114 +++++
 .../tests/p2p/startcache/Organization1.java     |  52 ++
 .../tests/p2p/startcache/Organization2.java     |  52 ++
 .../cache/CacheConfigurationP2PTest.java        | 177 +++++++
 .../cache/CacheConfigurationP2PTestServer.java  |  49 ++
 .../IgniteCacheWithIndexingTestSuite.java       |   2 +
 35 files changed, 1222 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
index 804561f,fb227cd..a5e1080
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java
@@@ -88,10 -89,9 +89,10 @@@ public interface GridComponent 
       * on new node during discovery process).
       * @param joiningNodeId Joining node ID.
       * @param rmtNodeId Remote node ID for which data is provided.
 +     * @param topVer New topology version (equals to joining node order).
       * @param data Discovery data object or {@code null} if nothing was
       */
-     public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long topVer,
Object data);
 -    public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Serializable
data);
++    public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long topVer,
Serializable data);
  
      /**
       * Prints memory statistics (sizes of internal structures, etc.).

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
index 3c5998f,b438bc1..bd817f5
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java
@@@ -78,7 -79,7 +79,7 @@@ public class GridPluginComponent implem
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Object data) {
 -    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Serializable
data) {
++    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Serializable data) {
          // No-op.
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 41d4bab,cb91313..be73441
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@@ -576,7 -576,7 +576,7 @@@ public abstract class GridManagerAdapte
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Object data) {
 -    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Serializable
data) {
++    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Serializable data) {
          // No-op.
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index fe8c491,c073596..f6f904a
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@@ -437,8 -437,8 +437,8 @@@ public class GridDiscoveryManager exten
                  return data;
              }
  
-             @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Object> data) {
-                 for (Map.Entry<Integer, Object> e : data.entrySet()) {
 -            @Override public void onExchange(UUID joiningNodeId, UUID nodeId, Map<Integer,
Serializable> data) {
 -                for (Map.Entry<Integer, Serializable> e : data.entrySet()) {
++            @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Serializable> data) {
++                for (Map.Entry<Serializable, Object> e : data.entrySet()) {
                      GridComponent comp = null;
  
                      for (GridComponent c : ctx.components()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
index dfa56eb,a84c48a..c6c2482
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/GridProcessorAdapter.java
@@@ -71,7 -72,7 +72,7 @@@ public abstract class GridProcessorAdap
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Object data) {
 -    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Serializable
data) {
++    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Serializable data) {
          // No-op.
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 52edc6a,2859061..fb7e0ac
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@@ -749,7 -742,7 +749,8 @@@ public class GridCacheProcessor extend
          ctx.marshallerContext().onMarshallerCacheStarted(ctx);
  
          marshallerCache().context().preloader().syncFuture().listen(new CIX1<IgniteInternalFuture<?>>()
{
--            @Override public void applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException
{
++            @Override
++            public void applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException
{
                  ctx.marshallerContext().onMarshallerCachePreloaded(ctx);
              }
          });
@@@ -1634,7 -1626,7 +1635,7 @@@
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Object data) {
 -    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Serializable
data) {
++    @Override public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, long
topVer, Serializable data) {
          if (data instanceof DynamicCacheChangeBatch) {
              DynamicCacheChangeBatch batch = (DynamicCacheChangeBatch)data;
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 2b45b5c,0d76ad4..edaf5d9
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@@ -349,7 -349,7 +349,7 @@@ public class GridContinuousProcessor ex
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, long topVer,
Object obj) {
 -    @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, Serializable
obj) {
++    @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, long topVer,
Serializable obj) {
          DiscoveryData data = (DiscoveryData)obj;
  
          if (!ctx.isDaemon() && data != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 308cda7,8f2cc51..cb2e0ef
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@@ -171,11 -172,11 +172,11 @@@ public class IgnitePluginProcessor exte
      }
  
      /** {@inheritDoc} */
-     @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, long topVer,
Object data) {
-         Map<String, Object> discData = (Map<String, Object>)data;
 -    @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, Serializable
data) {
++    @Override public void onDiscoveryDataReceived(UUID nodeId, UUID rmtNodeId, long topVer,
Serializable data) {
+         Map<String, Serializable> discData = (Map<String, Serializable>)data;
  
          if (discData != null) {
-             for (Map.Entry<String, Object> e : discData.entrySet()) {
+             for (Map.Entry<String, Serializable> e : discData.entrySet()) {
                  PluginProvider provider = plugins.get(e.getKey());
  
                  if (provider != null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiDataExchange.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiDataExchange.java
index 61f5d8f,46d6716..b357232
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiDataExchange.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiDataExchange.java
@@@ -41,5 -42,5 +42,5 @@@ public interface DiscoverySpiDataExchan
       * @param joiningNodeId Remote node ID.
       * @param data Collection of discovery data objects from different components.
       */
-     public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer, Map<Integer,
Object> data);
 -    public void onExchange(UUID joiningNodeId, UUID nodeId, Map<Integer, Serializable>
data);
++    public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer, Map<Integer,
Serializable> data);
  }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index d860537,2ab8e8f..2d975e1
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@@ -898,11 -898,11 +898,11 @@@ public class TcpClientDiscoverySpi exte
                          if (msg.topologyHistory() != null)
                              topHist.putAll(msg.topologyHistory());
  
-                         Map<UUID, Map<Integer, Object>> dataMap = msg.oldNodesDiscoveryData();
+                         Map<UUID, Map<Integer, byte[]>> dataMap = msg.oldNodesDiscoveryData();
  
                          if (dataMap != null) {
-                             for (Map.Entry<UUID, Map<Integer, Object>> entry
: dataMap.entrySet())
-                                 exchange.onExchange(newNodeId, entry.getKey(), node.order(),
entry.getValue());
+                             for (Map.Entry<UUID, Map<Integer, byte[]>> entry
: dataMap.entrySet())
 -                                onExchange(newNodeId, entry.getKey(), entry.getValue(),
null);
++                                onExchange(newNodeId, entry.getKey(), node.order(), entry.getValue(),
null);
                          }
  
                          locNode.setAttributes(node.attributes());
@@@ -922,10 -922,10 +922,10 @@@
                      if (log.isDebugEnabled())
                          log.debug("Added new node to topology: " + node);
  
-                     Map<Integer, Object> data = msg.newNodeDiscoveryData();
+                     Map<Integer, byte[]> data = msg.newNodeDiscoveryData();
  
                      if (data != null)
-                         exchange.onExchange(newNodeId, newNodeId, node.order(), data);
 -                        onExchange(newNodeId, newNodeId, data, null);
++                        onExchange(newNodeId, newNodeId, node.order(), data, null);
                  }
              }
          }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index d7f3ebe,81c608a..2e11c24
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@@ -3541,12 -3720,12 +3720,12 @@@ public class TcpDiscoverySpi extends Tc
                  if (topChanged) {
                      assert !node.visible() : "Added visible node [node=" + node + ", locNode="
+ locNode + ']';
  
-                     Map<Integer, Object> data = msg.newNodeDiscoveryData();
+                     Map<Integer, byte[]> data = msg.newNodeDiscoveryData();
  
                      if (data != null)
-                         exchange.onExchange(node.id(), node.id(), node.order(), data);
 -                        onExchange(node.id(), node.id(), data, exchangeClassLoader(node,
node.id()));
++                        onExchange(node.id(), node.id(), node.order(), data, exchangeClassLoader(node,
node.id()));
  
-                     msg.addDiscoveryData(locNodeId, exchange.collect(node.id()));
+                     msg.addDiscoveryData(locNodeId, collectExchangeData(node.id()));
                  }
  
                  if (log.isDebugEnabled())
@@@ -3615,8 -3794,12 +3794,13 @@@
  
                  // Notify outside of synchronized block.
                  if (dataMap != null) {
-                     for (Map.Entry<UUID, Map<Integer, Object>> entry : dataMap.entrySet())
-                         exchange.onExchange(node.id(), entry.getKey(), node.order(), entry.getValue());
+                     for (Map.Entry<UUID, Map<Integer, byte[]>> entry : dataMap.entrySet())
{
+                         onExchange(node.id(),
+                             entry.getKey(),
++                            node.order(),
+                             entry.getValue(),
+                             exchangeClassLoader(node, entry.getKey()));
+                     }
                  }
              }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
index c12d7db,3c61f00..73b8661
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
@@@ -383,8 -383,7 +383,8 @@@ public abstract class AbstractDiscovery
                          return new HashMap<>();
                      }
  
 -                    @Override public void onExchange(UUID joiningNodeId, UUID nodeId, Map<Integer,
Serializable> data) {
 +                    @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long
topVer,
-                         Map<Integer, Object> data) {
++                        Map<Integer, Serializable> data) {
                          // No-op.
                      }
                  });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiStartStopSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiStartStopSelfTest.java
index 7eb7f82,1ce0bcd..a8409d2
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiStartStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiStartStopSelfTest.java
@@@ -48,7 -49,7 +49,7 @@@ public class TcpDiscoverySpiStartStopSe
                  return null;
              }
  
-             @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Object> data) {
 -            @Override public void onExchange(UUID joiningNodeId, UUID nodeId, Map<Integer,
Serializable> data) {
++            @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Serializable> data) {
                  // No-op.
              }
          };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c0436ff/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java
index 2792167,de8596d..b426611
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java
@@@ -212,7 -212,7 +212,7 @@@ public abstract class GridSpiAbstractTe
                      return new HashMap<>();
                  }
  
-                 @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Object> data) {
 -                @Override public void onExchange(UUID joiningNodeId, UUID nodeId, Map<Integer,
Serializable> data) {
++                @Override public void onExchange(UUID joiningNodeId, UUID nodeId, long topVer,
Map<Integer, Serializable> data) {
                  }
              });
  


Mime
View raw message