hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r781662 - in /hadoop/hbase/trunk_on_hadoop-0.18.3: ./ bin/ conf/ lib/ src/java/ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/master/ src/java/org/apache/hadoop/hbase/zookeeper/ ...
Date Thu, 04 Jun 2009 06:52:43 GMT
Author: apurtell
Date: Thu Jun  4 06:52:42 2009
New Revision: 781662

URL: http://svn.apache.org/viewvc?rev=781662&view=rev
Log:
HBASE-13577, HBASE-1471, HBASE-1445, HBASE-1474, HBABSE-1448, HBASE-1478, HBASE-1462, HBASE-1143

Added:
    hadoop/hbase/trunk_on_hadoop-0.18.3/lib/zookeeper-r780828-hbase-1449.jar   (with props)
Removed:
    hadoop/hbase/trunk_on_hadoop-0.18.3/lib/zookeeper-3.1.0-hbase-1241.jar
Modified:
    hadoop/hbase/trunk_on_hadoop-0.18.3/CHANGES.txt
    hadoop/hbase/trunk_on_hadoop-0.18.3/bin/hirb.rb
    hadoop/hbase/trunk_on_hadoop-0.18.3/conf/hbase-default.xml
    hadoop/hbase/trunk_on_hadoop-0.18.3/conf/zoo.cfg
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HConstants.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/HMaster.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ServerManager.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ZKMasterAddressWatcher.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/overview.html
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/zookeeper/HQuorumPeerTest.java
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/master/master.jsp
    hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/regionserver/regionserver.jsp

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/CHANGES.txt?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/CHANGES.txt (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/CHANGES.txt Thu Jun  4 06:52:42 2009
@@ -19,6 +19,8 @@
    HBASE-1367  Get rid of Thrift exception 'NotFound'
    HBASE-1381  Remove onelab and bloom filters files from hbase
    HBASE-1411  Remove HLogEdit.
+   HBASE-1357  If one sets the hbase.master to 0.0.0.0 non local regionservers
+               can't find the master
 
   BUG FIXES
    HBASE-1140  "ant clean test" fails (Nitay Joffe via Stack)
@@ -158,6 +160,8 @@
                their region assignments from the last master
    HBASE-1457  Taking down ROOT/META regionserver can result in cluster
                becoming in-operational (Ryan Rawson via Stack)
+   HBASE-1471  During cluster shutdown, deleting zookeeper regionserver nodes
+               causes exceptions
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage
@@ -295,6 +299,15 @@
    HBASE-1464  Add hbase.regionserver.logroll.period to hbase-default
    HBASE-1192  LRU-style map for the block cache (Jon Gray and Ryan Rawson
                via Stack)
+   HBASE-1445  Add the ability to start a master from any machine
+   HBASE-1474  Add zk attributes to list of attributes 
+               in master and regionserver UIs
+   HBASE-1448  Add a node in ZK to tell all masters to shutdown
+   HBASE-1478  Remove hbase master options from shell (Nitay Joffe via Stack)
+   HBASE-1462  hclient still seems to depend on master
+   HBASE-1143  region count erratic in master UI
+               (kill server hosting root or meta and see how count goes awry)....
+               make sure you have a bunch of reions in there
 
   OPTIMIZATIONS
    HBASE-1412  Change values for delete column and column family in KeyValue

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/bin/hirb.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/bin/hirb.rb?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/bin/hirb.rb (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/bin/hirb.rb Thu Jun  4 06:52:42 2009
@@ -31,17 +31,12 @@
 HBase Shell command-line options:
  format        Formatter for outputting results: console | html. Default: console
  format-width  Width of table outputs. Default: 110 characters.
- master        HBase master shell should connect to: e.g --master=example:60000
 HERE
-master = nil
 found = []
 format = 'console'
 format_width = 110
 for arg in ARGV
-  if arg =~ /^--master=(.+)/i
-    master = $1
-    found.push(arg)
-  elsif arg =~ /^--format=(.+)/i
+  if arg =~ /^--format=(.+)/i
     format = $1
     if format =~ /^html$/i
       raise NoMethodError.new("Not yet implemented")
@@ -70,10 +65,9 @@
 @formatter = Formatter::Console.new(STDOUT, format_width)
 # TODO, etc.  @formatter = Formatter::XHTML.new(STDOUT)
 
-# Setup the HBase module.  Create a configuration.  If a master, set it.
+# Setup the HBase module.  Create a configuration.
 # Turn off retries in hbase and ipc.  Human doesn't want to wait on N retries.
 @configuration = org.apache.hadoop.hbase.HBaseConfiguration.new()
-@configuration.set("hbase.master", master) if master
 @configuration.setInt("hbase.client.retries.number", 5)
 @configuration.setInt("ipc.client.connect.max.retries", 3)
 

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/conf/hbase-default.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/conf/hbase-default.xml?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/conf/hbase-default.xml (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/conf/hbase-default.xml Thu Jun  4 06:52:42 2009
@@ -31,18 +31,19 @@
     </description>
   </property>
   <property>
-    <name>hbase.master.hostname</name>
-    <value>local</value>
-    <description>The host that the HBase master runs at.
-      A value of 'local' runs the master and regionserver in a single process.
-    </description>
-  </property>
-  <property>
     <name>hbase.master.port</name>
     <value>60000</value>
     <description>The port master should bind to.</description>
   </property>
   <property>
+    <name>hbase.cluster.distributed</name>
+    <value>false</value>
+    <description>The mode the cluster will be in. Possible values are
+      false: standalone and pseudo-distributed setups with managed Zookeeper
+      true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
+    </description>
+  </property>
+  <property>
     <name>hbase.tmp.dir</name>
     <value>/tmp/hbase-${user.name}</value>
     <description>Temporary directory on the local filesystem.</description>
@@ -214,6 +215,21 @@
     </description>
   </property>
   <property>
+    <name>hbase.master.dns.interface</name>
+    <value>default</value>
+    <description>The name of the Network Interface from which a master 
+      should report its IP address.
+    </description>
+  </property>
+  <property>
+    <name>hbase.master.dns.nameserver</name>
+    <value>default</value>
+    <description>The host name or IP address of the name server (DNS)
+      which a master should use to determine the host name used 
+      for communication and display purposes.
+    </description>
+  </property>
+  <property>
     <name>hbase.regionserver.globalMemcache.upperLimit</name>
     <value>0.4</value>
     <description>Maximum size of all memcaches in a region server before new 

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/conf/zoo.cfg
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/conf/zoo.cfg?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/conf/zoo.cfg (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/conf/zoo.cfg Thu Jun  4 06:52:42 2009
@@ -11,4 +11,4 @@
 # the port at which the clients will connect
 clientPort=2181
 
-server.0=${hbase.master.hostname}:2888:3888
\ No newline at end of file
+server.0=localhost:2888:3888
\ No newline at end of file

Added: hadoop/hbase/trunk_on_hadoop-0.18.3/lib/zookeeper-r780828-hbase-1449.jar
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/lib/zookeeper-r780828-hbase-1449.jar?rev=781662&view=auto
==============================================================================
Binary file - no diff available.

Propchange: hadoop/hbase/trunk_on_hadoop-0.18.3/lib/zookeeper-r780828-hbase-1449.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HConstants.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HConstants.java Thu
Jun  4 06:52:42 2009
@@ -52,21 +52,16 @@
   
   // Configuration parameters
   
-  // TODO: URL for hbase master like hdfs URLs with host and port.
-  // Like jdbc URLs?  URLs could be used to refer to table cells?
-  // jdbc:mysql://[host][,failoverhost...][:port]/[database]
-  // jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
-  
-  // Key into HBaseConfiguration for the hbase.master address.
-  // TODO: Support 'local': i.e. default of all running in single
-  // process.  Same for regionserver. TODO: Is having HBase homed
-  // on port 60k OK?
+  //TODO: Is having HBase homed on port 60k OK?
   
-  /** Parameter name for master address */
-  static final String MASTER_ADDRESS = "hbase.master";
-
-  /** Parameter name for master host name. */
-  static final String MASTER_HOST_NAME = "hbase.master.hostname";
+  /** Cluster is in distributed mode or not */
+  static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed";
+  
+  /** Cluster is standalone or pseudo-distributed */
+  static final String CLUSTER_IS_LOCAL = "false";
+  
+  /** Cluster is fully-distributed */
+  static final String CLUSTER_IS_DISTRIBUTED = "true";
 
   /** default host address */
   static final String DEFAULT_HOST = "0.0.0.0";

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
Thu Jun  4 06:52:42 2009
@@ -118,6 +118,7 @@
     for(HColumnDescriptor descriptor : families) {
       this.families.put(descriptor.getName(), descriptor);
     }
+    setMemcacheFlushSize(16 * 1024);
   }
 
   /**

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
Thu Jun  4 06:52:42 2009
@@ -90,7 +90,6 @@
     final int noRegionServers)
   throws IOException {
     this.conf = conf;
-    doLocal(conf);
     // Create the master
     this.master = new HMaster(conf);
     // Start the HRegionServers.  Always have region servers come up on
@@ -317,46 +316,12 @@
   }
 
   /**
-   * Changes <code>hbase.master</code> from 'local' to 'localhost:PORT' in
-   * passed Configuration instance.
-   * @param c
-   * @return The passed <code>c</code> configuration modified if hbase.master
-   * value was 'local' otherwise, unaltered.
-   */
-  private static HBaseConfiguration doLocal(final HBaseConfiguration c) {
-    if (!isLocal(c)) {
-      return c;
-    }
-
-    // Need to rewrite address in Configuration if not done already.
-    String address = c.get(MASTER_ADDRESS);
-    if (address != null) {
-      String port = address.startsWith(LOCAL_COLON)?
-        address.substring(LOCAL_COLON.length()):
-        Integer.toString(DEFAULT_MASTER_PORT);
-      c.set(MASTER_ADDRESS, "localhost:" + port);
-    }
-
-    // Need to rewrite host in Configuration if not done already.
-    String host = c.get(MASTER_HOST_NAME);
-    if (host != null && host.equals(LOCAL)) {
-      c.set(MASTER_HOST_NAME, "localhost");
-    }
-
-    return c;
-  }
-
-  /**
    * @param c Configuration to check.
    * @return True if a 'local' address in hbase.master value.
    */
   public static boolean isLocal(final Configuration c) {
-    String address = c.get(MASTER_ADDRESS);
-    boolean addressIsLocal = address == null || address.equals(LOCAL) ||
-                             address.startsWith(LOCAL_COLON);
-    String host = c.get(MASTER_HOST_NAME);
-    boolean hostIsLocal = host == null || host.equals(LOCAL);
-    return addressIsLocal && hostIsLocal;
+    String mode = c.get(CLUSTER_DISTRIBUTED);
+    return mode == null || mode.equals(CLUSTER_IS_LOCAL);
   }
 
   /**

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Thu Jun  4 06:52:42 2009
@@ -328,7 +328,6 @@
     public HRegionLocation getRegionLocation(final byte [] name,
         final byte [] row, boolean reload)
     throws IOException {
-      getMaster();
       return reload? relocateRegion(name, row): locateRegion(name, row);
     }
 
@@ -476,14 +475,12 @@
     public HRegionLocation locateRegion(final byte [] tableName,
         final byte [] row)
     throws IOException{
-      getMaster();
       return locateRegion(tableName, row, true);
     }
 
     public HRegionLocation relocateRegion(final byte [] tableName,
         final byte [] row)
     throws IOException{
-      getMaster();
       return locateRegion(tableName, row, false);
     }
 
@@ -795,7 +792,7 @@
     public HRegionInterface getHRegionConnection(
         HServerAddress regionServer) 
     throws IOException {
-      return getHRegionConnection(regionServer, true);
+      return getHRegionConnection(regionServer, false);
     }
 
     public synchronized ZooKeeperWrapper getZooKeeperWrapper() throws IOException {
@@ -806,7 +803,7 @@
     }
 
     /*
-     * Repeatedly try to find the root region by asking the master for where it is
+     * Repeatedly try to find the root region in ZK
      * @return HRegionLocation for root region if found
      * @throws NoServerForRegionException - if the root region can not be
      * located after retrying
@@ -814,7 +811,6 @@
      */
     private HRegionLocation locateRootRegion()
     throws IOException {
-      getMaster();
 
       // We lazily instantiate the ZooKeeper object because we don't want to
       // make the constructor have to throw IOException or handle it itself.
@@ -901,7 +897,6 @@
 
     public <T> T getRegionServerWithRetries(ServerCallable<T> callable) 
     throws IOException, RuntimeException {
-      getMaster();
       List<Throwable> exceptions = new ArrayList<Throwable>();
       for(int tries = 0; tries < numRetries; tries++) {
         try {
@@ -934,7 +929,6 @@
     
     public <T> T getRegionServerForWithoutRetries(ServerCallable<T> callable)
         throws IOException, RuntimeException {
-      getMaster();
       try {
         callable.instantiateServer(false);
         return callable.call();
@@ -957,7 +951,6 @@
       boolean reload)
     throws IOException {
       boolean reloadFlag = reload;
-      getMaster();
       List<Throwable> exceptions = new ArrayList<Throwable>();
       HRegionLocation location = null;
       int tries = 0;

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/HMaster.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/HMaster.java
Thu Jun  4 06:52:42 2009
@@ -85,6 +85,7 @@
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.ipc.RemoteException;
+import org.apache.hadoop.net.DNS;
 import org.apache.hadoop.util.StringUtils;
 
 /**
@@ -161,17 +162,12 @@
    * @throws IOException
    */
   public HMaster(HBaseConfiguration conf) throws IOException {
-    // find out our address. If it's set in config, use that, otherwise look it
-    // up in DNS.
-    String addressStr = conf.get(MASTER_ADDRESS);
-    if (addressStr == null) {
-      addressStr = conf.get(MASTER_HOST_NAME);
-      if (addressStr == null) {
-        addressStr = InetAddress.getLocalHost().getCanonicalHostName();
-      }
-      addressStr += ":";
-      addressStr += conf.get("hbase.master.port", Integer.toString(DEFAULT_MASTER_PORT));
-    }
+    // find out our address up in DNS.
+    String addressStr = DNS.getDefaultHost(
+        conf.get("hbase.master.dns.interface","default"),
+        conf.get("hbase.master.dns.nameserver","default"));
+    addressStr += ":" + 
+      conf.get("hbase.master.port", Integer.toString(DEFAULT_MASTER_PORT));
     HServerAddress address = new HServerAddress(addressStr);
     LOG.info("My address is " + address);
 
@@ -247,7 +243,7 @@
     this.sleeper = new Sleeper(this.threadWakeFrequency, this.closed);
     
     zooKeeperWrapper = new ZooKeeperWrapper(conf);
-    zkMasterAddressWatcher = new ZKMasterAddressWatcher(zooKeeperWrapper);
+    zkMasterAddressWatcher = new ZKMasterAddressWatcher(this);
     serverManager = new ServerManager(this);
     regionManager = new RegionManager(this);
 
@@ -261,7 +257,12 @@
   private void writeAddressToZooKeeper() {
     while (true) {
       zkMasterAddressWatcher.waitForMasterAddressAvailability();
-      if (zooKeeperWrapper.writeMasterAddress(address)) {
+      // Check if we need to shutdown instead of taking control
+      if(this.shutdownRequested.get())
+      {
+        return;
+      } else if(zooKeeperWrapper.writeMasterAddress(address)) {
+        zooKeeperWrapper.setClusterState(true);
         return;
       }
     }
@@ -531,7 +532,7 @@
           this.connection.getHRegionConnection(address, false);
         HServerInfo info = hri.getHServerInfo();
         LOG.debug("Inspection found server " + info.getName());
-        serverManager.recordNewServer(info);
+        serverManager.recordNewServer(info, true);
         HRegionInfo[] regions = hri.getRegionsAssignment();
         for (HRegionInfo region : regions) {
           if(region.isRootRegion()) {
@@ -670,6 +671,7 @@
   public void shutdown() {
     LOG.info("Cluster shutdown requested. Starting to quiesce servers");
     this.shutdownRequested.set(true);
+    this.zooKeeperWrapper.setClusterState(false);
   }
 
   public void createTable(HTableDescriptor desc)
@@ -1075,13 +1077,7 @@
 
     // Process command-line args. TODO: Better cmd-line processing
     // (but hopefully something not as painful as cli options).
-
-    final String addressArgKey = "--bind=";
     for (String cmd: args) {
-      if (cmd.startsWith(addressArgKey)) {
-        conf.set(MASTER_ADDRESS, cmd.substring(addressArgKey.length()));
-        continue;
-      }
 
       if (cmd.equals("start")) {
         try {
@@ -1098,6 +1094,10 @@
             Constructor<? extends HMaster> c =
               masterClass.getConstructor(HBaseConfiguration.class);
             HMaster master = c.newInstance(conf);
+            if(master.shutdownRequested.get()) {
+              LOG.info("Won't bring the Master up as a shutdown is requested");
+              return;
+            }
             master.start();
           }
         } catch (Throwable t) {

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ServerManager.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ServerManager.java
Thu Jun  4 06:52:42 2009
@@ -194,12 +194,23 @@
     recordNewServer(info);
   }
   
+  
   /**
-   * Adds the HSI to the RS list
+   * Adds the HSI to the RS list and creates an empty load
    * @param info The region server informations
    */
   public void recordNewServer(HServerInfo info) {
-    HServerLoad load = new HServerLoad();
+    recordNewServer(info, false);
+  }
+  
+  /**
+   * Adds the HSI to the RS list
+   * @param info The region server informations
+   * @param useInfoLoad True if the load from the info should be used
+   *                    like under a master failover
+   */
+  public void recordNewServer(HServerInfo info, boolean useInfoLoad) {
+    HServerLoad load = useInfoLoad ? info.getLoad() : new HServerLoad();
     String serverName = HServerInfo.getServerName(info);
     info.setLoad(load);
     // We must set this watcher here because it can be set on a fresh start

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ZKMasterAddressWatcher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ZKMasterAddressWatcher.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ZKMasterAddressWatcher.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/master/ZKMasterAddressWatcher.java
Thu Jun  4 06:52:42 2009
@@ -38,13 +38,15 @@
   private static final Log LOG = LogFactory.getLog(ZKMasterAddressWatcher.class);
 
   private final ZooKeeperWrapper zooKeeper;
+  private final HMaster master;
 
   /**
    * Create a watcher with a ZooKeeperWrapper instance.
    * @param zooKeeper ZooKeeperWrapper to use to talk to ZooKeeper.
    */
-  public ZKMasterAddressWatcher(ZooKeeperWrapper zooKeeper) {
-    this.zooKeeper = zooKeeper;
+  public ZKMasterAddressWatcher(HMaster master) {
+    this.master = master;
+    this.zooKeeper = master.getZooKeeperWrapper();
   }
 
   /**
@@ -53,9 +55,22 @@
   @Override
   public synchronized void process(WatchedEvent event) {
     EventType type = event.getType();
+    LOG.debug(("Got event " + type + " with path " + event.getPath()));
     if (type.equals(EventType.NodeDeleted)) {
-      LOG.debug("Master address ZNode deleted, notifying waiting masters");
-      notifyAll();
+      if(event.getPath().equals(this.zooKeeper.clusterStateZNode)) {
+        LOG.info("The cluster was shutdown while waiting, shutting down" +
+            " this master.");
+        master.shutdownRequested.set(true);
+      }
+      else {
+        LOG.debug("Master address ZNode deleted, notifying waiting masters");
+        notifyAll();
+      }
+    }
+    else if(type.equals(EventType.NodeCreated) && 
+        event.getPath().equals(this.zooKeeper.clusterStateZNode)) {
+      LOG.debug("Resetting the watch on the cluster state node.");
+      this.zooKeeper.setClusterStateWatch(this);
     }
   }
 
@@ -66,7 +81,9 @@
   public synchronized void waitForMasterAddressAvailability() {
     while (zooKeeper.readMasterAddress(this) != null) {
       try {
-        LOG.debug("Waiting for master address ZNode to be deleted");
+        LOG.debug("Waiting for master address ZNode to be deleted " +
+            "and watching the cluster state node");
+        this.zooKeeper.setClusterStateWatch(this);
         wait();
       } catch (InterruptedException e) {
       }

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
Thu Jun  4 06:52:42 2009
@@ -52,19 +52,25 @@
    * While parsing the zoo.cfg, we substitute variables with values from
    * hbase-site.xml.
    * @param args String[] of command line arguments. Not used.
+   * @throws IOException 
    */
-  public static void main(String[] args) {
+  public static void main(String[] args) throws IOException {
+    QuorumPeerConfig config = new QuorumPeerConfig();
     try {
       Properties properties = parseZooKeeperConfig();
-      QuorumPeerConfig.parseProperties(properties);
+      config.parseProperties(properties);
     } catch (Exception e) {
       e.printStackTrace();
       System.exit(-1);
     }
-    if (ServerConfig.isStandalone()) {
-      ZooKeeperServerMain.main(args);
+    if (config.isDistributed()) {
+      QuorumPeerMain qp = new QuorumPeerMain();
+      qp.runFromConfig(config);
     } else {
-      QuorumPeerMain.runPeerFromConfig();
+      ZooKeeperServerMain zk = new ZooKeeperServerMain();
+      ServerConfig serverConfig = new ServerConfig();
+      serverConfig.readFrom(config);
+      zk.runFromConfig(serverConfig);
     }
   }
 
@@ -101,6 +107,7 @@
     }
     for (Entry<Object, Object> entry : properties.entrySet()) {
       String value = entry.getValue().toString().trim();
+      String key = entry.getKey().toString().trim();
       StringBuilder newValue = new StringBuilder();
       int varStart = value.indexOf(VARIABLE_START);
       int varEnd = 0;
@@ -123,19 +130,24 @@
           LOG.fatal(msg);
           throw new IOException(msg);
         }
-        // Special case for 'hbase.master.hostname' property being 'local'
-        if (variable.equals(HConstants.MASTER_HOST_NAME) && substituteValue.equals("local"))
{
-          substituteValue = "localhost";
-        }
+        
         newValue.append(substituteValue);
 
         varEnd += VARIABLE_END_LENGTH;
         varStart = value.indexOf(VARIABLE_START, varEnd);
       }
-
+      // Special case for 'hbase.cluster.distributed' property being 'true'
+      if (key.startsWith("server.")) {
+        if(conf.get(CLUSTER_DISTRIBUTED).equals(CLUSTER_IS_DISTRIBUTED) && 
+            value.startsWith("localhost")) {
+           String msg = "The server in zoo.cfg cannot be set to localhost " +
+              "in a fully-distributed setup because it won't be reachable. " +
+              "See \"Getting Started\" for more information.";
+           LOG.fatal(msg);
+           throw new IOException(msg);
+        }
+      }
       newValue.append(value.substring(varEnd));
-
-      String key = entry.getKey().toString().trim();
       properties.setProperty(key, newValue.toString());
     }
     return properties;

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
Thu Jun  4 06:52:42 2009
@@ -64,10 +64,11 @@
   private final ZooKeeper zooKeeper;
   private final WatcherWrapper watcher;
 
-  private final String rootRegionZNode;
-  private final String outOfSafeModeZNode;
-  private final String rsZNode;
-  private final String masterElectionZNode;
+  public final String rootRegionZNode;
+  public final String outOfSafeModeZNode;
+  public final String rsZNode;
+  public final String masterElectionZNode;
+  public final String clusterStateZNode;
 
   /**
    * Create a ZooKeeperWrapper.
@@ -109,11 +110,14 @@
     String rsZNodeName = conf.get("zookeeper.znode.rs", "rs");
     String masterAddressZNodeName = conf.get("zookeeper.znode.master",
       "master");
+    String stateZNodeName = conf.get("zookeeper.znode.state",
+    "shutdown");
     
     rootRegionZNode = getZNode(parentZNode, rootServerZNodeName);
     outOfSafeModeZNode = getZNode(parentZNode, outOfSafeModeZNodeName);
     rsZNode = getZNode(parentZNode, rsZNodeName);
     masterElectionZNode = getZNode(parentZNode, masterAddressZNodeName);
+    clusterStateZNode = getZNode(parentZNode, stateZNodeName);
   }
 
   /**
@@ -152,8 +156,8 @@
     try {
       properties = HQuorumPeer.parseZooKeeperConfig();
     } catch (IOException e) {
-      LOG.error("fail to read properties from " + ZOOKEEPER_CONFIG_NAME);
-      return;
+      LOG.fatal("Fail to read properties from " + ZOOKEEPER_CONFIG_NAME, e);
+      System.exit(-1);
     }
 
     String clientPort = null;
@@ -243,6 +247,49 @@
   public HServerAddress readMasterAddress(Watcher watcher) {
     return readAddress(masterElectionZNode, watcher);
   }
+  
+  /**
+   * Watch the state of the cluster, up or down
+   * @param watcher Watcher to set on cluster state node
+   */
+  public void setClusterStateWatch(Watcher watcher) {
+    try {
+      zooKeeper.exists(clusterStateZNode, watcher);
+    } catch (InterruptedException e) {
+      LOG.warn("Failed to check on ZNode " + clusterStateZNode, e);
+    } catch (KeeperException e) {
+      LOG.warn("Failed to check on ZNode " + clusterStateZNode, e);
+    }
+  }
+  
+  /**
+   * Set the cluster state, up or down
+   * @param up True to write the node, false to delete it
+   * @return true if it worked, else it's false
+   */
+  public boolean setClusterState(boolean up) {
+    if (!ensureParentExists(clusterStateZNode)) {
+      return false;
+    }
+    try {
+      if(up) {
+        byte[] data = Bytes.toBytes("up");
+        zooKeeper.create(clusterStateZNode, data, 
+            Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+        LOG.debug("State node wrote in ZooKeeper");
+      } else {
+        zooKeeper.delete(clusterStateZNode, -1);
+        LOG.debug("State node deleted in ZooKeeper");
+      }
+      return true;
+    } catch (InterruptedException e) {
+      LOG.warn("Failed to set state node in ZooKeeper", e);
+    } catch (KeeperException e) {
+      LOG.warn("Failed to set state node in ZooKeeper", e);
+    }
+
+    return false;
+  }
 
   /**
    * Set a watcher on the master address ZNode. The watcher will be set unless
@@ -529,12 +576,12 @@
       List<String> nodes = zooKeeper.getChildren(rsZNode, false);
       for (String node : nodes) {
         LOG.debug("Deleting node: " + node);
-        zooKeeper.delete(node, -1);
+        zooKeeper.delete(joinPath(this.rsZNode, node), -1);
       }
     } catch (KeeperException e) {
-      LOG.warn("Failed to delete " + rsZNode + " znode in ZooKeeper: " + e);
+      LOG.warn("Failed to delete " + rsZNode + " znodes in ZooKeeper: " + e);
     } catch (InterruptedException e) {
-      LOG.warn("Failed to delete " + rsZNode + " znode in ZooKeeper: " + e);
+      LOG.warn("Failed to delete " + rsZNode + " znodes in ZooKeeper: " + e);
     }
   }
   

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/overview.html
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/overview.html?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/overview.html (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/java/overview.html Thu Jun  4 06:52:42 2009
@@ -79,15 +79,9 @@
 </p>
 
 <h2><a name="distributed">Distributed Operation</a></h2>
-<p>Distributed mode requires an instance of the Hadoop Distributed File System (DFS)
and a ZooKeeper cluster.
+<p>Distributed mode requires an instance of the Hadoop Distributed File System (DFS).
 See the Hadoop <a href="http://lucene.apache.org/hadoop/api/overview-summary.html#overview_description">
 requirements and instructions</a> for how to set up a DFS.
-See the ZooKeeeper <a href="http://hadoop.apache.org/zookeeper/docs/current/zookeeperStarted.html">Getting
Started Guide</a>
-for information about the ZooKeeper distributed coordination service.
-If you do not configure a ZooKeeper cluster, HBase will manage a single instance
-ZooKeeper service for you running on the master node.
-This is intended for development and local testing only.
-It SHOULD NOT be used in a fully-distributed production operation.
 </p>
 
 <h3><a name="pseudo-distrib">Pseudo-Distributed Operation</a></h3>
@@ -122,21 +116,19 @@
 For running a fully-distributed operation on more than one host, the following
 configurations must be made <i>in addition</i> to those described in the
 <a href="#pseudo-distrib">pseudo-distributed operation</a> section above.
+A Zookeeper cluster is also required to ensure higher availability.
 In <code>hbase-site.xml</code>, you must also configure
-<code>hbase.master.hostname</code> to the host on which the HBase master runs
-(<a href="http://wiki.apache.org/lucene-hadoop/Hbase/HbaseArchitecture">read 
-about the HBase master, regionservers, etc</a>).
-For example, adding the below to your <code>hbase-site.xml</code> says the
-master is up on the host example.org:
+<code>hbase.cluster.distributed</code> to 'true'. 
 </p>
 <pre>
 &lt;configuration&gt;
   ...
   &lt;property&gt;
-    &lt;name&gt;hbase.master.hostname&lt;/name&gt;
-    &lt;value&gt;example.org&lt;/value&gt;
-    &lt;description&gt;The host that the HBase master runs at.
-      A value of 'local' runs the master and regionserver in a single process.
+    &lt;name&gt;hbase.cluster.distributed&lt;/name&gt;
+    &lt;value&gt;true&lt;/value&gt;
+    &lt;description&gt;The mode the cluster will be in. Possible values are
+      false: standalone and pseudo-distributed setups with managed Zookeeper
+      true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
     &lt;/description&gt;
   &lt;/property&gt;
   ...
@@ -151,14 +143,35 @@
 in HBase is like the hadoop slaves file at <code>${HADOOP_HOME}/conf/slaves</code>).
 </p>
 <p>
-Furthermore, you should configure a distributed ZooKeeper cluster.
+Furthermore, you have to configure a distributed ZooKeeper cluster.
 The ZooKeeper configuration file is stored at <code>${HBASE_HOME}/conf/zoo.cfg</code>.
 See the ZooKeeper <a href="http://hadoop.apache.org/zookeeper/docs/current/zookeeperStarted.html">
Getting Started Guide</a> for information about the format and options of that file.
 Specifically, look at the <a href="http://hadoop.apache.org/zookeeper/docs/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper">Running
Replicated ZooKeeper</a> section.
-In <code>${HBASE_HOME}/conf/hbase-env.sh</code>, set <code>HBASE_MANAGES_ZK=false</code>
to tell HBase not to manage its own single instance ZooKeeper service.
+In <code>${HBASE_HOME}/conf/hbase-env.sh</code>, set the following to tell HBase
not to manage its own single instance of ZooKeeper.
+<pre>
+  ...
+# Tell HBase whether it should manage it's own instance of Zookeeper or not.
+export HBASE_MANAGES_ZK=false
+</pre>
 </p>
+<p>
+It's still possible to use HBase in order to start a single Zookeeper instance in fully-distributed
operation.
+The first thing to do is still to change <code>${HBASE_HOME}/conf/zoo.cfg</code>
and set a single node.
+Note that leaving the value "localhost" will make it impossible to start HBase.
+<pre>
+  ...
+server.0=example.org:2888:3888
+</pre>
+Then on the example.org server do the following <i>before</i> running HBase.

+<pre>
+${HBASE_HOME}/bin/hbase-daemon.sh start zookeeper
+</pre>
+Be aware that this option is only recommanded for testing purposes as a failure
+on that node would render HBase <b>unusable</b>.
+</p>
+
 
-<p>Of note, if you have made <i>HDFS client configuration</i> on your hadoop
cluster, hbase will not
+<p>Of note, if you have made <i>HDFS client configuration</i> on your hadoop
cluster, HBase will not
 see this configuration unless you do one of the following:
 <ul>
     <li>Add a pointer to your <code>HADOOP_CONF_DIR</code> to <code>CLASSPATH</code>
in <code>hbase-env.sh</code></li>
@@ -167,7 +180,7 @@
 </ul>
 An example of such an HDFS client configuration is <code>dfs.replication</code>.
 If for example,
 you want to run with a replication factor of 5, hbase will create files with the default
of 3 unless 
-you do the above to make the configuration available to hbase.
+you do the above to make the configuration available to HBase.
 </p>
 
 <h2><a name="runandconfirm">Running and Confirming Your Installation</a></h2>

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
Thu Jun  4 06:52:42 2009
@@ -767,12 +767,6 @@
           errCode = 0;
           break;
         }
-        
-        final String masterArgKey = "--master=";
-        if (cmd.startsWith(masterArgKey)) {
-          this.conf.set(MASTER_ADDRESS, cmd.substring(masterArgKey.length()));
-          continue;
-        }
        
         final String miniClusterArgKey = "--miniCluster";
         if (cmd.startsWith(miniClusterArgKey)) {

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/zookeeper/HQuorumPeerTest.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/zookeeper/HQuorumPeerTest.java?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/zookeeper/HQuorumPeerTest.java
(original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/test/org/apache/hadoop/hbase/zookeeper/HQuorumPeerTest.java
Thu Jun  4 06:52:42 2009
@@ -24,8 +24,8 @@
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.zookeeper.server.ServerConfig;
 import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 
@@ -33,8 +33,36 @@
  * Test for HQuorumPeer.
  */
 public class HQuorumPeerTest extends HBaseTestCase {
+  private Path dataDir;
+
+  @Override
+  protected void setUp() throws Exception {
+    super.setUp();
+    String userName = System.getProperty("user.name");
+    dataDir = new Path("/tmp/hbase-" + userName, "zookeeper");
+    if (fs.exists(dataDir)) {
+      if (!fs.isDirectory(dataDir)) {
+        fail();
+      }
+    } else {
+      if (!fs.mkdirs(dataDir)) {
+        fail();
+      }
+    }
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    if (fs.exists(dataDir) && !fs.delete(dataDir, true)) {
+      fail();
+    }
+    super.tearDown();
+  }
+
   /** @throws Exception */
   public void testConfigInjection() throws Exception {
+
+
     String s =
       "tickTime=2000\n" +
       "initLimit=10\n" +
@@ -46,27 +74,25 @@
     InputStream is = new ByteArrayInputStream(s.getBytes());
     Properties properties = HQuorumPeer.parseConfig(is);
 
-    String userName = System.getProperty("user.name");
-    String dataDir = "/tmp/hbase-" + userName + "/zookeeper";
-
     assertEquals(Integer.valueOf(2000), Integer.valueOf(properties.getProperty("tickTime")));
     assertEquals(Integer.valueOf(10), Integer.valueOf(properties.getProperty("initLimit")));
     assertEquals(Integer.valueOf(5), Integer.valueOf(properties.getProperty("syncLimit")));
-    assertEquals(dataDir, properties.get("dataDir"));
+    assertEquals(dataDir.toString(), properties.get("dataDir"));
     assertEquals(Integer.valueOf(2181), Integer.valueOf(properties.getProperty("clientPort")));
     assertEquals("localhost:2888:3888", properties.get("server.0"));
 
-    QuorumPeerConfig.parseProperties(properties);
+    QuorumPeerConfig config = new QuorumPeerConfig();
+    config.parseProperties(properties);
 
-    int tickTime = QuorumPeerConfig.getTickTime();
+    int tickTime = config.getTickTime();
     assertEquals(2000, tickTime);
-    int initLimit = QuorumPeerConfig.getInitLimit();
+    int initLimit = config.getInitLimit();
     assertEquals(10, initLimit);
-    int syncLimit = QuorumPeerConfig.getSyncLimit();
+    int syncLimit = config.getSyncLimit();
     assertEquals(5, syncLimit);
-    assertEquals(dataDir, ServerConfig.getDataDir());
-    assertEquals(2181, ServerConfig.getClientPort());
-    Map<Long,QuorumServer> servers = QuorumPeerConfig.getServers();
+    assertEquals(dataDir.toString(), config.getDataDir());
+    assertEquals(2181, config.getClientPort());
+    Map<Long,QuorumServer> servers = config.getServers();
     assertEquals(1, servers.size());
     assertTrue(servers.containsKey(Long.valueOf(0)));
     QuorumServer server = servers.get(Long.valueOf(0));
@@ -78,9 +104,9 @@
     properties = HQuorumPeer.parseConfig(is);
     assertEquals("foo.bar:2888:3888", properties.get("server.0"));
 
-    QuorumPeerConfig.parseProperties(properties);
+    config.parseProperties(properties);
 
-    servers = QuorumPeerConfig.getServers();
+    servers = config.getServers();
     server = servers.get(Long.valueOf(0));
     assertEquals("foo.bar", server.addr.getHostName());
 
@@ -90,9 +116,9 @@
     properties = HQuorumPeer.parseConfig(is);
     assertEquals("localhost:2888:3888", properties.get("server.0"));
 
-    QuorumPeerConfig.parseProperties(properties);
+    config.parseProperties(properties);
 
-    servers = QuorumPeerConfig.getServers();
+    servers = config.getServers();
     server = servers.get(Long.valueOf(0));
     assertEquals("localhost", server.addr.getHostName());
   }

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/master/master.jsp?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/master/master.jsp Thu Jun  4 06:52:42
2009
@@ -62,6 +62,7 @@
 <tr><td>HBase Root Directory</td><td><%= master.getRootDir().toString()
%></td><td>Location of HBase home directory</td></tr>
 <tr><td>Load average</td><td><%= master.getAverageLoad() %></td><td>Average
number of regions per regionserver. Naive computation.</td></tr>
 <tr><td>Regions On FS</td><td><%= master.countRegionsOnFS() %></td><td>Number
of regions on FileSystem. Rough count.</td></tr>
+<tr><td>Zookeeper Quorum</td><td><%= master.getZooKeeperWrapper().getQuorumServers()
%></td><td>Addresses of all registered ZK servers.</td></tr>
 </table>
 
 <h2>Catalog Tables</h2>

Modified: hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/regionserver/regionserver.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/regionserver/regionserver.jsp?rev=781662&r1=781661&r2=781662&view=diff
==============================================================================
--- hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/regionserver/regionserver.jsp (original)
+++ hadoop/hbase/trunk_on_hadoop-0.18.3/src/webapps/regionserver/regionserver.jsp Thu Jun
 4 06:52:42 2009
@@ -37,6 +37,7 @@
 <tr><td>HBase Version</td><td><%= org.apache.hadoop.hbase.util.VersionInfo.getVersion()
%>, r<%= org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase
version and svn revision</td></tr>
 <tr><td>HBase Compiled</td><td><%= org.apache.hadoop.hbase.util.VersionInfo.getDate()
%>, <%= org.apache.hadoop.hbase.util.VersionInfo.getUser() %></td><td>When
HBase version was compiled and by whom</td></tr>
 <tr><td>Metrics</td><td><%= metrics.toString() %></td><td>RegionServer
Metrics; file and heap sizes are in megabytes</td></tr>
+<tr><td>Zookeeper Quorum</td><td><%= regionServer.getZooKeeperWrapper().getQuorumServers()
%></td><td>Addresses of all registered ZK servers</td></tr>
 </table>
 
 <h2>Online Regions</h2>



Mime
View raw message