Huanli-Meng commented on a change in pull request #8375:
URL: https://github.com/apache/pulsar/pull/8375#discussion_r513365145
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
Review comment:
```suggestion
You can check the following statistics of a given non-partitioned topic.
```
check through the whole updates
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
- - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second
+ - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second.
- - **msgThroughputIn**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputIn**: The sum of all local and replication publishers'
publish rates in bytes per second.
- - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second
+ - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second.
- - **msgThroughputOut**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputOut**: The sum of all local and replication consumers'
dispatch rates in bytes per second.
- - **averageMsgSize**: The average size in bytes of messages published
within the last interval
+ - **averageMsgSize**: The average size(in bytes) of messages published
within the last interval.
- - **storageSize**: The sum of the ledgers' storage size for this topic.
Space used to store the messages for the topic
+ - **storageSize**: The sum of the ledgers' storage size for this topic.
The space used to store the messages for the topic.
- - **publishers**: The list of all local publishers into the topic. There
can be zero or thousands
+ - **publishers**: The list of all local publishers into the topic. The
list ranges from zero to thousands.
- - **msgRateIn**: Total rate of messages published by this publisher in
messages per second
+ - **msgRateIn**: The total rate of messages published by this
publisher in messages per second.
- - **msgThroughputIn**: Total throughput of the messages published by
this publisher in bytes per second
+ - **msgThroughputIn**: The total throughput of the messages published
by this publisher in bytes per second.
- - **averageMsgSize**: Average message size in bytes from this
publisher within the last interval
+ - **averageMsgSize**: The average message size in bytes from this
publisher within the last interval.
- - **producerId**: Internal identifier for this producer on this topic
+ - **producerId**: The internal identifier for this producer on this
topic.
- - **producerName**: Internal identifier for this producer, generated
by the client library
+ - **producerName**: The internal identifier for this producer,
generated by the client library.
- - **address**: IP address and source port for the connection of this
producer
+ - **address**: The IP address and source port for the connection of
this producer.
- - **connectedSince**: Timestamp this producer was created or last
reconnected
+ - **connectedSince**: The timestamp when this producer is created or
reconnected last time.
- - **subscriptions**: The list of all local subscriptions to the topic
+ - **subscriptions**: The list of all local subscriptions to the topic.
- - **my-subscription**: The name of this subscription (client defined)
+ - **my-subscription**: The name of this subscription. It is defined by
the client.
- - **msgRateOut**: Total rate of messages delivered on this
subscription (msg/s)
+ - **msgRateOut**: The total rate of messages delivered on this
subscription (msg/s).
- - **msgThroughputOut**: Total throughput delivered on this
subscription (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered on this
subscription (bytes/s).
- - **msgBacklog**: Number of messages in the subscription backlog
+ - **msgBacklog**: The number of messages in the subscription
backlog.
- - **type**: This subscription type
+ - **type**: The subscription type.
- - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL
+ - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL.
- - **lastExpireTimestamp**: The last message expire execution
timestamp
+ - **lastExpireTimestamp**: The timestamp of the last message
expire execution.
- - **lastConsumedFlowTimestamp**: The last flow command received
timestamp
+ - **lastConsumedFlowTimestamp**: The timestamp of the last flow
command received.
- - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers
+ - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers.
- - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers
+ - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers.
- - **consumers**: The list of connected consumers for this
subscription
+ - **consumers**: The list of connected consumers for this
subscription.
- - **msgRateOut**: Total rate of messages delivered to the
consumer (msg/s)
+ - **msgRateOut**: The total rate of messages delivered to
the consumer (msg/s).
- - **msgThroughputOut**: Total throughput delivered to the
consumer (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered to
the consumer (bytes/s).
- - **consumerName**: Internal identifier for this consumer,
generated by the client library
+ - **consumerName**: The internal identifier for this
consumer, generated by the client library.
- - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. A value of 0 means the
client library's queue is full and receive() isn't being called. A nonzero
value means this consumer is ready to be dispatched messages.
+ - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. `0` means the client
library's queue is full and `receive()` isn't being called. A nonzero value
means this consumer is ready to be dispatched messages.
Review comment:
```suggestion
- **availablePermits**: The number of messages that the
consumer has space for in the client library's listen queue. `0` means the
client library's queue is full and `receive()` isn't being called. A non-zero
value means this consumer is ready for dispatched messages.
```
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -307,94 +299,95 @@ It shows current statistics of a given non-partitioned
topic.
"replication": {}
}
```
+To get the status of a topic, you can use the following ways.
-#### pulsar-admin
-
-Topic stats can be fetched using [`stats`](../../reference/CliTools#stats)
command.
-
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent stats \
+$ pulsar-admin topics stats \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|GET|/admin/v2/persistent/:tenant/:namespace/:topic/stats|operation/getStats}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|GET|/admin/v2/topics/:tenant/:namespace/:topic/stats|operation/getStats}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().getStats(topic);
+admin.topics().getStats(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get internal stats
-It shows detailed statistics of a topic.
+You can get the detailed statistics of a topic.
- - **entriesAddedCounter**: Messages published since this broker loaded
this topic
+ - **entriesAddedCounter**: Messages published since this broker loaded
this topic.
- - **numberOfEntries**: Total number of messages being tracked
+ - **numberOfEntries**: The total number of messages being tracked.
- - **totalSize**: Total storage size in bytes of all messages
+ - **totalSize**: The total storage size in bytes of all messages.
- - **currentLedgerEntries**: Count of messages written to the ledger
currently open for writing
+ - **currentLedgerEntries**: The count of messages written to the ledger
that is currently open for writing.
- - **currentLedgerSize**: Size in bytes of messages written to ledger
currently open for writing
+ - **currentLedgerSize**: The size in bytes of messages written to the
ledger that is currently open for writing.
- - **lastLedgerCreatedTimestamp**: time when last ledger was created
+ - **lastLedgerCreatedTimestamp**: The time when the last ledger is created.
- - **lastLedgerCreationFailureTimestamp:** time when last ledger was failed
+ - **lastLedgerCreationFailureTimestamp:** The time when the last ledger
failed.
- - **waitingCursorsCount**: How many cursors are "caught up" and waiting
for a new message to be published
+ - **waitingCursorsCount**: How many cursors are "caught up" and waiting
for a new message to be published.
- - **pendingAddEntriesCount**: How many messages have (asynchronous) write
requests we are waiting on completion
+ - **pendingAddEntriesCount**: The number of messages that complete
(asynchronous) write requests.
- - **lastConfirmedEntry**: The ledgerid:entryid of the last message
successfully written. If the entryid is -1, then the ledger has been opened or
is currently being opened but has no entries written yet.
+ - **lastConfirmedEntry**: The ledgerid:entryid of the last message that is
written successfully. If the entryid is `-1`, then the ledger is open, yet no
entries are written.
- - **state**: The state of this ledger for writing. LedgerOpened means we
have a ledger open for saving published messages.
+ - **state**: The state of this ledger for writing. The state
`LedgerOpened` means that a ledger is open for saving published messages.
- - **ledgers**: The ordered list of all ledgers for this topic holding its
messages
+ - **ledgers**: The ordered list of all ledgers for this topic holding
messages.
- - **ledgerId**: Id of this ledger
+ - **ledgerId**: Id of this ledger.
- - **entries**: Total number of entries belong to this ledger
+ - **entries**: The total number of entries belong to this ledger.
- - **size**: Size of messages written to this ledger (in bytes)
+ - **size**: The size of messages written to this ledger (in bytes).
- - **offloaded**: Whether this ledger is offloaded
+ - **offloaded**: Whether this ledger is offloaded.
- **compactedLedger**: The ledgers holding un-acked messages after topic
compaction.
- - **ledgerId**: Id of this ledger
+ - **ledgerId**: The Id of this ledger.
Review comment:
```suggestion
- **ledgerId**: The ID of this ledger.
```
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
- - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second
+ - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second.
- - **msgThroughputIn**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputIn**: The sum of all local and replication publishers'
publish rates in bytes per second.
- - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second
+ - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second.
- - **msgThroughputOut**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputOut**: The sum of all local and replication consumers'
dispatch rates in bytes per second.
- - **averageMsgSize**: The average size in bytes of messages published
within the last interval
+ - **averageMsgSize**: The average size(in bytes) of messages published
within the last interval.
Review comment:
```suggestion
- **averageMsgSize**: The average size (in bytes) of messages published
within the last interval.
```
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
- - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second
+ - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second.
- - **msgThroughputIn**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputIn**: The sum of all local and replication publishers'
publish rates in bytes per second.
- - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second
+ - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second.
- - **msgThroughputOut**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputOut**: The sum of all local and replication consumers'
dispatch rates in bytes per second.
- - **averageMsgSize**: The average size in bytes of messages published
within the last interval
+ - **averageMsgSize**: The average size(in bytes) of messages published
within the last interval.
- - **storageSize**: The sum of the ledgers' storage size for this topic.
Space used to store the messages for the topic
+ - **storageSize**: The sum of the ledgers' storage size for this topic.
The space used to store the messages for the topic.
- - **publishers**: The list of all local publishers into the topic. There
can be zero or thousands
+ - **publishers**: The list of all local publishers into the topic. The
list ranges from zero to thousands.
- - **msgRateIn**: Total rate of messages published by this publisher in
messages per second
+ - **msgRateIn**: The total rate of messages published by this
publisher in messages per second.
- - **msgThroughputIn**: Total throughput of the messages published by
this publisher in bytes per second
+ - **msgThroughputIn**: The total throughput of the messages published
by this publisher in bytes per second.
- - **averageMsgSize**: Average message size in bytes from this
publisher within the last interval
+ - **averageMsgSize**: The average message size in bytes from this
publisher within the last interval.
- - **producerId**: Internal identifier for this producer on this topic
+ - **producerId**: The internal identifier for this producer on this
topic.
- - **producerName**: Internal identifier for this producer, generated
by the client library
+ - **producerName**: The internal identifier for this producer,
generated by the client library.
- - **address**: IP address and source port for the connection of this
producer
+ - **address**: The IP address and source port for the connection of
this producer.
- - **connectedSince**: Timestamp this producer was created or last
reconnected
+ - **connectedSince**: The timestamp when this producer is created or
reconnected last time.
- - **subscriptions**: The list of all local subscriptions to the topic
+ - **subscriptions**: The list of all local subscriptions to the topic.
- - **my-subscription**: The name of this subscription (client defined)
+ - **my-subscription**: The name of this subscription. It is defined by
the client.
- - **msgRateOut**: Total rate of messages delivered on this
subscription (msg/s)
+ - **msgRateOut**: The total rate of messages delivered on this
subscription (msg/s).
Review comment:
use the same expression: use "msg/s" and (bytes/s) or in use "in
messages per second" "in bytes per second"
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -307,94 +299,95 @@ It shows current statistics of a given non-partitioned
topic.
"replication": {}
}
```
+To get the status of a topic, you can use the following ways.
-#### pulsar-admin
-
-Topic stats can be fetched using [`stats`](../../reference/CliTools#stats)
command.
-
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent stats \
+$ pulsar-admin topics stats \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|GET|/admin/v2/persistent/:tenant/:namespace/:topic/stats|operation/getStats}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|GET|/admin/v2/topics/:tenant/:namespace/:topic/stats|operation/getStats}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().getStats(topic);
+admin.topics().getStats(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get internal stats
-It shows detailed statistics of a topic.
+You can get the detailed statistics of a topic.
- - **entriesAddedCounter**: Messages published since this broker loaded
this topic
+ - **entriesAddedCounter**: Messages published since this broker loaded
this topic.
- - **numberOfEntries**: Total number of messages being tracked
+ - **numberOfEntries**: The total number of messages being tracked.
- - **totalSize**: Total storage size in bytes of all messages
+ - **totalSize**: The total storage size in bytes of all messages.
- - **currentLedgerEntries**: Count of messages written to the ledger
currently open for writing
+ - **currentLedgerEntries**: The count of messages written to the ledger
that is currently open for writing.
- - **currentLedgerSize**: Size in bytes of messages written to ledger
currently open for writing
+ - **currentLedgerSize**: The size in bytes of messages written to the
ledger that is currently open for writing.
- - **lastLedgerCreatedTimestamp**: time when last ledger was created
+ - **lastLedgerCreatedTimestamp**: The time when the last ledger is created.
- - **lastLedgerCreationFailureTimestamp:** time when last ledger was failed
+ - **lastLedgerCreationFailureTimestamp:** The time when the last ledger
failed.
- - **waitingCursorsCount**: How many cursors are "caught up" and waiting
for a new message to be published
+ - **waitingCursorsCount**: How many cursors are "caught up" and waiting
for a new message to be published.
Review comment:
The number of cursors that are ....?
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
- - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second
+ - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second.
- - **msgThroughputIn**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputIn**: The sum of all local and replication publishers'
publish rates in bytes per second.
- - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second
+ - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second.
- - **msgThroughputOut**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputOut**: The sum of all local and replication consumers'
dispatch rates in bytes per second.
- - **averageMsgSize**: The average size in bytes of messages published
within the last interval
+ - **averageMsgSize**: The average size(in bytes) of messages published
within the last interval.
- - **storageSize**: The sum of the ledgers' storage size for this topic.
Space used to store the messages for the topic
+ - **storageSize**: The sum of the ledgers' storage size for this topic.
The space used to store the messages for the topic.
- - **publishers**: The list of all local publishers into the topic. There
can be zero or thousands
+ - **publishers**: The list of all local publishers into the topic. The
list ranges from zero to thousands.
- - **msgRateIn**: Total rate of messages published by this publisher in
messages per second
+ - **msgRateIn**: The total rate of messages published by this
publisher in messages per second.
- - **msgThroughputIn**: Total throughput of the messages published by
this publisher in bytes per second
+ - **msgThroughputIn**: The total throughput of the messages published
by this publisher in bytes per second.
- - **averageMsgSize**: Average message size in bytes from this
publisher within the last interval
+ - **averageMsgSize**: The average message size in bytes from this
publisher within the last interval.
- - **producerId**: Internal identifier for this producer on this topic
+ - **producerId**: The internal identifier for this producer on this
topic.
- - **producerName**: Internal identifier for this producer, generated
by the client library
+ - **producerName**: The internal identifier for this producer,
generated by the client library.
- - **address**: IP address and source port for the connection of this
producer
+ - **address**: The IP address and source port for the connection of
this producer.
- - **connectedSince**: Timestamp this producer was created or last
reconnected
+ - **connectedSince**: The timestamp when this producer is created or
reconnected last time.
- - **subscriptions**: The list of all local subscriptions to the topic
+ - **subscriptions**: The list of all local subscriptions to the topic.
- - **my-subscription**: The name of this subscription (client defined)
+ - **my-subscription**: The name of this subscription. It is defined by
the client.
- - **msgRateOut**: Total rate of messages delivered on this
subscription (msg/s)
+ - **msgRateOut**: The total rate of messages delivered on this
subscription (msg/s).
- - **msgThroughputOut**: Total throughput delivered on this
subscription (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered on this
subscription (bytes/s).
- - **msgBacklog**: Number of messages in the subscription backlog
+ - **msgBacklog**: The number of messages in the subscription
backlog.
- - **type**: This subscription type
+ - **type**: The subscription type.
- - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL
+ - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL.
- - **lastExpireTimestamp**: The last message expire execution
timestamp
+ - **lastExpireTimestamp**: The timestamp of the last message
expire execution.
- - **lastConsumedFlowTimestamp**: The last flow command received
timestamp
+ - **lastConsumedFlowTimestamp**: The timestamp of the last flow
command received.
- - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers
+ - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers.
- - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers
+ - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers.
- - **consumers**: The list of connected consumers for this
subscription
+ - **consumers**: The list of connected consumers for this
subscription.
- - **msgRateOut**: Total rate of messages delivered to the
consumer (msg/s)
+ - **msgRateOut**: The total rate of messages delivered to
the consumer (msg/s).
- - **msgThroughputOut**: Total throughput delivered to the
consumer (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered to
the consumer (bytes/s).
- - **consumerName**: Internal identifier for this consumer,
generated by the client library
+ - **consumerName**: The internal identifier for this
consumer, generated by the client library.
- - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. A value of 0 means the
client library's queue is full and receive() isn't being called. A nonzero
value means this consumer is ready to be dispatched messages.
+ - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. `0` means the client
library's queue is full and `receive()` isn't being called. A nonzero value
means this consumer is ready to be dispatched messages.
- - **unackedMessages**: Number of unacknowledged messages for
the consumer
+ - **unackedMessages**: The number of unacknowledged messages
for the consumer.
- - **blockedConsumerOnUnackedMsgs**: Flag to verify if the
consumer is blocked due to reaching threshold of unacked messages
+ - **blockedConsumerOnUnackedMsgs**: The flag to verify if
the consumer is blocked due to reaching threshold of the unacked messages.
- - **lastConsumedTimestamp**: The timestamp of the consumer
last consume a message
+ - **lastConsumedTimestamp**: The timestamp when the consumer
reads a message the last time.
- - **lastAckedTimestamp**: The timestamp of the consumer last
ack a message
+ - **lastAckedTimestamp**: The timestamp when the consumer
acks a message the last time.
Review comment:
```suggestion
- **lastAckedTimestamp**: The timestamp when the consumer
acknowledges a message the last time.
```
##########
File path: site2/docs/admin-api-persistent-topics.md
##########
@@ -117,137 +112,132 @@ $ pulsar-admin persistent revoke-permission \
}
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic/permissions/:role|operation/revokePermissionsOnTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
String role = "test-role";
-admin.persistentTopics().revokePermissions(topic, role);
+admin.topics().revokePermissions(topic, role);
```
-### Delete topic
-
-It deletes a topic. The topic cannot be deleted if there's any active
subscription or producers connected to it.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
+### Delete topic
-Topic can be deleted using [`delete`](../../reference/CliTools#delete) command.
+You can delete a topic in the following ways. You cannot delete a topic if any
active subscription or producers is connected to the topic.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent delete \
+$ pulsar-admin topics delete \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|DELETE|/admin/v2/persistent/:tenant/:namespace/:topic|operation/deleteTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|DELETE|/admin/v2/topics/:tenant/:namespace/:topic|operation/deleteTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().delete(topic);
+admin.topics().delete(topic);
```
-### Unload topic
-
-It unloads a topic.
+<!--END_DOCUSAURUS_CODE_TABS-->
-#### pulsar-admin
-
-Topic can be unloaded using [`unload`](../../reference/CliTools#unload)
command.
+### Unload topic
+You can unload a topic in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
```shell
-$ pulsar-admin persistent unload \
+$ pulsar-admin topics unload \
persistent://test-tenant/ns1/tp1 \
```
-#### REST API
-
-{@inject:
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/unload|operation/unloadTopic}
-
-#### Java
+<!--REST API-->
+{@inject:
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/unload|operation/unloadTopic}
+<!--Java-->
```java
String topic = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().unload(topic);
+admin.topics().unload(topic);
```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
### Get stats
-It shows current statistics of a given non-partitioned topic.
+You can view the following statistics of a given non-partitioned topic.
- - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second
+ - **msgRateIn**: The sum of all local and replication publishers' publish
rates in messages per second.
- - **msgThroughputIn**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputIn**: The sum of all local and replication publishers'
publish rates in bytes per second.
- - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second
+ - **msgRateOut**: The sum of all local and replication consumers' dispatch
rates in messages per second.
- - **msgThroughputOut**: Same as above, but in bytes per second instead of
messages per second
+ - **msgThroughputOut**: The sum of all local and replication consumers'
dispatch rates in bytes per second.
- - **averageMsgSize**: The average size in bytes of messages published
within the last interval
+ - **averageMsgSize**: The average size(in bytes) of messages published
within the last interval.
- - **storageSize**: The sum of the ledgers' storage size for this topic.
Space used to store the messages for the topic
+ - **storageSize**: The sum of the ledgers' storage size for this topic.
The space used to store the messages for the topic.
- - **publishers**: The list of all local publishers into the topic. There
can be zero or thousands
+ - **publishers**: The list of all local publishers into the topic. The
list ranges from zero to thousands.
- - **msgRateIn**: Total rate of messages published by this publisher in
messages per second
+ - **msgRateIn**: The total rate of messages published by this
publisher in messages per second.
- - **msgThroughputIn**: Total throughput of the messages published by
this publisher in bytes per second
+ - **msgThroughputIn**: The total throughput of the messages published
by this publisher in bytes per second.
- - **averageMsgSize**: Average message size in bytes from this
publisher within the last interval
+ - **averageMsgSize**: The average message size in bytes from this
publisher within the last interval.
- - **producerId**: Internal identifier for this producer on this topic
+ - **producerId**: The internal identifier for this producer on this
topic.
- - **producerName**: Internal identifier for this producer, generated
by the client library
+ - **producerName**: The internal identifier for this producer,
generated by the client library.
- - **address**: IP address and source port for the connection of this
producer
+ - **address**: The IP address and source port for the connection of
this producer.
- - **connectedSince**: Timestamp this producer was created or last
reconnected
+ - **connectedSince**: The timestamp when this producer is created or
reconnected last time.
- - **subscriptions**: The list of all local subscriptions to the topic
+ - **subscriptions**: The list of all local subscriptions to the topic.
- - **my-subscription**: The name of this subscription (client defined)
+ - **my-subscription**: The name of this subscription. It is defined by
the client.
- - **msgRateOut**: Total rate of messages delivered on this
subscription (msg/s)
+ - **msgRateOut**: The total rate of messages delivered on this
subscription (msg/s).
- - **msgThroughputOut**: Total throughput delivered on this
subscription (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered on this
subscription (bytes/s).
- - **msgBacklog**: Number of messages in the subscription backlog
+ - **msgBacklog**: The number of messages in the subscription
backlog.
- - **type**: This subscription type
+ - **type**: The subscription type.
- - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL
+ - **msgRateExpired**: The rate at which messages were discarded
instead of dispatched from this subscription due to TTL.
- - **lastExpireTimestamp**: The last message expire execution
timestamp
+ - **lastExpireTimestamp**: The timestamp of the last message
expire execution.
- - **lastConsumedFlowTimestamp**: The last flow command received
timestamp
+ - **lastConsumedFlowTimestamp**: The timestamp of the last flow
command received.
- - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers
+ - **lastConsumedTimestamp**: The latest timestamp of all the
consumed timestamp of the consumers.
- - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers
+ - **lastAckedTimestamp**: The latest timestamp of all the acked
timestamp of the consumers.
- - **consumers**: The list of connected consumers for this
subscription
+ - **consumers**: The list of connected consumers for this
subscription.
- - **msgRateOut**: Total rate of messages delivered to the
consumer (msg/s)
+ - **msgRateOut**: The total rate of messages delivered to
the consumer (msg/s).
- - **msgThroughputOut**: Total throughput delivered to the
consumer (bytes/s)
+ - **msgThroughputOut**: The total throughput delivered to
the consumer (bytes/s).
- - **consumerName**: Internal identifier for this consumer,
generated by the client library
+ - **consumerName**: The internal identifier for this
consumer, generated by the client library.
- - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. A value of 0 means the
client library's queue is full and receive() isn't being called. A nonzero
value means this consumer is ready to be dispatched messages.
+ - **availablePermits**: The number of messages this consumer
has space for in the client library's listen queue. `0` means the client
library's queue is full and `receive()` isn't being called. A nonzero value
means this consumer is ready to be dispatched messages.
- - **unackedMessages**: Number of unacknowledged messages for
the consumer
+ - **unackedMessages**: The number of unacknowledged messages
for the consumer.
- - **blockedConsumerOnUnackedMsgs**: Flag to verify if the
consumer is blocked due to reaching threshold of unacked messages
+ - **blockedConsumerOnUnackedMsgs**: The flag to verify if
the consumer is blocked due to reaching threshold of the unacked messages.
Review comment:
```suggestion
- **blockedConsumerOnUnackedMsgs**: The flag used to
verify if the consumer is blocked due to reaching threshold of the
unacknowledged messages.
```
----------------------------------------------------------------
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]