Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-8239: When allowAutoTopicCreationType is set to partitioned, the function trigger cannot work normally #1547

Open
sijie opened this issue Oct 12, 2020 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Oct 12, 2020

Original Issue: apache#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

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
  1. bin/pulsar-admin functions trigger --name example --trigger-value "hello admin pulsar" --topic test_src
  2. 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant