You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Jabir Ahmed <ja...@gmail.com> on 2011/12/29 20:00:14 UTC

reading active tasktracker metrics

I am trying to collect various metrics for active tasttrackers but it
throws an exception

Not sure why?


<snippet>
    for(String s: jc.getClusterStatus(true).getActiveTrackerNames()){
                System.out.println("tt "+s);
                System.out.println(""+ new
org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker(s).getAvailableSlots(TaskType.MAP));


            }

<snippet>

#output

prompt $ /installs/hadoop-0.20.2//bin/hadoop jar tools.jar tools.MetaInfo


tt tracker_10.0.0.6:localhost/127.0.0.1:53256java.lang.NullPointerException
    at
org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker.getAvailableSlots(TaskTracker.java:90)
    at tools.MetaInfo.<init>(MetaInfo.java:44)     at
tools.MetaInfo.main(MetaInfo.java:51)     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)     at
org.apache.hadoop.util.RunJar.main(RunJar.java:186) jabir:CompareHdfs
jabir.ahmed$



Not sure why it doesnt display the available slots but displays an error






-- 
"The best way to make your dreams come true is to wake up." - Paul Valery

--
Phone: +91 99162 93063
IM/e-mail: jabirahmed@yahoo.com , jabirahmed@gmail.com