您的位置:首页 > 运维架构

如何获取到Hadoop集群的个数

2016-04-15 00:08 204 查看
Class ClusterStatus
====================================================================

ClusterStatus
 provides clients with information such as:
Size of the cluster.
Name of the trackers.
Task capacity of the cluster.
The number of currently running map and reduce tasks.
State of the 
JobTracker
.
Details regarding black listed trackers.

-----------------------------------------------------------------------------------------------------------------------
 ClusterStatus clusterStatus = new JobClient(new JobConf()).getClusterStatus();

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Nice!
更多文章,请访问
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息