This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch cassandraql-source in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
commit dbdac7e5870f488309df48e3b5cb726d3c3455ec Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Dec 12 19:45:48 2019 +0100 Added a first example of camel-cassandraql source connector --- core/pom.xml | 11 ++++++++ .../CamelCassandraQLSourceConnector.properties | 30 ++++++++++++++++++++++ parent/pom.xml | 23 ++++++++++++++++- tests/pom.xml | 10 ++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index ab2e4d8..576fd61 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -47,6 +47,17 @@ <!-- Camel components --> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-cassandraql</artifactId> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-telegram</artifactId> <scope>provided</scope> </dependency> diff --git a/examples/CamelCassandraQLSourceConnector.properties b/examples/CamelCassandraQLSourceConnector.properties new file mode 100644 index 0000000..c407f05 --- /dev/null +++ b/examples/CamelCassandraQLSourceConnector.properties @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name=CamelCassandraQLSourceConnector +connector.class=org.apache.camel.kafkaconnector.CamelSourceConnector +key.converter=org.apache.kafka.connect.storage.StringConverter +value.converter=org.apache.kafka.connect.storage.StringConverter +#transforms=S3ObjectTransformer +#transforms.S3ObjectTransformer.type=org.apache.camel.kafkaconnector.converters.S3ObjectTransformer + +camel.source.maxPollDuration=10000 + +camel.source.kafka.topic=mytopic + +camel.source.url=cql://172.17.0.2/test?cql=select * from users&resultSetConversionStrategy=ONE + diff --git a/parent/pom.xml b/parent/pom.xml index a5da3a4..7f32be9 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -110,6 +110,17 @@ <artifactId>camel-main</artifactId> <version>${camel.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-cassandraql</artifactId> + <version>${camel.version}</version> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-telegram</artifactId> @@ -160,7 +171,17 @@ <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-cbor</artifactId> - <version>2.9.9</version> + <version>2.10.1</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.10.1</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.databind</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.10.1</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> diff --git a/tests/pom.xml b/tests/pom.xml index 7c3a7a2..ebcaac3 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -48,6 +48,16 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-cassandraql</artifactId> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-aws-sqs</artifactId> </dependency> <dependency>