Return-Path: X-Original-To: apmail-flume-user-archive@www.apache.org Delivered-To: apmail-flume-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2976A18E77 for ; Thu, 3 Dec 2015 09:54:34 +0000 (UTC) Received: (qmail 84910 invoked by uid 500); 3 Dec 2015 09:54:30 -0000 Delivered-To: apmail-flume-user-archive@flume.apache.org Received: (qmail 84856 invoked by uid 500); 3 Dec 2015 09:54:30 -0000 Mailing-List: contact user-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flume.apache.org Delivered-To: mailing list user@flume.apache.org Received: (qmail 84846 invoked by uid 99); 3 Dec 2015 09:54:30 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 09:54:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 249C7CC4AB for ; Thu, 3 Dec 2015 09:54:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id XZpRhHQ1AIQu for ; Thu, 3 Dec 2015 09:54:21 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 7BCE920267 for ; Thu, 3 Dec 2015 09:54:20 +0000 (UTC) Received: by wmec201 with SMTP id c201so18336082wme.0 for ; Thu, 03 Dec 2015 01:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wz4wk7ePixPME6GZHxS3XSS6x4XpxoIqyw33YWAEV+k=; b=wmWkNYH/kpjyCD7f6jS4nQfyrrYE2rSQDnilmcPkBn84TENOLG2mCqKJQGDX0VxH9w Bl5SB/p4yeVls+SwQWqncXWAW8khb/d5BKiXdWBwlMi+YtWZ40bxC+GGEkzXaP/gqHrZ ZM+owK3+7LSie/Vy53nWZnVD9jFWWv4TKpEPUwEWKjXbv/elKCMlM8W37zzDheitJOjU QzOqNdHyKIBrc+hOfVvpfql7ycNI1KPEGfIS/zQxyuWmr+ImdKoonlwnuRF0lZtH0P+4 Ec1jllB5RLYVCqOe107yfuFbchYfJvYu4aGfIHr3lzCHT5fuFC2lqiw3xqRPqJxMaOoe /ghg== MIME-Version: 1.0 X-Received: by 10.28.4.7 with SMTP id 7mr10749698wme.85.1449136459038; Thu, 03 Dec 2015 01:54:19 -0800 (PST) Received: by 10.194.90.80 with HTTP; Thu, 3 Dec 2015 01:54:18 -0800 (PST) In-Reply-To: References: Date: Thu, 3 Dec 2015 09:54:18 +0000 Message-ID: Subject: Re: Context/Configuration values not passed to custom serializer. From: Gonzalo Herreros To: user Content-Type: multipart/alternative; boundary=001a1141d230df445b0525fb5f39 --001a1141d230df445b0525fb5f39 Content-Type: text/plain; charset=UTF-8 Not sure how you are using the serializer but I understand it's part of an hdfs sink When you do this: a1.sinks.k1.IgnoreNullKeyData=True your property goes to the sink. To make it apperar in the serializer context it should be like this: a1.sinks.k1.serializer.IgnoreNullKeyData=True How are you using the serializer in the configuration? Gonzalo On 3 December 2015 at 09:49, R P wrote: > Thanks for the reply Gonzalo. > > There is no configure method as Serializer doesn't extend Configurable. > Do I have to extend Configurable to access custom configuration values? > > -R > P.S - Sent code sample and config in separate email directly to you. > > ------------------------------ > *From:* Gonzalo Herreros > *Sent:* Thursday, December 3, 2015 12:32 AM > *To:* user > *Subject:* Re: Context/Configuration values not passed to custom > serializer. > > It might be a bug in the sink you are using. > For instance, I have a serializer for the HbaseSink so I added two custom > properties. > > tier1.sinks.hbase-sink-1.serializer.numberBuckets=20 > > tier1.sinks.hbase-sink-1.serializer.customKey=timestamp,type,resource,hostname > > > Then in the configure method the context has the properties > "numberBuckets" and "customKey" (notice all the prefix of the property is > removed and not passed to the serializer) > If you paste your configuration and code maybe we can spot where is your > issue. > > Regards, > Gonzalo > > > On 3 December 2015 at 02:45, R P wrote: > >> Hello All, >> >> I need to use some configuration values in my implementation of >> Serializer which extends only EventSerializer. >> >> For customizing behavior I am trying to use Context provided via >> Builder's build method. >> >> >> Although the configuration values or none of the Context properties are >> not passed to Serializer. >> >> >> I am able to use this Serializer without configuration through flume and >> write data so I am certain that my implementation works correctly. >> >> >> Any idea why Context is passed as empty to the Serializer? Or any >> pointers on how I should go on debugging this issue? >> >> >> Thanks for reading and appreciate your response. >> >> >> Thanks, >> >> R >> >> >> >> > --001a1141d230df445b0525fb5f39 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Not sure how you are using the serializer b= ut I understand it's part of an hdfs sink

When you do this= :
a1.sinks.k1.IgnoreNullKeyData=3DTrue

your property goes to th= e sink.
To make it apperar in the serializer context it should be= like this:

a1.sinks.k1.serial= izer.IgnoreNullKeyData=3DTrue


Gonzalo=

=
On 3 December 2015 at 09:49, R P <hado= oper@outlook.com> wrote:

Thanks for the reply Gonzalo.=C2=A0


There is no configure method as Serializer doesn't extend Configurable.= =C2=A0
Do I have to extend Configurable to access custom configuration values?

-R
P.S - Sent code sample and config in separate email directly to you.


From: Gonzalo Herreros <gherreros@gmail.com>
Sent: Thursday, December 3, 2015 12:32 AM
To: user
Subject: Re: Context/Configuration values not passed to custom seria= lizer.
=C2=A0
It might be a bug in the sink you are using.
For instance, I have a serializer for the HbaseSink so I added two cus= tom properties.

tier1.sinks.hbase-sink-1.serializer.numberBuckets=3D20
tier1.sinks.hbase-sink-1.serializer.customKey=3Dtimestamp,type,resourc= e,hostname


Then in the configure method the context has the properties "numb= erBuckets" and "customKey" (notice all the prefix of the pro= perty is removed and not passed to the serializer)
If you paste your configuration and code maybe we can spot where is yo= ur issue.

Regards,
Gonzalo


On 3 December 2015 at 02:45, R P <hadooper@o= utlook.com> wrote:

Hello All,

=C2=A0I need to use some configuration values in my implementation of Se= rializer=C2=A0which extends only=C2=A0EventSerializer.=C2=A0

For customizing behavior=C2=A0I am trying to use Context provided via Bu= ilder's build method.=C2=A0


Although the configuration values or none of the Context properties are = not passed to Serializer.=C2=A0


I am able to = use this=C2=A0Se= rializer without configuration through flume and write data so I am certain that my= implementation works correctly.=C2=A0


Any idea why Context is passed as empty to the=C2=A0Serializer?=C2=A0 Or any pointers on how I should go on debugging this issue?


Thanks for reading and appreciate your response.=C2=A0=C2=A0=


Thanks,

R





--001a1141d230df445b0525fb5f39--