HBASE-2828 HTable unnecessarily coupled with HMaster -- Added comment that we do not want dependency on Master

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1030745 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-11-03 22:45:59 +00:00
parent dc5301c058
commit f0e0f6c8a7
2 changed files with 4 additions and 3 deletions

View File

@ -261,6 +261,7 @@
<execution>
<goals>
<goal>generate-html</goal>
<goal>generate-pdf</goal>
</goals>
<phase>pre-site</phase>
</execution>

View File

@ -197,13 +197,13 @@ public class HTable implements HTableInterface {
}
/**
* TODO Might want to change this to public, would be nice if the number
* of threads would automatically change when servers were added and removed
* @return the number of region servers that are currently running
* @throws IOException if a remote or network exception occurs
*/
int getCurrentNrHRS() throws IOException {
public int getCurrentNrHRS() throws IOException {
try {
// We go to zk rather than to master to get count of regions to avoid
// HTable having a Master dependency. See HBase-2828
return ZKUtil.getNumberOfChildren(this.connection.getZooKeeperWatcher(),
this.connection.getZooKeeperWatcher().rsZNode);
} catch (KeeperException ke) {