arun k 2011-12-11, 06:41
-RE: Accessing Job counters displayed in WEB GUI in Hadoop Code
Devaraj K 2011-12-12, 03:26
You can get the Counters object from the job after completion and
then find the counter whichever you want in Counters object using
findCounter api. Please find the sample snippet for accessing the counter
after Job completion
Configuration conf = new Configuration();
Cluster cluster = new Cluster(conf);
Job job = Job.getInstance(cluster,conf);
result = job.waitForCompletion(true);
Counters counters = job.getCounters();
Counter c1 = counters.findCounter(CustomCOUNTER.NOOFBADRECORDS);
From: ArunKumar [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 11, 2011 12:15 PM
To: [EMAIL PROTECTED]
Subject: Accessing Job counters displayed in WEB GUI in Hadoop Code
Hai guys !
Can i access the Job counters displayed in WEB GUI in Hadoop code when the
job finished their execution ?
If so, how can i access the values like "average task run time" and counters
"FILE/HDFS BYTES READ/WRITTEN" immediately after the job has completed in
JobQueueTaskScheduler Code or in some other code file ?
View this message in context:
Sent from the Hadoop lucene-users mailing list archive at Nabble.com.