Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> How to get metrics information?


+
Zhenhua Guo 2011-01-22, 17:57
Copy link to this message
-
Re: How to get metrics information?
You can use the following code:
        JobClient jc = new JobClient(jobConf);
        int numReduces = jc.getClusterStatus().getMaxReduceTasks();

For 0.20.3, you can use:
    ClusterMetrics metrics = jobTracker.getClusterMetrics();

On Sat, Jan 22, 2011 at 9:57 AM, Zhenhua Guo <[EMAIL PROTECTED]> wrote:

> I want to get metrics information (e.g. number of Maps, number of
> Reduces, memory use, load) by APIs. I found two useful classes -
> ClusterStatus and ClusterMetrics. My question is how I can get
> instances of that two classes? From JobClient or JobTracker? Any
> suggested alternative way to get the information?
>
> Thanks
>
> Gerald
>
+
Zhenhua Guo 2011-01-23, 02:38
+
Ted Yu 2011-01-23, 02:59
+
Edward Capriolo 2011-01-23, 14:20
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB