ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [29/50] incubator-ignite git commit: #ignite-239: remove replicaCount from GridClientNode and GridClientNodeBean.
Date Tue, 03 Mar 2015 10:55:50 GMT
#ignite-239: remove replicaCount from GridClientNode and GridClientNodeBean.


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

Branch: refs/heads/ignite-187
Commit: 5f620d62191188ff4dcbe55c5d0399603e494b45
Parents: 6c67bdf
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Mar 2 12:40:13 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Mar 2 12:40:13 2015 +0300

----------------------------------------------------------------------
 .../impl/ClientPartitionAffinitySelfTest.java   |  4 +---
 .../ClientTcpUnreachableMultiNodeSelfTest.java  |  4 ----
 .../ignite/internal/client/GridClientNode.java  |  8 -------
 .../client/GridClientPartitionAffinity.java     |  2 +-
 .../client/impl/GridClientNodeImpl.java         | 22 -------------------
 .../connection/GridClientNioTcpConnection.java  |  3 +--
 .../rest/client/message/GridClientNodeBean.java | 23 --------------------
 7 files changed, 3 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPartitionAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPartitionAffinitySelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPartitionAffinitySelfTest.java
index 7ece534..6af1c4c 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPartitionAffinitySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPartitionAffinitySelfTest.java
@@ -152,7 +152,7 @@ public class ClientPartitionAffinitySelfTest extends GridCommonAbstractTest
{
 
         aff.setHashIdResolver(new GridClientPartitionAffinity.HashIdResolver() {
             @Override public Object getHashId(GridClientNode node) {
-                return node.replicaCount();
+                return 1;
             }
         });
 
@@ -258,7 +258,6 @@ public class ClientPartitionAffinitySelfTest extends GridCommonAbstractTest
{
     private GridClientNode createNode(String nodeId, int replicaCnt) {
         return GridClientNodeImpl.builder()
             .nodeId(UUID.fromString(nodeId))
-            .replicaCount(replicaCnt)
             .build();
     }
 
@@ -276,7 +275,6 @@ public class ClientPartitionAffinitySelfTest extends GridCommonAbstractTest
{
 
             nodes.add(GridClientNodeImpl.builder()
                 .nodeId(nodeId)
-                .replicaCount(replicaCnt)
                 .build());
 
             ClusterNode srvNode = new TestRichNode(nodeId);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java
index bb3710e..fda7e99 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java
@@ -85,10 +85,6 @@ public class ClientTcpUnreachableMultiNodeSelfTest extends ClientTcpMultiNodeSel
                     return node.caches();
                 }
 
-                @Override public int replicaCount() {
-                    return node.replicaCount();
-                }
-
                 @Override public List<String> tcpAddresses() {
                     return node.tcpAddresses();
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientNode.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientNode.java
index ac2fe86..74e612d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientNode.java
@@ -99,14 +99,6 @@ public interface GridClientNode {
     public Map<String, GridClientCacheMode> caches();
 
     /**
-     * Gets node replica count for consistent hash ring (valid only for
-     * {@code PARTITIONED} caches).
-     *
-     * @return Node replica count for consistent hash ring.
-     */
-    public int replicaCount();
-
-    /**
      * Gets collection of addresses on which REST binary protocol is bound.
      *
      * @param proto Protocol for which addresses are obtained.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientPartitionAffinity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientPartitionAffinity.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientPartitionAffinity.java
index a0fad61..b747bc4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientPartitionAffinity.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientPartitionAffinity.java
@@ -274,7 +274,7 @@ public class GridClientPartitionAffinity implements GridClientDataAffinity,
Grid
         nodeInfo = new NodeInfo(nodeId, hashIdRslvr == null ? nodeId : hashIdRslvr.getHashId(n));
 
         addedNodes.put(nodeId, nodeInfo);
-        nodeHash.addNode(nodeInfo, n.replicaCount());
+        nodeHash.addNode(nodeInfo, 1);
 
         return nodeInfo;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientNodeImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientNodeImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientNodeImpl.java
index 6692550..9c59b84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientNodeImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientNodeImpl.java
@@ -53,9 +53,6 @@ public class GridClientNodeImpl implements GridClientNode {
     /** Node caches. */
     private Map<String, GridClientCacheMode> caches = Collections.emptyMap();
 
-    /** Replica count for partitioned cache. */
-    private int replicaCnt;
-
     /** Connectable property. */
     private boolean connectable;
 
@@ -95,7 +92,6 @@ public class GridClientNodeImpl implements GridClientNode {
             .tcpAddresses(from.tcpAddresses())
             .tcpPort(from.tcpPort())
             .caches(from.caches())
-            .replicaCount(from.replicaCount())
             .connectable(from.connectable());
 
         if (!skipAttrs)
@@ -154,11 +150,6 @@ public class GridClientNodeImpl implements GridClientNode {
     }
 
     /** {@inheritDoc} */
-    @Override public int replicaCount() {
-        return replicaCnt;
-    }
-
-    /** {@inheritDoc} */
     @Override public Collection<InetSocketAddress> availableAddresses(GridClientProtocol
proto,
         boolean filterResolved) {
         Collection<String> addrs;
@@ -368,19 +359,6 @@ public class GridClientNodeImpl implements GridClientNode {
             return this;
         }
 
-
-        /**
-         * Sets replica count for node on consistent hash ring.
-         *
-         * @param replicaCnt Replica count.
-         * @return This for chaining.
-         */
-        public Builder replicaCount(int replicaCnt) {
-            impl.replicaCnt = replicaCnt;
-
-            return this;
-        }
-
         /**
          * Sets connectable property.
          *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
index d84bca5..44d10f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
@@ -868,8 +868,7 @@ public class GridClientNioTcpConnection extends GridClientConnection {
             .nodeId(nodeBean.getNodeId())
             .consistentId(nodeBean.getConsistentId())
             .tcpAddresses(nodeBean.getTcpAddresses())
-            .tcpPort(nodeBean.getTcpPort())
-            .replicaCount(nodeBean.getReplicaCount());
+            .tcpPort(nodeBean.getTcpPort());
 
         Map<String, GridClientCacheMode> caches = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f620d62/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
index 6605a15..833abd9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
@@ -56,9 +56,6 @@ public class GridClientNodeBean implements Externalizable {
     /** Node caches. */
     private Map<String, String> caches;
 
-    /** Default replica count for partitioned cache. */
-    private int replicaCnt;
-
     /**
      * Gets node ID.
      *
@@ -209,24 +206,6 @@ public class GridClientNodeBean implements Externalizable {
     }
 
     /**
-     * Gets node replica count on consistent hash ring.
-     *
-     * @return Node replica count.
-     */
-    public int getReplicaCount() {
-        return replicaCnt;
-    }
-
-    /**
-     * Sets node replica count on consistent hash ring.
-     *
-     * @param replicaCnt Node replica count.
-     */
-    public void setReplicaCount(int replicaCnt) {
-        this.replicaCnt = replicaCnt;
-    }
-
-    /**
      * Sets REST binary protocol port.
      *
      * @param tcpPort Port on which REST binary protocol is bound.
@@ -257,7 +236,6 @@ public class GridClientNodeBean implements Externalizable {
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         out.writeInt(tcpPort);
         out.writeInt(0); // Jetty port.
-        out.writeInt(replicaCnt);
 
         U.writeString(out, dfltCacheMode);
 
@@ -279,7 +257,6 @@ public class GridClientNodeBean implements Externalizable {
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
         tcpPort = in.readInt();
         in.readInt(); // Jetty port.
-        replicaCnt = in.readInt();
 
         dfltCacheMode = U.readString(in);
 


Mime
View raw message