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/05/26 02:52:16 UTC

[GitHub] [pulsar] Anonymitaet commented on a change in pull request #10653: [Transaction] Transaction admin api get coordinator internal stats.

Anonymitaet commented on a change in pull request #10653:
URL: https://github.com/apache/pulsar/pull/10653#discussion_r639363500



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Transactions.java
##########
@@ -39,4 +40,14 @@
      */
     CompletableFuture<List<TransactionCoordinatorStatus>> getCoordinatorStatusList();
 
+    /**
+     * Get transaction coordinator internal stats.
+     *
+     * @param coordinatorId the coordinator id

Review comment:
       ```suggestion
        * @param coordinatorId the coordinator ID
   ```

##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Transactions.java
##########
@@ -39,4 +40,14 @@
      */
     CompletableFuture<List<TransactionCoordinatorStatus>> getCoordinatorStatusList();
 
+    /**
+     * Get transaction coordinator internal stats.
+     *
+     * @param coordinatorId the coordinator id
+     * @param metadata is get ledger metadata

Review comment:
       ```suggestion
        * @param metadata the ledger metadata
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/ManagedLedgerInternalStats.java
##########
@@ -0,0 +1,104 @@
+/**
+ * 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.pulsar.common.policies.data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ManagedLedger internal statistics.
+ */
+public class ManagedLedgerInternalStats {
+
+    /** Messages published since this broker loaded this managedLedger. */
+    public long entriesAddedCounter;
+
+    /** The total number of entries being tracked. */
+    public long numberOfEntries;
+
+    /**The total storage size in bytes of all messages. */
+    public long totalSize;
+
+    /**The count of messages written to the ledger that is currently open for writing. */
+    public long currentLedgerEntries;
+
+    /**The size in bytes of messages written to the ledger that is currently open for writing.. */
+    public long currentLedgerSize;
+
+    /**The time when the last ledger is created. */
+    public String lastLedgerCreatedTimestamp;
+
+    /**The time when the last ledger failed. */
+    public String lastLedgerCreationFailureTimestamp;
+
+    /**The number of cursors that are "caught up" and waiting for a new message to be published. */
+    public int waitingCursorsCount;
+
+    /**The number of messages that complete (asynchronous) write requests. */
+    public int pendingAddEntriesCount;
+
+    /**The ledgerid:entryid of the last message that is written successfully.

Review comment:
       ```suggestion
       /**The ledgerid: entryid of the last message that is written successfully.
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/ManagedLedgerInternalStats.java
##########
@@ -0,0 +1,104 @@
+/**
+ * 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.pulsar.common.policies.data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ManagedLedger internal statistics.
+ */
+public class ManagedLedgerInternalStats {
+
+    /** Messages published since this broker loaded this managedLedger. */
+    public long entriesAddedCounter;
+
+    /** The total number of entries being tracked. */
+    public long numberOfEntries;
+
+    /**The total storage size in bytes of all messages. */
+    public long totalSize;
+
+    /**The count of messages written to the ledger that is currently open for writing. */
+    public long currentLedgerEntries;
+
+    /**The size in bytes of messages written to the ledger that is currently open for writing.. */

Review comment:
       ```suggestion
       /**The size of messages written to the ledger that is currently open for writing (in bytes). */
   ```

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/ManagedLedgerInternalStats.java
##########
@@ -0,0 +1,104 @@
+/**
+ * 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.pulsar.common.policies.data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ManagedLedger internal statistics.
+ */
+public class ManagedLedgerInternalStats {
+
+    /** Messages published since this broker loaded this managedLedger. */
+    public long entriesAddedCounter;
+
+    /** The total number of entries being tracked. */
+    public long numberOfEntries;
+
+    /**The total storage size in bytes of all messages. */

Review comment:
       ```suggestion
       /**The total storage size of all messages (in bytes). */
   ```




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