hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jabir Ahmed <jabirah...@gmail.com>
Subject reading active tasktracker metrics
Date Thu, 29 Dec 2011 19:00:14 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message