Author: stack
Date: Tue Aug 16 16:26:13 2011
New Revision: 1158353
URL: http://svn.apache.org/viewvc?rev=1158353&view=rev
Log:
HBASE-4205 Enhance HTable javadoc
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
Modified: hbase/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1158353&r1=1158352&r2=1158353&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Aug 16 16:26:13 2011
@@ -440,6 +440,9 @@ Release 0.90.5 - Unreleased
HBASE-4159 HBaseServer - IPC Reader threads are not daemons (Douglas
Campbell)
+ IMPROVEMENT
+ HBASE-4205 Enhance HTable javadoc (Eric Charles)
+
Release 0.90.4 - August 10, 2011
BUG FIXES
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1158353&r1=1158352&r2=1158353&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java Tue
Aug 16 16:26:13 2011
@@ -65,10 +65,18 @@ import org.apache.hadoop.hbase.util.Pair
import org.apache.hadoop.hbase.util.Writables;
/**
- * Used to communicate with a single HBase table.
+ * <p>Used to communicate with a single HBase table.
*
- * This class is not thread safe for updates; the underlying write buffer can
+ * <p>This class is not thread safe for reads nor write.
+ *
+ * <p>In case of writes (Put, Delete), the underlying write buffer can
* be corrupted if multiple threads contend over a single HTable instance.
+ *
+ * <p>In case of reads, some fields used by a Scan are shared among all
threads.
+ * The HTable implementation can either not contract to be safe in case of a
Get
+ *
+ * <p>To access a table in a multi threaded environment, please consider
+ * using the {@link HTablePool} class to create your HTable instances.
*
* <p>Instances of HTable passed the same {@link Configuration} instance will
* share connections to servers out on the cluster and to the zookeeper
ensemble
@@ -90,7 +98,8 @@ import org.apache.hadoop.hbase.util.Writ
*
* <p>Note that this class implements the {@link Closeable} interface. When a
* HTable instance is no longer required, it *should* be closed in order to
ensure
- * that the underlying resources are promptly released.
+ * that the underlying resources are promptly released. Please note that the
close
+ * method can throw java.io.IOException that must be handled.
*
* @see HBaseAdmin for create, drop, list, enable and disable of tables.
* @see HConnection