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 2020/10/12 05:57:35 UTC
[GitHub] [pulsar] wolfstudy opened a new issue #8239: When allowAutoTopicCreationType is set to partitioned, the function trigger cannot work normally
wolfstudy opened a new issue #8239:
URL: https://github.com/apache/pulsar/issues/8239
**Describe the bug**
When allowAutoTopicCreationType is set to partitioned, the function trigger cannot work normally. The error as follows:
```
13:41:15.112 [AsyncHttpClient-7-1] WARN org.apache.pulsar.client.admin.internal.FunctionsImpl - [http://localhost:8080/admin/v3/functions/public/default/example/trigger] Failed to perform http post request: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: Topic reader cannot be created on a partitioned topic
Reason: HTTP 500 Internal Server Error
```
The specific error location points to [here](https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java#L500)
**To Reproduce**
1. bin/pulsar standalone(2.6.1)
2. bin/pulsar-admin functions create --function-config-file examples/example-function-config.yaml --jar examples/api-examples.jar
examples/example-function-config.yaml:
```
tenant: "public"
namespace: "default"
name: "example"
className: "org.apache.pulsar.functions.api.examples.ExclamationFunction"
inputs: ["test_src"]
userConfig:
"PublishTopic": "test_result"
output: "test_result"
autoAck: true
parallelism: 1
```
3. bin/pulsar-admin functions trigger --name example --trigger-value "hello admin pulsar" --topic test_src
4. See error
```
13:41:15.112 [AsyncHttpClient-7-1] WARN org.apache.pulsar.client.admin.internal.FunctionsImpl - [http://localhost:8080/admin/v3/functions/public/default/example/trigger] Failed to perform http post request: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: Topic reader cannot be created on a partitioned topic
Reason: HTTP 500 Internal Server Error
```
**Expected behavior**
When I set allowAutoTopicCreationType in standalone.conf to non-partitioned, the functions trigger can work normally.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: Mac
- Pulsar Broker: 2.6.1
- JDK: 1.8
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] wolfstudy commented on issue #8239: When allowAutoTopicCreationType is set to partitioned, the function trigger cannot work normally
Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #8239:
URL: https://github.com/apache/pulsar/issues/8239#issuecomment-707049301
It looks like https://github.com/apache/pulsar/pull/7518 is solving this problem
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] wolfstudy commented on issue #8239: When allowAutoTopicCreationType is set to partitioned, the function trigger cannot work normally
Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #8239:
URL: https://github.com/apache/pulsar/issues/8239#issuecomment-707000823
This problem seems to be caused by the reader being used in the trigger function, but the reader cannot subscribe to the topic of the partition.
----------------------------------------------------------------
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:
users@infra.apache.org