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 2021/07/27 10:19:18 UTC

[GitHub] [pulsar] frankxieke opened a new pull request #11465: Add offload ledger info for admin topics stats

frankxieke opened a new pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465


   ### Motivation
   Currently, we don't have offload stats when getting the topic stats bin/pulsar-admin topics stats.
   We should add metrics in topic stats on last offloaded ledger id, last successful offloaded timestamp, and last offload failure timestamp. 
   
   ### Modifications
   Add lastOffloadedLedgerId, lastOffloadSuccessTimestamp, lastOffloadFailureTimestamp for ManagedLedgerImpl and TopicStatsImpl.
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] Anonymitaet commented on pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#issuecomment-887953454


   Thanks for your contribution. For this PR, do we need to update docs?
   
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui closed pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
codelipenghui closed pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] frankxieke commented on a change in pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
frankxieke commented on a change in pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#discussion_r677913073



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadLedgerId();
+
+    /**
+    * Get last Suceessful Offload timestamp, if no successful offload, return 0.
+     *
+     * @return last successful offload timestamp
+     */
+    long getLastOffloadSuccessTimestamp();

Review comment:
       ok




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#discussion_r677943856



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadedLedgerId();
+
+    /**
+    * Get last Suceessful Offload timestamp, if no successful offload, return 0.
+     *
+     * @return last successful offload timestamp
+     */
+    long getLastOffloadedSuccessTimestamp();
+
+    /**
+     * Get last failed Offload timestamp, if no failed offload, return 0.

Review comment:
       ```suggestion
        * Get last failed offload timestamp. If no failed offload, it returns 0.
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/TopicStatsImpl.java
##########
@@ -78,6 +78,15 @@
     /** Space used to store the offloaded messages for the topic/. */
     public long offloadedStorageSize;
 
+    /** record last successful Offload legerId, if no offload leger, the value should be 0 */
+    public long lastOffloadLedgerId;
+
+    /** record last successful offload timestamp, if no successful offload, the value should be 0 */
+    public long lastOffloadSuccessTimeStamp;
+
+    /** record last failed offload timestamp, if no failed offload, the value should be 0*/

Review comment:
       ```suggestion
       /** record last failed offload timestamp. If no failed offload, the value should be 0*/
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/TopicStatsImpl.java
##########
@@ -78,6 +78,15 @@
     /** Space used to store the offloaded messages for the topic/. */
     public long offloadedStorageSize;
 
+    /** record last successful Offload legerId, if no offload leger, the value should be 0 */
+    public long lastOffloadLedgerId;
+
+    /** record last successful offload timestamp, if no successful offload, the value should be 0 */

Review comment:
       ```suggestion
       /** record last successful offload timestamp. If no successful offload, the value should be 0 */
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/TopicStatsImpl.java
##########
@@ -78,6 +78,15 @@
     /** Space used to store the offloaded messages for the topic/. */
     public long offloadedStorageSize;
 
+    /** record last successful Offload legerId, if no offload leger, the value should be 0 */

Review comment:
       ```suggestion
       /** record last successful Offload legerId. If no offload leger, the value should be 0 */
   ```

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadedLedgerId();
+
+    /**
+    * Get last Suceessful Offload timestamp, if no successful offload, return 0.

Review comment:
       ```suggestion
       * Get last successful offload timestamp. If no successful offload, it returns 0.
   ```

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.

Review comment:
       ```suggestion
        * Get last offloaded ledgerId. If no offloaded, it returns 0.
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui merged pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] frankxieke commented on a change in pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
frankxieke commented on a change in pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#discussion_r677912967



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadLedgerId();

Review comment:
       ok




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] frankxieke commented on pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
frankxieke commented on pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#issuecomment-887987400


   > Thanks for your contribution. For this PR, do we need to update docs?
   > 
   > (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)
   
   Yes, we need the "REST APIs => PERSISTENT TOPIC => Get the stats for the topic"  api return result 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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui commented on a change in pull request #11465: Add offload ledger info for admin topics stats

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #11465:
URL: https://github.com/apache/pulsar/pull/11465#discussion_r677539326



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadLedgerId();

Review comment:
       ```suggestion
       long getLastOffloadedLedgerId();
   ```

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -393,6 +393,27 @@
      */
     long getOffloadedSize();
 
+    /**
+     * Get last offloaded ledgerId, if no offloaed yet, return 0.
+     *
+     * @return last offloaded ledgerId
+     */
+    long getLastOffloadLedgerId();
+
+    /**
+    * Get last Suceessful Offload timestamp, if no successful offload, return 0.
+     *
+     * @return last successful offload timestamp
+     */
+    long getLastOffloadSuccessTimestamp();

Review comment:
       ```suggestion
       long getLastOffloadedSuccessTimestamp();
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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