How can i pass two tables as string for blacklisting

25 views
Skip to first unread message

tt11

unread,
Aug 1, 2017, 9:42:04 AM8/1/17
to Confluent Platform

 I am trying to use "PUT" method in json to an existing kafka connector and trying to  blacklist two tables.(using postman)

{
    "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
    "table.blacklist": [{"name":abc", "type": "string"
                         "name":"def", "type": "string"}],
}

I tried to pass as a list, also tried without square brackets i am getting an error . Tried passing as a string still same error .


my question is how to pass two variables as list in json 


Error:

-08-01 02:07:04,627] WARN  (org.eclipse.jetty.servlet.ServletHandler:620)
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@68885dec; line: 2, column: 68] (through reference chain: java.util.LinkedHashMap["table.blacklist"])
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)

tt11

unread,
Aug 1, 2017, 9:50:22 AM8/1/17
to Confluent Platform
tried like this also 
"table.blacklist": ["abc", "def" ],

Ewen Cheslack-Postava

unread,
Aug 2, 2017, 12:29:36 PM8/2/17
to Confluent Platform
The REST API accepts JSON, but the actual set of configs are always string -> string. Lists are represented as comma separated strings, so you want

"table.blacklist": "abc,def"

-Ewen

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/e3439628-be40-4d59-b3f0-33a258e40260%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

tt11

unread,
Aug 2, 2017, 1:49:07 PM8/2/17
to Confluent Platform
i tried that, but it seems like its not blacklisting
since it is multiple tables should i use "tables.blacklist" instead of "table.blacklist"
just how they have used in here  Issue #4: java.lang.NullPointerException by szwed in shikhar/kafka-connect-dynamodb on GitHub 


On Wednesday, August 2, 2017 at 12:29:36 PM UTC-4, Ewen Cheslack-Postava wrote:
The REST API accepts JSON, but the actual set of configs are always string -> string. Lists are represented as comma separated strings, so you want

"table.blacklist": "abc,def"

-Ewen
On Tue, Aug 1, 2017 at 6:50 AM, tt11 <kswath...@gmail.com> wrote:
tried like this also 
"table.blacklist": ["abc", "def" ],

On Tuesday, August 1, 2017 at 9:42:04 AM UTC-4, tt11 wrote:

 I am trying to use "PUT" method in json to an existing kafka connector and trying to  blacklist two tables.(using postman)

{
    "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
    "table.blacklist": [{"name":abc", "type": "string"
                         "name":"def", "type": "string"}],
}

I tried to pass as a list, also tried without square brackets i am getting an error . Tried passing as a string still same error .


my question is how to pass two variables as list in json 


Error:

-08-01 02:07:04,627] WARN  (org.eclipse.jetty.servlet.ServletHandler:620)
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@68885dec; line: 2, column: 68] (through reference chain: java.util.LinkedHashMap["table.blacklist"])
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.

Ewen Cheslack-Postava

unread,
Aug 4, 2017, 1:32:31 PM8/4/17
to Confluent Platform
The setting is always table.blacklist, even if there are multiple tables. What error are you getting when you use the format of configuration that I gave?


To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsubscribe@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages