You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by jingguo yao <ya...@gmail.com> on 2016/06/01 07:41:49 UTC
Are key.converter.schemas.enable and value.converter.schemas.enable
of any use in Kafka connector?
In config/connect-standalone.properties and
config/connect-distributed.properties, there are the following
configuration entries:
> key.converter.schemas.enable=false
> value.converter.schemas.enable=false
But there is no Java source code which uses these two configuration
entries. I am talking about kafka_2.11-0.9.0.1.
--
Jingguo
Re: Are key.converter.schemas.enable and value.converter.schemas.enable
of any use in Kafka connector?
Posted by Ewen Cheslack-Postava <ew...@confluent.io>.
key.converter and value.converter are namespace prefixes in this case.
These settings are used by the JsonConverter
https://github.com/apache/kafka/blob/trunk/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java#L53
If schemas are enabled, all JSON messages are sent using an envelope which
also carries the schema. If it is disabled, just the usual JSON document
will be written, but downstream consumers of the data won't have any
information about the schema and will therefore need to handle arbitrary
data.
Most users will want to keep the schemas disabled since that's the norm for
JSON. However, this limits the ability to use a lot of connectors because
they need schema information to be able to process the data (e.g. to write
to HDFS and load that data into Hive or write to a relational database
table we need the schema information so we can setup the target table
correctly).
-Ewen
On Wed, Jun 1, 2016 at 12:41 AM, jingguo yao <ya...@gmail.com> wrote:
> In config/connect-standalone.properties and
> config/connect-distributed.properties, there are the following
> configuration entries:
>
> > key.converter.schemas.enable=false
> > value.converter.schemas.enable=false
>
> But there is no Java source code which uses these two configuration
> entries. I am talking about kafka_2.11-0.9.0.1.
>
>
> --
> Jingguo
>
--
Thanks,
Ewen