Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transaction] Transaction admin api transaction in buffer stats #10642

Conversation

congbobo184
Copy link
Contributor

@congbobo184 congbobo184 commented May 19, 2021

Motivation

Transaction add admin api getTransactionInBufferStats

implement

@Data
public class TransactionInBufferStats {

    /** The start position of this transaction in transaction buffer. */
    public String startPosition;

    /** The flag of this transaction have been aborted. */
    public boolean aborted;
}

This is transaction buffer metrics.

Verifying this change

Add the tests for it

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): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (yes)
Anything that affects deployment: (no)

congbo added 5 commits May 19, 2021 16:54
…_admin_api

# Conflicts:
#	pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
…nto congbobo184_transaction_admin_api_transaction_inbuffer_stats

# Conflicts:
#	pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
@codelipenghui codelipenghui added area/transaction component/txn/coordinator doc-required Your PR changes impact docs and you will update later. labels May 20, 2021
@codelipenghui codelipenghui added this to the 2.8.0 milestone May 20, 2021
congbo added 6 commits May 20, 2021 11:03
…nto congbobo184_transaction_admin_api_transaction_inbuffer_stats
…ion_inbuffer_stats

# Conflicts:
#	pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TransactionsBase.java
#	pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v3/Transactions.java
#	pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/AdminApiTransactionTest.java
#	pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Transactions.java
#	pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TransactionsImpl.java
#	pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
#	pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java
@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels May 20, 2021
Comment on lines 47 to 51
@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;
Copy link
Contributor

@codelipenghui codelipenghui May 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@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!"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 307 here?

@codelipenghui codelipenghui merged commit 3e42503 into apache:master May 24, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
…he#10642)

## Motivation
Transaction add admin api `getTransactionInBufferStats`

## implement
```
@DaTa
public class TransactionInBufferStats {

    /** The start position of this transaction in transaction buffer. */
    public String startPosition;

    /** The flag of this transaction have been aborted. */
    public boolean aborted;
}
```
This is transaction buffer metrics.
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…he#10642)

## Motivation
Transaction add admin api `getTransactionInBufferStats`

## implement
```
@DaTa
public class TransactionInBufferStats {

    /** The start position of this transaction in transaction buffer. */
    public String startPosition;

    /** The flag of this transaction have been aborted. */
    public boolean aborted;
}
```
This is transaction buffer metrics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/transaction doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants