Jennifer88huang commented on a change in pull request #8388:
URL: https://github.com/apache/pulsar/pull/8388#discussion_r513913707



##########
File path: site2/docs/admin-api-partitioned-topics.md
##########
@@ -1,109 +1,82 @@
 ---
 id: admin-api-partitioned-topics
 title: Managing partitioned topics
-sidebar_label: Partitioned topics
+sidebar_label: Topics1
 ---
 
-
-You can use Pulsar's [admin API](admin-api-overview.md) to create and manage 
partitioned topics.
-
-In all of the instructions and commands below, the topic name structure is:
-
-```shell
-persistent://tenant/namespace/topic
-```
-
-## Partitioned topics resources
+## Manage partitioned topics
+You can use Pulsar [admin API](admin-api-overview.md) to create, update, 
delete and check status of partitioned topics.
 
 ### Create
 
-Partitioned topics in Pulsar must be explicitly created. When creating a new 
partitioned topic you
-need to provide a name for the topic as well as the desired number of 
partitions.
-
-> #### Note
->
-> By default, after 60 seconds of creation, topics are considered inactive and 
deleted automatically to prevent from generating trash data.
->
-> To disable this feature, set `brokerDeleteInactiveTopicsEnabled`  to `false`.
->
-> To change the frequency of checking inactive topics, set 
`brokerDeleteInactiveTopicsFrequencySeconds` to your desired value.
->
-> For more information about these two parameters, see 
[here](reference-configuration.md#broker).
+Partitioned topics must be explicitly created. When creating a new partitioned 
topic, you need to provide a name and the number of partitions for the topic.
 
-#### pulsar-admin
+By default, after 60 seconds of creation, topics are considered inactive and 
deleted automatically to prevent from generating trash data. To disable this 
feature, set `brokerDeleteInactiveTopicsEnabled` to `false`. To change the 
frequency of checking inactive topics, set 
`brokerDeleteInactiveTopicsFrequencySeconds` to your desired value.
 
-You can create partitioned topics using the 
[`create-partitioned-topic`](reference-pulsar-admin.md#create-partitioned-topic)
-command and specifying the topic name as an argument and the number of 
partitions using the `-p` or `--partitions` flag.
+For more information about the two parameters, see 
[here](reference-configuration.md#broker).
 
-Here's an example:
+You can create partitioned topics in the following ways.
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
+When you create partitioned topics with the 
[`create-partitioned-topic`](reference-pulsar-admin.md#create-partitioned-topic)
+command, you need to specify the topic name as an argument and the number of 
partitions using the `-p` or `--partitions` flag.
 
 ```shell
 $ bin/pulsar-admin topics create-partitioned-topic \
   persistent://my-tenant/my-namespace/my-topic \
   --partitions 4
 ```
 
-> #### Note
->
-> If there already exists a non-partitioned topic with the suffix 
'-partition-' followed by numeric value like
-> 'xyz-topic-partition-10', then you can not create a partitioned topic with 
name 'xyz-topic' as the partitions
-> of the partitioned topic could override the existing non partitioned topic. 
You have to delete that non
-> partitioned topic first then create the partitioned topic.
-
-#### REST API
+> **Note**    
+> If a non-partitioned topic with the suffix '-partition-' followed by numeric 
value like 'xyz-topic-partition-10', then you can not create a partitioned 
topic with name 'xyz-topic', because the partitions of the partitioned topic 
could override the existing non-partitioned topic. To create such partitioned 
topic, you have to delete that non-partitioned topic first.
 
-{@inject: 
endpoint|PUT|/admin/v2/persistent/:tenant/:namespace/:topic/partitions|operation/createPartitionedTopic}
-
-#### Java
+<!--REST API-->
+{@inject: 
endpoint|PUT|/admin/v2/topics/:tenant/:namespace/:topic/partitions|operation/createPartitionedTopic}
 
+<!--Java-->
 ```java
 String topicName = "persistent://my-tenant/my-namespace/my-topic";
 int numPartitions = 4;
-admin.persistentTopics().createPartitionedTopic(topicName, numPartitions);
+admin.topics().createPartitionedTopic(topicName, numPartitions);
 ```
 
-### Create missed partitions
+<!--END_DOCUSAURUS_CODE_TABS-->
 
-Try to create partitions for partitioned topic. The partitions of partition 
topic have to be created, 
-can be used by repair partitions when topic auto creation is disabled
-
-#### pulsar-admin
+### Create missed partitions
 
-You can create missed partitions using the 
[`create-missed-partitions`](reference-pulsar-admin.md#create-missed-partitions)
-command and specifying the topic name as an argument.
+When topic auto creation is disabled, and you have a partitioned topic without 
any partitions, you can use the 
[`create-missed-partitions`](reference-pulsar-admin.md#create-missed-partitions)
 command to create partitions for the topic.
 
-Here's an example:
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
+You can create missed partitions with the 
[`create-missed-partitions`](reference-pulsar-admin.md#create-missed-partitions)
 command and specify the topic name as an argument.
 
 ```shell
 $ bin/pulsar-admin topics create-missed-partitions \
   persistent://my-tenant/my-namespace/my-topic \
 ```
 
-#### REST API
-
-{@inject: 
endpoint|POST|/admin/v2/persistent/:tenant/:namespace/:topic|operation/createMissedPartitions}
-
-#### Java
+<!--REST API-->
+{@inject: 
endpoint|POST|/admin/v2/topics/:tenant/:namespace/:topic|operation/createMissedPartitions}
 
+<!--Java-->
 ```java
 String topicName = "persistent://my-tenant/my-namespace/my-topic";
-admin.persistentTopics().createMissedPartitions(topicName);
+admin.topics().createMissedPartitions(topicName);
 ```
 
+<!--END_DOCUSAURUS_CODE_TABS-->
+
 ### Get metadata
 
-Partitioned topics have metadata associated with them that you can fetch as a 
JSON object.
-The following metadata fields are currently available:
+Partitioned topics are associated with metadata, you can view it as a JSON 
object. The following metadata field is available.
 
-Field | Meaning
+Field | Description
 :-----|:-------
-`partitions` | The number of partitions into which the topic is divided
+`partitions` | The number of partitions into which the topic is divided.
 
-#### pulsar-admin
-
-You can see the number of partitions in a partitioned topic using the
-[`get-partitioned-topic-metadata`](reference-pulsar-admin.md#get-partitioned-topic-metadata)
-subcommand. Here's an example:
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
+You can view the number of partitions in a partitioned topic with the 
[`get-partitioned-topic-metadata`](reference-pulsar-admin.md#get-partitioned-topic-metadata)
 subcommand. 

Review comment:
       nice catch, thank you~




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