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 2019/04/17 21:44:55 UTC
[GitHub] [pulsar] jerrypeng opened a new pull request #4067: Fix connectors
nested configs
jerrypeng opened a new pull request #4067: Fix connectors nested configs
URL: https://github.com/apache/pulsar/pull/4067
### Motivation
Updating a source or sink with configs that have nested structures with cause client error:
```
org.apache.pulsar.client.admin.PulsarAdminException$ServerSideErrorException: HTTP 500 Internal Server Error
at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:163)
```
Error in broker/worker log:
```
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 140 path $.
at com.google.gson.Gson.fromJson(Gson.java:900) ~[com.google.code.gson-gson-2.8.2.jar:?]
at com.google.gson.Gson.fromJson(Gson.java:853) ~[com.google.code.gson-gson-2.8.2.jar:?]
at com.google.gson.Gson.fromJson(Gson.java:802) ~[com.google.code.gson-gson-2.8.2.jar:?]
at org.apache.pulsar.functions.utils.SinkConfigUtils.convertFromDetails(SinkConfigUtils.java:244) ~[org.apache.pulsar-pulsar-functions-utils-2.3.1.jar:2.3.1]
at org.apache.pulsar.functions.worker.rest.api.ComponentImpl.updateFunction(ComponentImpl.java:528) ~[org.apache.pulsar-pulsar-functions-worker-2.3.1.jar:2.3.1]
at org.apache.pulsar.broker.admin.impl.SinkBase.updateSink(SinkBase.java:102) ~[org.apache.pulsar-pulsar-broker-2.3.1.jar:2.3.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
```
Originally, I think we were only expecting source/sink configs to be Map<String, String> but that has changed
### Modifications
Allow nested structures in source/sink configs.
----------------------------------------------------------------
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
With regards,
Apache Git Services