You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/16 15:35:38 UTC

[GitHub] [pulsar] MarvinCai commented on a change in pull request #8567: Add key-shared consumer range to internal topic stats.

MarvinCai commented on a change in pull request #8567:
URL: https://github.com/apache/pulsar/pull/8567#discussion_r524357803



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
##########
@@ -369,6 +369,10 @@ public SubType getType() {
         return recentlyJoinedConsumers;
     }
 
+    public Map<String, List<String>> getConsumerRange() {

Review comment:
       updated

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/StickyKeyConsumerSelector.java
##########
@@ -43,4 +46,10 @@
      * @return consumer
      */
     Consumer select(byte[] stickyKey);
+
+    /**
+     * Get range handled by each consumer
+     * @return A map where key is a consumer name and value is list of range it receiving message for.
+     */
+    Map<String, List<String>> getConsumerRange();

Review comment:
       updated

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/ConsumerStats.java
##########
@@ -77,6 +78,9 @@
     public long lastAckedTimestamp;
     public long lastConsumedTimestamp;
 
+    /** Hash range assigned to this consumer if is Key_Shared sub mode. **/
+    public List<String> keyHashRange;

Review comment:
       updated




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org