[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-06-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16038062#comment-16038062
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user asfgit closed the pull request at:

https://github.com/apache/incubator-rocketmq/pull/67


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-06-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16038055#comment-16038055
 ] 

ASF subversion and git services commented on ROCKETMQ-67:
-

Commit 787d128613d00a617be2f8ef943e9cfafcc07f85 in incubator-rocketmq's branch 
refs/heads/master from [~Jaskey]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=787d128 ]

[ROCKETMQ-67] Consistent Hash allocate strategy closes 
apache/incubator-rocketmq#67


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-05-30 Thread dongeforever (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16030572#comment-16030572
 ] 

dongeforever commented on ROCKETMQ-67:
--

[~Jaskey] yeah, it had been merged. you could check the comment upstairs

> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-05-28 Thread Jaskey Lam (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16028049#comment-16028049
 ] 

Jaskey Lam commented on ROCKETMQ-67:


i wonder why this issue is marked as fixed and closed? is the related pr 
reviewed and merged?

> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-05-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16027280#comment-16027280
 ] 

ASF subversion and git services commented on ROCKETMQ-67:
-

Commit adae1624d05346cd3632c778a656e4055de6bff3 in incubator-rocketmq's branch 
refs/heads/develop from [~Jaskey]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=adae162 ]

[ROCKETMQ-67] Consistent Hash allocate strategy closes 
apache/incubator-rocketmq#67


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-05-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16011699#comment-16011699
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user dhchao11 commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/67#discussion_r116650808
  
--- Diff: 
common/src/main/java/org/apache/rocketmq/common/consistenthash/ConsistentHashRouter.java
 ---
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.rocketmq.common.consistenthash;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+/**
+ * To hash Node objects to a hash ring with a certain amount of virtual 
node.
+ * Method routeNode will return a Node instance which the object key 
should be allocated to according to consistent hash algorithm
+ *
+ * @param 
+ */
+public class ConsistentHashRouter {
+private final SortedMap ring = new TreeMap<>();
+private final HashFunction hashFunction;
+
+public ConsistentHashRouter(Collection pNodes, int vNodeCount) {
+this(pNodes,vNodeCount, new MD5Hash());
+}
+
+/**
+ *
+ * @param pNodes collections of physical nodes
+ * @param vNodeCount amounts of virtual nodes
+ * @param hashFunction hash Function to hash Node instances
+ */
+public ConsistentHashRouter(Collection pNodes, int vNodeCount, 
HashFunction hashFunction) {
+if (hashFunction == null) {
+throw new NullPointerException("Hash Function is null");
+}
+this.hashFunction = hashFunction;
+if (pNodes != null) {
+for (T pNode : pNodes) {
+addNode(pNode, vNodeCount);
+}
+}
+}
+
+/**
+ * add physic node to the hash ring with some virtual nodes
+ * @param pNode physical node needs added to hash ring
+ * @param vNodeCount the number of virtual node of the physical node. 
Value should be greater than or equals to 0
+ */
+public void addNode(T pNode, int vNodeCount) {
+if (vNodeCount < 0) throw new IllegalArgumentException("illegal 
virtual node counts :" + vNodeCount);
+int existingReplicas = getExistingReplicas(pNode);
+for (int i = 0; i < vNodeCount; i++) {
+VirtualNode vNode = new VirtualNode<>(pNode, i + 
existingReplicas);
+ring.put(hashFunction.hash(vNode.getKey()), vNode);
+}
+}
+
+/**
+ * remove the physical node from the hash ring
+ * @param pNode
+ */
+public void removeNode(T pNode) {
+Iterator it = ring.keySet().iterator();
+while (it.hasNext()) {
+Long key = it.next();
+VirtualNode virtualNode = ring.get(key);
+if (virtualNode.isVirtualNodeOf(pNode)) {
+it.remove();
+}
+}
+}
+
+/**
+ * with a specified key, route the nearest Node instance in the 
current hash ring
+ * @param objectKey the object key to find a nearest Node
+ * @return
+ */
+public T routeNode(String objectKey) {
+if (ring.isEmpty()) {
+return null;
+}
+Long hashVal = hashFunction.hash(objectKey);
+SortedMap tailMap = ring.tailMap(hashVal);
+Long nodeHashVal = !tailMap.isEmpty() ? tailMap.firstKey() : 
ring.firstKey();
+return ring.get(nodeHashVal).getPhysicalNode();
+}
+
+
+public int getExistingReplicas(T pNode) {
+int replicas = 0;
+for (VirtualNode vNode : ring.values()) {
+if 

[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-04-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15958434#comment-15958434
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user Jaskey commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  
@shroman @zhouxinyu @lizhanhui @vongosling 

I heard that consistent hash strategy will be accomplished in 4.1.x , while 
this pr has been open for months, can we accelerate it, please help review the 
implementations?


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15904410#comment-15904410
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user Jaskey commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  
@shroman 
The detail descriptions has been updated to JIRA.  I will try described as 
detail as possible when I create an issue in JIRA in the future.


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy option is valueable for the developers 
> who care more about latency stabilization and messages duplication.
> Intentions: 
> The default AllocateMessageQueueStrategy is averaging strategy which allocate 
> queue to consumer as evenly as possible. Whenever queues numbers or consumer 
> numbers changed, say a new consumer starts or an old consumer shutdowns, a 
> rehashing will be triggered then almost all consumer suffered from this that 
> they will rebalance to drop old queues and get new queues.
> And that will cause
> message latency from producer to consumer increases at the moment when 
> consumer/queue numbers change, even when they scale up.
> messages will be duplicated significantly since the offset may not be 
> persisted to broker and that queue is assigned to another consumer to pull 
> messages from.
> This is especially significant when they have tens of consumer instances and 
> scale-up or deployment is often.
> Consistent Hash strategy to allocate queue is a good choice for these users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15904358#comment-15904358
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user shroman commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  
@Jaskey This is a very good description, and now reviewers will understand 
well your intentions :) If you clearly state your intentions in JIRA, or 
discuss in the ml, it saves much time, and good for the record.

Sorry, it's not a code review yet, just wanted understand your intentions.


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15904341#comment-15904341
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user Jaskey commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  
@shroman 

This is feature to give choice to users who cares more about latency 
stabilization and messages duplication.

As you know, the default `AllocateMessageQueueStrategy` is averaging 
strategy which allocate queue to consumer  as evenly as possible. But as you 
states whenever queues numbers or consumer numbers changed, say a new consumer 
starts or an old consumer shutdown, a rehashing will be triggered and almost 
all consumer suffered from this and they rebalance to drop old queues and get 
new queue.

This will cause 
1. message latency from producer to consumer increases at that moment 
2. messages will be duplicated significantly since the offset may not be 
persisted to broker and that queue is assigned to another consumer to pull 
messages from.

This is especially significant when they have tens of consumer instances 
and scale-up or deployment is often.

Consistent Hash strategy to allocate queue is a good choice for these users.




> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15902815#comment-15902815
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user Jaskey commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  
@zhouxinyu @lizhanhui @shroman @vongosling 
any advice on this pr?

Since I think consistent hash can be also applied to order message shading, 
the classes in this pr can be reused. I will submit a new pr for that sharding 
message queue selector after this pr is merged : 
https://issues.apache.org/jira/browse/ROCKETMQ-136?jql=project%20%3D%20ROCKETMQ


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875378#comment-15875378
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10247299/badge)](https://coveralls.io/builds/10247299)

Coverage increased (+0.2%) to 31.677% when pulling 
**17379ca81913f278020f28992eac86007bc7c191 on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875380#comment-15875380
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10247299/badge)](https://coveralls.io/builds/10247299)

Coverage increased (+0.2%) to 31.677% when pulling 
**17379ca81913f278020f28992eac86007bc7c191 on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875345#comment-15875345
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10246899/badge)](https://coveralls.io/builds/10246899)

Coverage increased (+0.05%) to 31.571% when pulling 
**d96a23f50a70dd0eedef9e022fbacb567fc8923a on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875347#comment-15875347
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10246899/badge)](https://coveralls.io/builds/10246899)

Coverage increased (+0.05%) to 31.571% when pulling 
**d96a23f50a70dd0eedef9e022fbacb567fc8923a on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875339#comment-15875339
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10246847/badge)](https://coveralls.io/builds/10246847)

Coverage increased (+0.2%) to 31.673% when pulling 
**fa0d936dd0b5a3dee482d97a11e0ea181e8b1f3a on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875302#comment-15875302
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user Jaskey commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/67#discussion_r102125928
  
--- Diff: 
common/src/main/java/org/apache/rocketmq/common/consistenthash/Node.java ---
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.rocketmq.common.consistenthash;
+
+/**
+ * Created by jaskeylin on 2017/2/20.
--- End diff --

Sorry , i didn'it notice that. Just a minute


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875294#comment-15875294
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user zhouxinyu commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/67#discussion_r102124935
  
--- Diff: 
common/src/main/java/org/apache/rocketmq/common/consistenthash/Node.java ---
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.rocketmq.common.consistenthash;
+
+/**
+ * Created by jaskeylin on 2017/2/20.
--- End diff --

Hi, please remove the author info.  


> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874149#comment-15874149
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10230561/badge)](https://coveralls.io/builds/10230561)

Coverage increased (+0.08%) to 31.603% when pulling 
**a56df6a703a4e4474ec401244b0343c1fe29f324 on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874147#comment-15874147
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10230561/badge)](https://coveralls.io/builds/10230561)

Coverage increased (+0.08%) to 31.603% when pulling 
**a56df6a703a4e4474ec401244b0343c1fe29f324 on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874148#comment-15874148
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/67
  

[![Coverage 
Status](https://coveralls.io/builds/10230561/badge)](https://coveralls.io/builds/10230561)

Coverage increased (+0.08%) to 31.603% when pulling 
**a56df6a703a4e4474ec401244b0343c1fe29f324 on 
Jaskey:ROCKETMQ-67-Consistent-Hash** into 
**573b22c37806a21543b90707bcce6022243a62da on apache:master**.



> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ROCKETMQ-67) Consistent Hash allocate strategy support

2017-02-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874135#comment-15874135
 ] 

ASF GitHub Bot commented on ROCKETMQ-67:


GitHub user Jaskey opened a pull request:

https://github.com/apache/incubator-rocketmq/pull/67

[ROCKETMQ-67] Consistent Hash allocate strategy

JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-67

suport virtual nodes and custom hash algorithm

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Jaskey/incubator-rocketmq 
ROCKETMQ-67-Consistent-Hash

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rocketmq/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #67


commit a56df6a703a4e4474ec401244b0343c1fe29f324
Author: Jaskey 
Date:   2017-02-20T07:13:09Z

ROCKETMQ-67 : Consistent Hash allocate strategy




> Consistent Hash allocate strategy support
> -
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
>  Issue Type: New Feature
>  Components: rocketmq-client
>Reporter: Jaskey Lam
>Assignee: Xiaorui Wang
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients 
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares 
> more about  stabilization than averaging.
>  This option should be supported. And averaging should be meet as much as 
> possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)