Return-Path: X-Original-To: apmail-incubator-chukwa-dev-archive@www.apache.org Delivered-To: apmail-incubator-chukwa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3FDD41006D for ; Fri, 12 Jul 2013 07:04:58 +0000 (UTC) Received: (qmail 36302 invoked by uid 500); 12 Jul 2013 07:04:57 -0000 Delivered-To: apmail-incubator-chukwa-dev-archive@incubator.apache.org Received: (qmail 36165 invoked by uid 500); 12 Jul 2013 07:04:47 -0000 Mailing-List: contact chukwa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-dev@incubator.apache.org Received: (qmail 36152 invoked by uid 99); 12 Jul 2013 07:04:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 07:04:44 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivytang0812@gmail.com designates 209.85.192.182 as permitted sender) Received: from [209.85.192.182] (HELO mail-pd0-f182.google.com) (209.85.192.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 07:04:38 +0000 Received: by mail-pd0-f182.google.com with SMTP id r10so8322992pdi.41 for ; Fri, 12 Jul 2013 00:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to:x-mailer; bh=/agoGkKuy0AxSUmV6ylQRnyyGOZ06sQKtVgv1vvDLpw=; b=cBB5tq7StFQOF2SU/3qGr/HOCuBFYkhIrA/55fN/m2JK4ZgmzHsx5JatKWkT3bfpMw sBwQnqS+KyH+mU6BS22znIxMw10MXoJijKjG3UNGOR0tGiXSBF+kYekseIqXqf7k+NGP LLDIk5nyL1lb6WI4Pd3ah1Ug8y6q9+F0KZpbL9SqQfITblvSWXKDd6T0E5hX9Yg9Qj83 +jrDaGc0GloacwAWUrQcfpoFaNAqgPoZzIYMLTt5UQXFj2/nYUHTXxSR03KBN+e2fvbc G0QZFHgUw1TAYfNqVF6RvVnD1RuztVzQ+D2wRK29+QycsUzsJxUP6ctz/UVxOZNsqqd3 knDA== X-Received: by 10.67.14.100 with SMTP id ff4mr41193231pad.174.1373612658273; Fri, 12 Jul 2013 00:04:18 -0700 (PDT) Received: from [10.1.1.163] (static-ip-121-77-134-202.rev.dyxnet.com. [202.134.77.121]) by mx.google.com with ESMTPSA id nr8sm32709217pbc.6.2013.07.12.00.04.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 00:04:16 -0700 (PDT) From: IvyTang Content-Type: multipart/alternative; boundary="Apple-Mail=_EFAAE08F-33CC-4C2F-8611-E8D05DAE9450" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: About CHUKWA-581,Demux do not support user custom reducer package name. Date: Fri, 12 Jul 2013 15:04:12 +0800 References: <44798F96-3C3A-41A3-9D5B-8C540E8BC0BB@gmail.com> To: chukwa-dev@incubator.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_EFAAE08F-33CC-4C2F-8611-E8D05DAE9450 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=GB2312 Hi,Eric In order to applying to all multiple datatypes in Demux,init the Reducer = class depends on the ChukwaRecordKey's datatype . I need the datatype in = ChukwaRecordKey. The ChukwaRecordKey needs to add a field named dataType , showing this = ChukwaRecord's datatype . And also i need add an argument in=20 parse(String recordEntry, OutputCollector = output, Reporter reporter)=20 An argument String dataType needs to be passed to this method to build = the ChukwaRecordKey. Adding a field in ChukwaRecordKey ,and add an argument in method = AbstractProcessor.parse(String recordEntry, = OutputCollector output, Reporter = reporter) Is that acceptable? This is the only way i can think of to make the = custom reducer more configurable. --=20 Best regards, Ivy Tang On 2013-7-10, at =CF=C2=CE=E712:01, Eric Yang wrote: > Yes that will help. Please include test case as well. Thanks Ivy. >=20 > regards, > Eric >=20 >=20 > On Mon, Jul 8, 2013 at 10:42 PM, IvyTang = wrote: >=20 >> This issue has been reported >> https://issues.apache.org/jira/browse/CHUKWA-581. >>=20 >> And i think i can submit a patch later . >>=20 >> Should i open a new jira or just assign this CHUKWA-581 to myself? >>=20 >> This can implement reducer outside chukwa. >>=20 >> -- >> Best regards, >>=20 >> Ivy Tang >>=20 >> On 2013-7-9, at =CF=C2=CE=E71:22, Eric Yang = wrote: >>=20 >>> The recommended change can improve usability to implement parsers = outside >>> of Chukwa packages. +1 on the change. Do you mind open a jira for = this? >>> Thanks >>>=20 >>> regards, >>> Eric >>>=20 >>>=20 >>> On Mon, Jul 8, 2013 at 6:54 AM, =CC=C6 =D3=B1 = wrote: >>>=20 >>>> We can write our own mapper ,because MapProcessorFactory uses >>>> Class.forName(parserClass).getConstructor().newInstance(); >>>> since we config the parserClass in config file. >>>>=20 >>>> But the ReduceProcessorFactory inits the reducer class using the >>>> classname >> "org.apache.hadoop.chukwa.extraction.demux.processor.reducer."+ >>>> reduceType. >>>> So the reducer class must be put in package >>>> org.apache.hadoop.chukwa.extraction.demux.processor.reducer and = named >>>> reduceType. >>>>=20 >>>> Why not we put the reducer class name in config file either? >>>> For exam, the {customdatatype_mapper} means mapper class >>>> ,{customdatatype_reducer} means reducer class. >>>>=20 >>>> This can give chukka more flexibility. >>>>=20 >>>> -- >>>> Best regards, >>>>=20 >>>> Ivy Tang >>>>=20 >>>>=20 >>=20 >>=20 --Apple-Mail=_EFAAE08F-33CC-4C2F-8611-E8D05DAE9450--