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 get pending ack internal stats #10725

Conversation

congbobo184
Copy link
Contributor

Motivation

Transaction add admin api getPendingAckInternalStats

implement

/**
 * Transaction pending ack internal stats.
 */
public class TransactionPendingAckInternalStats {

    /** The manage ledger internal stats*/
    public ManagedLedgerInternalStats managedLedgerInternalStats;
}

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 and others added 14 commits May 20, 2021 17:40
…tr_internal_stats

# Conflicts:
#	pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java
…/admin/Transactions.java

Co-authored-by: Yu Liu <50226895+Anonymitaet@users.noreply.github.com>
…tr_internal_stats

# Conflicts:
#	pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TransactionsBase.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
…tats' of https://github.com/congbobo184/pulsar into congbobo184_transaction_admin_api_coordinatr_internal_stats
@congbobo184 congbobo184 self-assigned this May 27, 2021
@congbobo184 congbobo184 added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label May 27, 2021
cs.cursorLedger = cursor.getCursorLedger();
cs.cursorLedgerLastEntry = cursor.getCursorLedgerLastEntry();
cs.individuallyDeletedMessages = cursor.getIndividuallyDeletedMessages();
cs.lastLedgerSwitchTimestamp = DateFormatter.format(cursor.getLastLedgerSwitchTimestamp());
Copy link
Contributor

Choose a reason for hiding this comment

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

can this getLastLedgerSwitchTimestamp return null ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method does not seem to be used anymore, I forgot to delete it.

/**
* Get managed ledger internal stats
*
* @param includeLedgerMetadata the flag to control it include ledger metadata
Copy link
Member

Choose a reason for hiding this comment

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

control it
What does "it" refer to?

* Get transaction coordinator internal stats.
*
* @param coordinatorId the coordinator ID
* @param metadata is get ledger metadata
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param metadata is get ledger metadata
* @param metadata the ledger metadata

do you mean this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whether to get metadata

/**
* Get transaction coordinator internal stats.
*
* @param coordinatorId the coordinator id
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param coordinatorId the coordinator id
* @param coordinatorId the coordinator ID

*
* @param topic the topic of get pending ack internal stats
* @param subName the subscription name of this pending ack
* @param metadata whether to obtain ledger metadata
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param metadata whether to obtain ledger metadata
* @param metadata whether to obtain ledger metadata

double check: whether to obtain ledger metadata? or * @param metadata the ledger metadata

/** The total number of entries being tracked. */
public long numberOfEntries;

/**The total storage size of all messages (in bytes). */
Copy link
Member

Choose a reason for hiding this comment

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

from this line, there is no space after /**, is this an intended behavior?

@congbobo184 congbobo184 changed the title [Transaction] Transaction admin api get buffer internal stats [Transaction] Transaction admin api get pending ack internal stats May 27, 2021
congbo added 7 commits May 27, 2021 20:39
…tats' into congbobo184_transaction_admin_api_get_buffer_internal_stats

# Conflicts:
#	pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/AdminApiTransactionTest.java
#	pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TransactionsImpl.java
…tats' into congbobo184_transaction_admin_api_get_buffer_internal_stats
…er_internal_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/src/main/java/org/apache/pulsar/admin/cli/CmdTransactions.java
@codelipenghui codelipenghui merged commit 2fce656 into apache:master May 28, 2021
@codelipenghui codelipenghui added this to the 2.8.0 milestone May 28, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request May 29, 2021
…pache#10725)

## Motivation
Transaction add admin api `getPendingAckInternalStats`
## implement
```
/**
 * Transaction pending ack internal stats.
 */
public class TransactionPendingAckInternalStats {

    /** The manage ledger internal stats*/
    public ManagedLedgerInternalStats managedLedgerInternalStats;
}
```
wangjialing218 pushed a commit to wangjialing218/pulsar that referenced this pull request May 31, 2021
…pache#10725)

## Motivation
Transaction add admin api `getPendingAckInternalStats`
## implement
```
/**
 * Transaction pending ack internal stats.
 */
public class TransactionPendingAckInternalStats {

    /** The manage ledger internal stats*/
    public ManagedLedgerInternalStats managedLedgerInternalStats;
}
```
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
…pache#10725)

## Motivation
Transaction add admin api `getPendingAckInternalStats`
## implement
```
/**
 * Transaction pending ack internal stats.
 */
public class TransactionPendingAckInternalStats {

    /** The manage ledger internal stats*/
    public ManagedLedgerInternalStats managedLedgerInternalStats;
}
```
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…pache#10725)

## Motivation
Transaction add admin api `getPendingAckInternalStats`
## implement
```
/**
 * Transaction pending ack internal stats.
 */
public class TransactionPendingAckInternalStats {

    /** The manage ledger internal stats*/
    public ManagedLedgerInternalStats managedLedgerInternalStats;
}
```
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