You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/22 04:45:46 UTC
[GitHub] [pulsar] tisonkun opened a new pull request, #19025: [fix][doc] Stablize swagger docs
tisonkun opened a new pull request, #19025:
URL: https://github.com/apache/pulsar/pull/19025
This fixes #18947. As a workaround.
It's not a regression because we cannot doc both endpoint right now.
### Does this pull request potentially affect one of the following parts:
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [x] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#issuecomment-1364812613
Thanks for your reviews! Merging...
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#issuecomment-1362439655
Try explicit exclusion.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] yuruguo commented on a diff in pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
yuruguo commented on code in PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#discussion_r1055358723
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopicsExt.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.pulsar.broker.admin.v2;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.Encoded;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.MediaType;
+import org.apache.pulsar.broker.admin.impl.PersistentTopicsBase;
+import org.apache.pulsar.common.partition.PartitionedTopicMetadata;
+import org.apache.pulsar.common.policies.data.PolicyName;
+import org.apache.pulsar.common.policies.data.PolicyOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class is for preventing docs conflict before we find a good way to fix
+ * <a href="https://github.com/apache/pulsar/issues/18947">ISSUE-18947</a>.
+ */
+@Path("/persistent")
+@Produces(MediaType.APPLICATION_JSON)
+@Api(value = "/persistent", description = "Persistent topic admin apis", tags = "persistent topic")
+public class PersistentTopicsExt extends PersistentTopicsBase {
+
+ @PUT
+ @Consumes(PartitionedTopicMetadata.MEDIA_TYPE)
+ @Path("/{tenant}/{namespace}/{topic}/partitions")
+ @ApiOperation(value = "Create a partitioned topic.",
+ notes = "It needs to be called before creating a producer on a partitioned topic.")
+ @ApiResponses(value = {
+ @ApiResponse(code = 307, message = "Current broker doesn't serve the namespace of this topic"),
+ @ApiResponse(code = 401, message = "Don't have permission to administrate resources on this tenant"),
+ @ApiResponse(code = 403, message = "Don't have admin permission"),
+ @ApiResponse(code = 404, message = "Tenant or namespace doesn't exist"),
+ @ApiResponse(code = 406, message = "The number of partitions should be more than 0 and"
+ + " less than or equal to maxNumPartitionsPerPartitionedTopic"),
+ @ApiResponse(code = 409, message = "Partitioned topic already exist"),
+ @ApiResponse(code = 412,
+ message = "Failed Reason : Name is invalid or Namespace does not have any clusters configured"),
+ @ApiResponse(code = 500, message = "Internal server error"),
+ @ApiResponse(code = 503, message = "Failed to validate global cluster configuration")
+ })
+ public void createPartitionedTopic(
+ @Suspended final AsyncResponse asyncResponse,
+ @ApiParam(value = "Specify the tenant", required = true)
+ @PathParam("tenant") String tenant,
+ @ApiParam(value = "Specify the namespace", required = true)
+ @PathParam("namespace") String namespace,
+ @ApiParam(value = "Specify topic name", required = true)
+ @PathParam("topic") @Encoded String encodedTopic,
+ @ApiParam(value = "The metadata for the topic",
+ required = true, type = "PartitionedTopicMetadata") PartitionedTopicMetadata metadata,
+ @QueryParam("createLocalTopicOnly") @DefaultValue("false") boolean createLocalTopicOnly) {
+ try {
+ validateNamespaceName(tenant, namespace);
+ validateGlobalNamespaceOwnership();
+ validatePartitionedTopicName(tenant, namespace, encodedTopic);
+ validateTopicPolicyOperation(topicName, PolicyName.PARTITION, PolicyOperation.WRITE);
+ validateCreateTopic(topicName);
+ internalCreatePartitionedTopic(asyncResponse, metadata.partitions, createLocalTopicOnly,
+ metadata.properties);
+ } catch (Exception e) {
+ log.error("[{}] Failed to create partitioned topic {}", clientAppId(), topicName, e);
+ resumeAsyncResponseExceptionally(asyncResponse, e);
+ }
+ }
+
+ private static final Logger log = LoggerFactory.getLogger(PersistentTopics.class);
Review Comment:
PersistentTopics -> PersistentTopicsExt
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun closed pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun closed pull request #19025: [fix][doc] Stablize swagger docs
URL: https://github.com/apache/pulsar/pull/19025
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#issuecomment-1362781796
OWASP failed on other dependencies that we should handle in different PRs:
```
debezium-connector-mysql-1.9.7.Final.jar: CVE-2017-15945(7.8)
Error: debezium-connector-postgres-1.9.7.Final.jar: CVE-2019-10210(7.0), CVE-2019-10211(9.8), CVE-2015-3[16](https://github.com/apache/pulsar/actions/runs/3755293586/jobs/6384632023#step:10:17)7(7.5), CVE-2015-3166(9.8), CVE-2016-0768(7.5), CVE-2016-0766(8.8), CVE-2016-7048(8.1), CVE-2018-1115(9.1), CVE-2015-0243(8.8), CVE-2015-0244(9.8), CVE-2015-0241(8.8), CVE-2015-0242(8.8), CVE-2019-10128(7.8), CVE-2019-10127(8.8), CVE-2020-25694(8.1), CVE-2016-0773(7.5), CVE-2016-5424(7.1), CVE-2016-5423(8.3), CVE-2020-25695(8.8), CVE-2017-14798(7.0), CVE-2017-7484(7.5), CVE-2021-23214(8.1)
Error: msgpack-core-0.9.0.jar: CVE-2022-4[17](https://github.com/apache/pulsar/actions/runs/3755293586/jobs/6384632023#step:10:18)19(7.5)
Error: mysql-binlog-connector-java-0.27.2.jar: CVE-2017-15945(7.8)
Error: snakeyaml-1.32.jar: CVE-2022-1471(9.8)
Error: woodstox-core-6.2.4.jar: CVE-[20](https://github.com/apache/pulsar/actions/runs/3755293586/jobs/6384632023#step:10:21)22-40152(7.5)
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun merged pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun merged PR #19025:
URL: https://github.com/apache/pulsar/pull/19025
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#issuecomment-1362422067
# [Codecov](https://codecov.io/gh/apache/pulsar/pull/19025?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19025](https://codecov.io/gh/apache/pulsar/pull/19025?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7a9c6f) into [master](https://codecov.io/gh/apache/pulsar/commit/08591d9da87579705f8ee950d745718a92bdd15e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (08591d9) will **decrease** coverage by `13.11%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/19025/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/19025?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19025 +/- ##
=============================================
- Coverage 49.85% 36.74% -13.12%
+ Complexity 8658 1959 -6699
=============================================
Files 500 209 -291
Lines 54930 14433 -40497
Branches 5867 1574 -4293
=============================================
- Hits 27386 5303 -22083
+ Misses 24464 8552 -15912
+ Partials 3080 578 -2502
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `36.74% <ø> (-13.12%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19025?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pulsar/broker/admin/impl/PersistentTopicsBase.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL1BlcnNpc3RlbnRUb3BpY3NCYXNlLmphdmE=) | | |
| [...g/apache/pulsar/broker/admin/impl/TenantsBase.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL1RlbmFudHNCYXNlLmphdmE=) | | |
| [...he/pulsar/broker/admin/v2/NonPersistentTopics.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi92Mi9Ob25QZXJzaXN0ZW50VG9waWNzLmphdmE=) | | |
| [...pache/pulsar/broker/admin/v2/PersistentTopics.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi92Mi9QZXJzaXN0ZW50VG9waWNzLmphdmE=) | | |
| [...rg/apache/pulsar/broker/delayed/bucket/Bucket.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9kZWxheWVkL2J1Y2tldC9CdWNrZXQuamF2YQ==) | | |
| [...r/delayed/bucket/BucketDelayedDeliveryTracker.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9kZWxheWVkL2J1Y2tldC9CdWNrZXREZWxheWVkRGVsaXZlcnlUcmFja2VyLmphdmE=) | | |
| [.../pulsar/broker/delayed/bucket/ImmutableBucket.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9kZWxheWVkL2J1Y2tldC9JbW11dGFibGVCdWNrZXQuamF2YQ==) | | |
| [...g/apache/pulsar/broker/lookup/TopicLookupBase.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb29rdXAvVG9waWNMb29rdXBCYXNlLmphdmE=) | | |
| [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | | |
| [...rg/apache/pulsar/broker/web/PulsarWebResource.java](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUHVsc2FyV2ViUmVzb3VyY2UuamF2YQ==) | | |
| ... and [699 more](https://codecov.io/gh/apache/pulsar/pull/19025/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#discussion_r1055361529
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopicsExt.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.pulsar.broker.admin.v2;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.Encoded;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.MediaType;
+import org.apache.pulsar.broker.admin.impl.PersistentTopicsBase;
+import org.apache.pulsar.common.partition.PartitionedTopicMetadata;
+import org.apache.pulsar.common.policies.data.PolicyName;
+import org.apache.pulsar.common.policies.data.PolicyOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class is for preventing docs conflict before we find a good way to fix
+ * <a href="https://github.com/apache/pulsar/issues/18947">ISSUE-18947</a>.
+ */
+@Path("/persistent")
+@Produces(MediaType.APPLICATION_JSON)
+@Api(value = "/persistent", description = "Persistent topic admin apis", tags = "persistent topic")
+public class PersistentTopicsExt extends PersistentTopicsBase {
+
+ @PUT
+ @Consumes(PartitionedTopicMetadata.MEDIA_TYPE)
+ @Path("/{tenant}/{namespace}/{topic}/partitions")
+ @ApiOperation(value = "Create a partitioned topic.",
+ notes = "It needs to be called before creating a producer on a partitioned topic.")
+ @ApiResponses(value = {
+ @ApiResponse(code = 307, message = "Current broker doesn't serve the namespace of this topic"),
+ @ApiResponse(code = 401, message = "Don't have permission to administrate resources on this tenant"),
+ @ApiResponse(code = 403, message = "Don't have admin permission"),
+ @ApiResponse(code = 404, message = "Tenant or namespace doesn't exist"),
+ @ApiResponse(code = 406, message = "The number of partitions should be more than 0 and"
+ + " less than or equal to maxNumPartitionsPerPartitionedTopic"),
+ @ApiResponse(code = 409, message = "Partitioned topic already exist"),
+ @ApiResponse(code = 412,
+ message = "Failed Reason : Name is invalid or Namespace does not have any clusters configured"),
+ @ApiResponse(code = 500, message = "Internal server error"),
+ @ApiResponse(code = 503, message = "Failed to validate global cluster configuration")
+ })
+ public void createPartitionedTopic(
+ @Suspended final AsyncResponse asyncResponse,
+ @ApiParam(value = "Specify the tenant", required = true)
+ @PathParam("tenant") String tenant,
+ @ApiParam(value = "Specify the namespace", required = true)
+ @PathParam("namespace") String namespace,
+ @ApiParam(value = "Specify topic name", required = true)
+ @PathParam("topic") @Encoded String encodedTopic,
+ @ApiParam(value = "The metadata for the topic",
+ required = true, type = "PartitionedTopicMetadata") PartitionedTopicMetadata metadata,
+ @QueryParam("createLocalTopicOnly") @DefaultValue("false") boolean createLocalTopicOnly) {
+ try {
+ validateNamespaceName(tenant, namespace);
+ validateGlobalNamespaceOwnership();
+ validatePartitionedTopicName(tenant, namespace, encodedTopic);
+ validateTopicPolicyOperation(topicName, PolicyName.PARTITION, PolicyOperation.WRITE);
+ validateCreateTopic(topicName);
+ internalCreatePartitionedTopic(asyncResponse, metadata.partitions, createLocalTopicOnly,
+ metadata.properties);
+ } catch (Exception e) {
+ log.error("[{}] Failed to create partitioned topic {}", clientAppId(), topicName, e);
+ resumeAsyncResponseExceptionally(asyncResponse, e);
+ }
+ }
+
+ private static final Logger log = LoggerFactory.getLogger(PersistentTopics.class);
Review Comment:
I'm trying to keep the log infomation the same as before. After all, this is a trick instead we really want a `PersistentTopicsExt`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19025: [fix][doc] Stablize swagger docs
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #19025:
URL: https://github.com/apache/pulsar/pull/19025#issuecomment-1362437176
It seems the skip logic doesn't work in this way.
Closing...
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org