echo ""; echo ""; echo ""; echo ""; if(!is_admin){echo "";} » HBase中的HMaster对象讨论 仲子说

2010-03-25

HBase中的HMaster对象讨论

Posted in 云计算 at 13:17 Author:仲远

标签:

????HBase?????????????????????HMaster??????HMaster???????getClusterStatus()?getConfiguration()?getRootRegionLocation()?getServerManager()????????????

???????????????????????API??????????HBase?????????HMaster??????????new HMaster(conf)???HMaster??????????????HMaster????????????????

?????????HMaster??????????????????Client???????????????????????HMaster???????????HBase??????????????Client??????????

(1)?Client????????HBaseAdmin???HMasterInterface?????????????????????

HBaseConfiguration conf = new HBaseConfiguration();
HBaseAdmin hbaseAdmin = new HBaseAdmin(conf);  
HMasterInterface hMaster = hbaseAdmin.getMaster();

??????HBaseAdmin???getClusterStatus()????HBase 0.20.x??????????????

(2)?HBase????????????HMaster???????org.apache.hadoop.hbase.LocalHBaseCluster????????????HMaster?????????????????????

?HBase???????????master.jsp???????????HMaster????

HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
HBaseConfiguration conf = master.getConfiguration();
HServerAddress rootLocation = master.getRootRegionLocation();
Map<byte [], MetaRegion> onlineRegions = master.getOnlineMetaRegions();
Map<String, HServerInfo> serverToServerInfos = master.getServersToServerInfo();

本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:

Leave a Comment

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word