Jennifer88huang commented on a change in pull request #8388:
URL: https://github.com/apache/pulsar/pull/8388#discussion_r513912661
##########
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.
Review comment:
yes, when you set "setAllowAutoTopicCreation" to "false", topics cannot
be created automatically.
----------------------------------------------------------------
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]