Thanks folks, this helps

Balu


On 2/18/10 6:42 AM, "Steve Loughran" <ste...@apache.org> wrote:

> Tsz Wo (Nicholas), Sze wrote:
>> Oops, DistCp.main(..) calls System.exit(..) at the end.  So it would also
>> terminate your Java program.  It probably is not desirable.  You may still
>> use similar codes as the ones in DistCp.main(..) as shown below.  However,
>> they are not stable APIs.
>> 
>> 
>> //DistCp.main
>>   public static void main(String[] args) throws Exception {
>>     JobConf job = new JobConf(DistCp.class);
>>     DistCp distcp = new DistCp(job);
>>     int res = ToolRunner.run(distcp, args);
>>     System.exit(res);
>>   }
> 
> sorry, just replied saying roughly the same thing. Adding a formal API
> would be useful, as DistCP's implementation of Tool.run does assume that
> system.err is the right place to log,
> 
> 

Reply via email to