codelipenghui commented on a change in pull request #10642:
URL: https://github.com/apache/pulsar/pull/10642#discussion_r637476912



##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java
##########
@@ -41,8 +42,26 @@ void run() throws Exception {
         }
     }
 
+    @Parameters(commandDescription = "Get transaction in buffer stats")
+    private class GetTransactionInBufferStats extends CliCommand {
+        @Parameter(names = {"-c", "--coordinator-id"}, description = "the 
coordinator id", required = true)
+        private int coordinatorId;
+
+        @Parameter(names = {"-id", "--sequence-id"}, description = "the 
sequence id", required = true)
+        private int sequenceId;

Review comment:
       `sequenceId` is confusing here because this is also a  concept in the 
producer side, it's better to use `--transactionId` here? Such as 
--transactionId 0:123456

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v3/Transactions.java
##########
@@ -53,4 +54,27 @@ public void getCoordinatorStatus(@Suspended final 
AsyncResponse asyncResponse,
                                      @QueryParam("coordinatorId") Integer 
coordinatorId) {
         internalGetCoordinatorStatus(asyncResponse, authoritative, 
coordinatorId);
     }
+
+    @GET
+    @Path("/transactionInBufferStats")
+    @ApiOperation(value = "Get transaction state in transaction buffer.")
+    @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
+            @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
+            @ApiResponse(code = 503, message = "This Broker is not configured "
+                    + "with transactionCoordinatorEnabled=true."),
+            @ApiResponse(code = 500, message = "Topic don't owner by this 
broker!"),

Review comment:
       should be 307 here?




-- 
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:
[email protected]


Reply via email to