如何获取到Hadoop集群的个数

来源:互联网 发布:淘宝新店防骗 编辑:程序博客网 时间:2024/05/21 19:42

Class ClusterStatus

====================================================================

ClusterStatus provides clients with information such as:

  1. Size of the cluster.
  2. Name of the trackers.
  3. Task capacity of the cluster.
  4. The number of currently running map and reduce tasks.
  5. State of the JobTracker.
  6. Details regarding black listed trackers.
-----------------------------------------------------------------------------------------------------------------------

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

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Nice!

更多文章,请访问

2 0
原创粉丝点击