<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/test/org/apache/hadoop/hbase/EvaluationClient.java</filename>
    </added>
    <added>
      <filename>src/test/org/apache/hadoop/hbase/TestHClient.java</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,3 +10,5 @@ Trunk (unreleased changes)
      java.util.concurrent.locks.ReentrantLock (Michael Stack)
   5. HADOOP-1403. HBase reliability - make master and region server more fault
      tolerant.
+  6. HADOOP-1418. HBase miscellaneous: unit test for HClient, client to do
+     'Performance Evaluation', etc.</diff>
      <filename>CHANGES.txt</filename>
    </modified>
    <modified>
      <diff>@@ -32,9 +32,9 @@ import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.ipc.RPC;
 
-/*******************************************************************************
+/**
  * HClient manages a connection to a single HRegionServer.
- ******************************************************************************/
+ */
 public class HClient implements HConstants {
   private final Log LOG = LogFactory.getLog(this.getClass().getName());
   
@@ -44,7 +44,6 @@ public class HClient implements HConstants {
   
   private static final Text EMPTY_START_ROW = new Text();
   
-  private boolean closed;
   private long clientTimeout;
   private int numTimeouts;
   private int numRetries;
@@ -82,7 +81,6 @@ public class HClient implements HConstants {
 
   /** Creates a new HClient */
   public HClient(Configuration conf) {
-    this.closed = false;
     this.conf = conf;
 
     this.clientTimeout = conf.getLong(&quot;hbase.client.timeout.length&quot;, 30 * 1000);
@@ -102,15 +100,6 @@ public class HClient implements HConstants {
   }
   
   /**
-   * Check client is open.
-   */
-  private void checkOpen() {
-    if (this.closed) {
-      throw new IllegalStateException(&quot;client is not open&quot;);
-    }
-  }
-  
-  /**
    * Find the address of the master and connect to it
    */
   private void checkMaster() {
@@ -119,7 +108,8 @@ public class HClient implements HConstants {
     }
     for(int tries = 0; this.master == null &amp;&amp; tries &lt; numRetries; tries++) {
       HServerAddress masterLocation =
-        new HServerAddress(this.conf.get(MASTER_ADDRESS));
+        new HServerAddress(this.conf.get(MASTER_ADDRESS,
+          DEFAULT_MASTER_ADDRESS));
       
       try {
         HMasterInterface tryMaster =
@@ -159,21 +149,18 @@ public class HClient implements HConstants {
       throw new IllegalArgumentException(desc.getName().toString()
           + &quot; is a reserved table name&quot;);
     }
-    checkOpen();
     checkMaster();
     locateRootRegion();
     this.master.createTable(desc);
   }
 
   public synchronized void deleteTable(Text tableName) throws IOException {
-    checkOpen();
     checkMaster();
     locateRootRegion();
     this.master.deleteTable(tableName);
   }
   
   public synchronized void shutdown() throws IOException {
-    checkOpen();
     checkMaster();
     this.master.shutdown();
   }
@@ -182,7 +169,6 @@ public class HClient implements HConstants {
     if(tableName == null || tableName.getLength() == 0) {
       throw new IllegalArgumentException(&quot;table name cannot be null or zero length&quot;);
     }
-    checkOpen();
     this.tableServers = tablesToServers.get(tableName);
     if(this.tableServers == null ) {            // We don't know where the table is
       findTableInMeta(tableName);               // Load the information from meta
@@ -322,7 +308,6 @@ public class HClient implements HConstants {
     }
     
     if (rootRegionLocation == null) {
-      this.closed = true;
       throw new IOException(&quot;unable to locate root region server&quot;);
     }
   }
@@ -455,14 +440,6 @@ public class HClient implements HConstants {
     return server;
   }
 
-  /** Close the connection */
-  public synchronized void close() throws IOException {
-    if(! this.closed) {
-      RPC.stopClient();
-      this.closed = true;
-    }
-  }
-
   /**
    * List all the userspace tables.  In other words, scan the META table.
    *
@@ -927,7 +904,7 @@ public class HClient implements HConstants {
         &quot; createTable webcrawl contents: anchors: 10&quot;);
   }
   
-  int doCommandLine(final String args[]) {
+  public int doCommandLine(final String args[]) {
     // Process command-line args. TODO: Better cmd-line processing
     // (but hopefully something not as painful as cli options).    
     int errCode = -1;</diff>
      <filename>src/java/org/apache/hadoop/hbase/HClient.java</filename>
    </modified>
    <modified>
      <diff>@@ -24,11 +24,11 @@ public abstract class HBaseClusterTestCase extends HBaseTestCase {
   final boolean miniHdfs;
   
   protected HBaseClusterTestCase() {
-    this(false);
+    this(true);
   }
 
   protected HBaseClusterTestCase(String name) {
-    this(name, false);
+    this(name, true);
   }
   
   protected HBaseClusterTestCase(final boolean miniHdfs) {</diff>
      <filename>src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java</filename>
    </modified>
    <modified>
      <diff>@@ -58,9 +58,6 @@ public class TestHBaseCluster extends HBaseClusterTestCase {
 
   public void tearDown() throws Exception {
     super.tearDown();
-    if(client != null) {
-      client.close();
-    }
   }
 
   private static final int FIRST_ROW = 1;</diff>
      <filename>src/test/org/apache/hadoop/hbase/TestHBaseCluster.java</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>src/java/org/apache/hadoop/hbase/HLocking.java</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>eef70687dda6bf67967430b9cf75fc0e91cfdae5</id>
    </parent>
  </parents>
  <author>
    <name>Jim Kellerman</name>
    <email>jimk@apache.org</email>
  </author>
  <url>http://github.com/andrewmccall/hbase/commit/d905549f0fcfc50fdb40fcaf123da5ede8762032</url>
  <id>d905549f0fcfc50fdb40fcaf123da5ede8762032</id>
  <committed-date>2007-05-22T13:24:22-07:00</committed-date>
  <authored-date>2007-05-22T13:24:22-07:00</authored-date>
  <message>HADOOP-1418. HBase miscellaneous: unit test for HClient, client to do 'Performance Evaluation', etc.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540737 13f79535-47bb-0310-9956-ffa450edef68</message>
  <tree>91a1c807d530fb3b5055e9fb1e7fb79a3650b447</tree>
  <committer>
    <name>Jim Kellerman</name>
    <email>jimk@apache.org</email>
  </committer>
</commit>
