HBASE-1812 Document fact that Scanners do not respect row locks
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@811568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a45323857
commit
d5e3f6c894
|
@ -56,7 +56,10 @@ import org.apache.hadoop.hbase.util.Writables;
|
||||||
/**
|
/**
|
||||||
* Used to communicate with a single HBase table.
|
* Used to communicate with a single HBase table.
|
||||||
* <p>
|
* <p>
|
||||||
* This class is not MT safe for writes.
|
* This class is not thread safe for writes.
|
||||||
|
* Gets, puts, and deletes take out a row lock for the duration
|
||||||
|
* of their operation. Scans (currently) do not respect
|
||||||
|
* row locking.
|
||||||
*/
|
*/
|
||||||
public class HTable implements HTableInterface {
|
public class HTable implements HTableInterface {
|
||||||
private final HConnection connection;
|
private final HConnection connection;
|
||||||
|
|
|
@ -30,14 +30,13 @@ Provides HBase Client
|
||||||
<p>To administer HBase, create and drop tables, list and alter tables,
|
<p>To administer HBase, create and drop tables, list and alter tables,
|
||||||
use {@link org.apache.hadoop.hbase.client.HBaseAdmin}. Once created, table access is via an instance
|
use {@link org.apache.hadoop.hbase.client.HBaseAdmin}. Once created, table access is via an instance
|
||||||
of {@link org.apache.hadoop.hbase.client.HTable}. You add content to a table a row at a time. To insert,
|
of {@link org.apache.hadoop.hbase.client.HTable}. You add content to a table a row at a time. To insert,
|
||||||
create an instance of a {@link org.apache.hadoop.hbase.client.Put} object and after setting it appropriately,
|
create an instance of a {@link org.apache.hadoop.hbase.client.Put} object. Specify value, target column
|
||||||
commit your update using {@link org.apache.hadoop.hbase.client.HTable#put(Put)}.
|
and optionally a timestamp. Commit your update using {@link org.apache.hadoop.hbase.client.HTable#put(Put)}.
|
||||||
To fetch your inserted
|
To fetch your inserted value, use {@link org.apache.hadoop.hbase.client.Get}. The Get can be specified to be broad -- get all
|
||||||
value, use {@link org.apache.hadoop.hbase.client.Get}. The Get can be specified to be broad -- get all
|
on a particular row -- or narrow; i.e. return only a single cell value. After creating an instance of
|
||||||
on a particular row -- or narrow; return only a single cell value.
|
Get, invoke {@link org.apache.hadoop.hbase.client.HTable#get(Get)}. Use
|
||||||
When finished with your Get settings, invoke {@link org.apache.hadoop.hbase.client.HTable#get(Get)}. Use
|
|
||||||
{@link org.apache.hadoop.hbase.client.Scan} to set up a scanner -- a Cursor- like access. After
|
{@link org.apache.hadoop.hbase.client.Scan} to set up a scanner -- a Cursor- like access. After
|
||||||
configuring your Scan instance, call {@link org.apache.hadoop.hbase.client.HTable#getScanner(Scan)} and then
|
creating and configuring your Scan instance, call {@link org.apache.hadoop.hbase.client.HTable#getScanner(Scan)} and then
|
||||||
invoke next on the returned object. Both {@link org.apache.hadoop.hbase.client.HTable#get(Get)} and
|
invoke next on the returned object. Both {@link org.apache.hadoop.hbase.client.HTable#get(Get)} and
|
||||||
{@link org.apache.hadoop.hbase.client.HTable#getScanner(Scan)} return a
|
{@link org.apache.hadoop.hbase.client.HTable#getScanner(Scan)} return a
|
||||||
{@link org.apache.hadoop.hbase.client.Result}.
|
{@link org.apache.hadoop.hbase.client.Result}.
|
||||||
|
@ -47,6 +46,9 @@ in different formats.
|
||||||
You can remove individual cells or entire families, etc. Pass it to
|
You can remove individual cells or entire families, etc. Pass it to
|
||||||
{@link org.apache.hadoop.hbase.client.HTable#delete(Delete)} to execute.
|
{@link org.apache.hadoop.hbase.client.HTable#delete(Delete)} to execute.
|
||||||
</p>
|
</p>
|
||||||
|
<p>Puts, Gets and Deletes take out a lock on the target row for the duration of their operation.
|
||||||
|
Scans (currently) operate without respect for row locks.
|
||||||
|
</p>
|
||||||
<p>Client code accessing a cluster finds the cluster by querying ZooKeeper.
|
<p>Client code accessing a cluster finds the cluster by querying ZooKeeper.
|
||||||
This means that the ZooKeeper quorum to use must be on the client CLASSPATH.
|
This means that the ZooKeeper quorum to use must be on the client CLASSPATH.
|
||||||
Usually this means make sure the client can find your <code>hbase-site.xml</code>.
|
Usually this means make sure the client can find your <code>hbase-site.xml</code>.
|
||||||
|
|
Loading…
Reference in New Issue