From issues-return-40805-archive-asf-public=cust-asf.ponee.io@karaf.apache.org Thu Sep 6 19:20:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DBAB318077A for ; Thu, 6 Sep 2018 19:20:04 +0200 (CEST) Received: (qmail 66363 invoked by uid 500); 6 Sep 2018 17:20:04 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 66215 invoked by uid 99); 6 Sep 2018 17:20:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2018 17:20:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A1480C1F45 for ; Thu, 6 Sep 2018 17:20:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0BmF8TbVJVhy for ; Thu, 6 Sep 2018 17:20:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8AD705F356 for ; Thu, 6 Sep 2018 17:20:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 08182E25B2 for ; Thu, 6 Sep 2018 17:20:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7016326B59 for ; Thu, 6 Sep 2018 17:20:00 +0000 (UTC) Date: Thu, 6 Sep 2018 17:20:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-5659) Upgrade to Kafka 1.1.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-5659?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1660= 6103#comment-16606103 ]=20 ASF GitHub Bot commented on KARAF-5659: --------------------------------------- fpapon closed pull request #46: [KARAF-5659] Upgrade to Kafka 1.1.1 URL: https://github.com/apache/karaf-decanter/pull/46 =20 =20 =20 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/assembly/src/main/feature/feature.xml b/assembly/src/main/feat= ure/feature.xml index 0493b72..55d7819 100644 --- a/assembly/src/main/feature/feature.xml +++ b/assembly/src/main/feature/feature.xml @@ -117,7 +117,7 @@ =20 =09 decanter-common - mvn:org.apache.servicemix.bundles/org.= apache.servicemix.bundles.kafka-clients/0.9.0.0_1 + mvn:org.apache.servicemix.bundles/org.= apache.servicemix.bundles.kafka-clients/1.1.1_1 mvn:org.apache.karaf.decanter.collector/org.apache.karaf.d= ecanter.collector.kafka/${project.version} =20 @@ -271,7 +271,7 @@ =20 decanter-common - mvn:org.apache.servicemix.bundles/org.= apache.servicemix.bundles.kafka-clients/0.9.0.0_1 + mvn:org.apache.servicemix.bundles/org.= apache.servicemix.bundles.kafka-clients/1.1.1_1 mvn:org.apache.karaf.decanter.appender/org.apache.karaf.de= canter.appender.kafka/${project.version} =20 diff --git a/collector/kafka/src/main/cfg/org.apache.karaf.decanter.collect= or.kafka.cfg b/collector/kafka/src/main/cfg/org.apache.karaf.decanter.colle= ctor.kafka.cfg index 6342dfe..15ebd09 100644 --- a/collector/kafka/src/main/cfg/org.apache.karaf.decanter.collector.kafk= a.cfg +++ b/collector/kafka/src/main/cfg/org.apache.karaf.decanter.collector.kafk= a.cfg @@ -75,5 +75,11 @@ # Security (SASL) #=C2=A0For SASL, you have to configure Java System property as explained i= n http://kafka.apache.org/documentation.html#security_ssl =20 -# Unmarshaller to use -unmarshaller.target=3D(dataFormat=3Djson) \ No newline at end of file +# message type (text to use the unmarshaller or raw to not use it) +message.type=3Dtext + +# Unmarshaller to use (json is recommended) +unmarshaller.target=3D(dataFormat=3Djson) + +# custom fields +fields.remove.request-size-max=3Dremove \ No newline at end of file diff --git a/collector/kafka/src/main/java/org/apache/karaf/decanter/collec= tor/kafka/KafkaCollector.java b/collector/kafka/src/main/java/org/apache/ka= raf/decanter/collector/kafka/KafkaCollector.java index a805de3..7c6807f 100644 --- a/collector/kafka/src/main/java/org/apache/karaf/decanter/collector/kaf= ka/KafkaCollector.java +++ b/collector/kafka/src/main/java/org/apache/karaf/decanter/collector/kaf= ka/KafkaCollector.java @@ -54,6 +54,7 @@ private String topic; private String eventAdminTopic; private boolean consuming =3D false; + private String messageType; =20 @Reference public EventAdmin dispatcher; @@ -68,6 +69,7 @@ public void activate(ComponentContext componentContext) { =20 topic =3D getValue(properties, "topic", "decanter"); eventAdminTopic =3D getValue(properties, EventConstants.EVENT_TOPI= C, "decanter/collect/kafka/decanter"); + messageType =3D getValue(properties, "message.type", "text"); =20 Properties config =3D new Properties(); =20 @@ -175,8 +177,12 @@ private void consume() throws UnsupportedEncodingExcep= tion { =20 for (ConsumerRecord record : records) { String value =3D record.value(); - ByteArrayInputStream is =3D new ByteArrayInputStream(value.get= Bytes("utf-8")); - data.putAll(unmarshaller.unmarshal(is)); + if (messageType.equalsIgnoreCase("text")) { + ByteArrayInputStream is =3D new ByteArrayInputStream(value= .getBytes("utf-8")); + data.putAll(unmarshaller.unmarshal(is)); + } else { + data.put("payload", value); + } } =20 try { diff --git a/pom.xml b/pom.xml index 526603c..1d05eae 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 6.2.4_1 1.0.4 1.0 - 0.11.0.0 + 1.1.1 4.1.4 3.1.1 4.1.2 =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > Upgrade to Kafka 1.1.x > ---------------------- > > Key: KARAF-5659 > URL: https://issues.apache.org/jira/browse/KARAF-5659 > Project: Karaf > Issue Type: Dependency upgrade > Components: decanter > Reporter: Jean-Baptiste Onofr=C3=A9 > Assignee: Jean-Baptiste Onofr=C3=A9 > Priority: Major > Fix For: decanter-2.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)