Index: src/docbkx/book.xml
===================================================================
--- src/docbkx/book.xml (revision 1089100)
+++ src/docbkx/book.xml (working copy)
@@ -701,8 +701,33 @@
Administrative functions are handled through HBaseAdmin
- For connection configuration information, see the configuration section.
-
+ Connections
+ For connection configuration information, see the configuration section.
+
+ HTable instances are not currently thread-safe. However, HTable instance creation is lightweight because internal connections to region servers are managed inside the HBase client. When creating HTable instances, it is advisable to use the same HBaseConfiguration instance otherwise socket connections to the region servers will not be re-used. For example, this is preferred...
+
+ // do this...
+ HBaseConfiguration conf = HBaseConfiguration.create();
+ HTable table1 = new HTable(conf, "myTable");
+ HTable table2 = new HTable(conf, "myTable");
+
+ ... as opposed to this...
+
+ // don't do this...
+ HBaseConfiguration conf1 = HBaseConfiguration.create();
+ HTable table1 = new HTable(conf1, "myTable");
+ HBaseConfiguration conf2 = HBaseConfiguration.create();
+ HTable table2 = new HTable(conf2, "myTable");
+
+ For more information about how connections are handled in the HBase client, see HConnectionManager.
+
+
+ WriteBuffer and Batch Methods
+ If autoflush is turned off on HTable, Puts are sent to region servers when the writebuffer is filled. The writebuffer is 2meg by default. Before an HTable instance is discarded, either .close() or .flushCommits() should be invoked so Puts will not be lost.
+
+ For fine-grained control of batching of Puts or Deletes, see the batch methods on HTable.
+
+