hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Yang <lin.yang.ja...@gmail.com>
Subject Re: How to get the number of node in cluster?
Date Wed, 26 Sep 2012 06:46:22 GMT
All right, Thanks

2012/9/26 George Datskos <george.datskos@jp.fujitsu.com>

>  Hey Jason,
>
> This should return the number of active tasktrackers in the cluster:
> int numNodes = new JobClient(conf).getClusterStatus().getTaskTrackers()
>
>
>
>  Hi, all
>
>  As I have to run my MapReduce program on clusters of different size, and
> I would like the reducer number adapt to (0.95 * NodeNo. *
> mapred.tasktracker.reduce.tasks.maximum) automatically, so I was wondering
> how to get get the number of node in cluster in a MapReduce Job?
>
>  --
> YANG, Lin
>
>
>


-- 
YANG, Lin

Mime
View raw message