chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yang <eric...@gmail.com>
Subject Re: Why system.exit() present in Demux.java
Date Sat, 04 Dec 2010 23:30:23 GMT
In the old days, we used a shell script to check the return status of
the submitted job.  This is why we have System.exit in Demux.  In
Chukwa 0.2, demux manager was introduced and interfacing Demux through
Java code.  Hence, the return status is no longer required, but still
works if Demux is invoked through shell script.

regards,
Eric

On Fri, Dec 3, 2010 at 12:51 AM, Stuti Awasthi
<Stuti_Awasthi@persistent.co.in> wrote:
> Hi all,
>
> I am facing issues while executing Junit test cases for my custom processor.
> This is what I have done :
>
>
>
> ·         I have created my own processor class extended from
> AbstractProcessor.java.
>
> ·         For testing I wrote the Junit test class and passed .done file
> location and output directory location to Demux.main()
>
> ·         Demux class run and successfully executes my custom processor
>
> ·         Convert .done to .evt file in output directory as desired.
>
>
>
> Issue : Code of Demux.main() class :
>
>
>
>                 public static void main(String[] args) throws Exception
{
>
>     int res = ToolRunner.run(new Configuration(), new Demux(), args);
>
>     System.exit(res);
>
>                  }
>
>
>
> After converting .done file to .evt file , Demux class end the process by
> System.exit() command due to which control is not returned to my JUnit test
> class. Because of this the control is not reaching my assertion and testcase
> is not successful.
>
>
>
> Questions
>
> ·         I want to know why we have this System.exit() in Demux.java class
> ?
>
> ·         Is there any way I can execute my testcase successfully ? Have any
> one tested processor classes given by chukwa ? Eg : Syslog, TsProcessor etc
>
> ·         Since Demux is a daemon which runs continuously . So does
> everytime this demux class is called for every .done file ?
>
>
>
> Please Suggest
>
>
>
> Thanks
>
> Stuti Awasthi
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.

Mime
View raw message