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 2022/07/05 08:56:31 UTC

[GitHub] [pulsar] liangyepianzhou opened a new pull request, #16396: [Improve] [txn] add txn admin cmd - getPositionStatsInPendingAck

liangyepianzhou opened a new pull request, #16396:
URL: https://github.com/apache/pulsar/pull/16396

   ### Motivation &  Modifications
   Added missing admin cmd
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   (Please explain why)
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


-- 
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] liangyepianzhou commented on a diff in pull request #16396: [Improve] [txn] add txn admin cmd and swagger config for transaction admin

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on code in PR #16396:
URL: https://github.com/apache/pulsar/pull/16396#discussion_r915559928


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v3/Transactions.java:
##########
@@ -345,7 +345,7 @@ public void scaleTransactionCoordinators(@Suspended final AsyncResponse asyncRes
     }
 
     @GET
-    @Path("/pendingAckStats/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")
+    @Path("/positionStatsInPendingAck/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")

Review Comment:
   Could you please take a look again?
   



-- 
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] liangyepianzhou commented on a diff in pull request #16396: [Improve] [txn] add txn admin cmd and swagger config for transaction admin

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on code in PR #16396:
URL: https://github.com/apache/pulsar/pull/16396#discussion_r914722923


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v3/Transactions.java:
##########
@@ -345,7 +345,7 @@ public void scaleTransactionCoordinators(@Suspended final AsyncResponse asyncRes
     }
 
     @GET
-    @Path("/pendingAckStats/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")
+    @Path("/positionStatsInPendingAck/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")

Review Comment:
   This [PR](https://github.com/apache/pulsar/pull/15682) has not been cherry-picked.



-- 
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] nicoloboschi commented on a diff in pull request #16396: [Improve] [txn] add txn admin cmd and swagger config for transaction admin

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on code in PR #16396:
URL: https://github.com/apache/pulsar/pull/16396#discussion_r914565762


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v3/Transactions.java:
##########
@@ -345,7 +345,7 @@ public void scaleTransactionCoordinators(@Suspended final AsyncResponse asyncRes
     }
 
     @GET
-    @Path("/pendingAckStats/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")
+    @Path("/positionStatsInPendingAck/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}")

Review Comment:
   can you confirm this endpoint is not released yet so it's not a real breaking change?



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java:
##########
@@ -196,6 +196,29 @@ void run() throws Exception {
         }
     }
 
+    @Parameters(commandDescription = "Get the position stats in transaction pending ack")
+    private class GetPositionStatsInPendingAck extends CliCommand {
+        @Parameter(names = {"-t", "--topic"}, description = "the topic name", required = true)
+        private String topic;
+
+        @Parameter(names = {"-s", "--sub-name"}, description = "the subscription name", required = true)
+        private String subName;
+
+        @Parameter(names = {"-l", "--ledgerId"}, description = "the ledger ID of the position", required = true)

Review Comment:
   ```suggestion
           @Parameter(names = {"-l", "--ledger-id"}, description = "Ledger ID of the position", required = true)
   ```



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java:
##########
@@ -196,6 +196,29 @@ void run() throws Exception {
         }
     }
 
+    @Parameters(commandDescription = "Get the position stats in transaction pending ack")
+    private class GetPositionStatsInPendingAck extends CliCommand {
+        @Parameter(names = {"-t", "--topic"}, description = "the topic name", required = true)
+        private String topic;
+
+        @Parameter(names = {"-s", "--sub-name"}, description = "the subscription name", required = true)
+        private String subName;
+
+        @Parameter(names = {"-l", "--ledgerId"}, description = "the ledger ID of the position", required = true)
+        private Long ledgerId;
+
+        @Parameter(names = {"-e", "--entryId"}, description = "the entry ID of the position", required = true)
+        private Long entryId;
+
+        @Parameter(names = {"-b", "--bacthIndex"}, description = "the bacthIndex of the position")

Review Comment:
   ```suggestion
           @Parameter(names = {"-b", "--batch-index"}, description = "Batch index of the position")
   ```



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java:
##########
@@ -196,6 +196,29 @@ void run() throws Exception {
         }
     }
 
+    @Parameters(commandDescription = "Get the position stats in transaction pending ack")
+    private class GetPositionStatsInPendingAck extends CliCommand {
+        @Parameter(names = {"-t", "--topic"}, description = "the topic name", required = true)

Review Comment:
   Please capitalize the descriptions



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java:
##########
@@ -196,6 +196,29 @@ void run() throws Exception {
         }
     }
 
+    @Parameters(commandDescription = "Get the position stats in transaction pending ack")
+    private class GetPositionStatsInPendingAck extends CliCommand {
+        @Parameter(names = {"-t", "--topic"}, description = "the topic name", required = true)
+        private String topic;
+
+        @Parameter(names = {"-s", "--sub-name"}, description = "the subscription name", required = true)

Review Comment:
   ```suggestion
           @Parameter(names = {"-s", "--subscription-name"}, description = "Subscription name", required = true)
   ```



-- 
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] liangyepianzhou merged pull request #16396: [Improve] [txn] add txn admin cmd and swagger config for transaction admin

Posted by GitBox <gi...@apache.org>.
liangyepianzhou merged PR #16396:
URL: https://github.com/apache/pulsar/pull/16396


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