Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EDC2E200CEF for ; Mon, 4 Sep 2017 10:18:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EC7161640B9; Mon, 4 Sep 2017 08:18:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3F2A71640A5 for ; Mon, 4 Sep 2017 10:18:26 +0200 (CEST) Received: (qmail 32956 invoked by uid 500); 4 Sep 2017 08:18:25 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 32947 invoked by uid 99); 4 Sep 2017 08:18:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2017 08:18:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0D947F32A6; Mon, 4 Sep 2017 08:18:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chia7712@apache.org To: commits@hbase.apache.org Message-Id: <8b1aec732f2240c1bba5776574928259@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-15497 Incorrect javadoc for atomicity guarantee of Increment and Append Date: Mon, 4 Sep 2017 08:18:25 +0000 (UTC) archived-at: Mon, 04 Sep 2017 08:18:27 -0000 Repository: hbase Updated Branches: refs/heads/master a5131a049 -> 6e3ffd03e HBASE-15497 Incorrect javadoc for atomicity guarantee of Increment and Append Signed-off-by: Chia-Ping Tsai Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6e3ffd03 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6e3ffd03 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6e3ffd03 Branch: refs/heads/master Commit: 6e3ffd03e7a27274315b859a3b624736ef0ed20b Parents: a5131a0 Author: cuijianwei Authored: Sun Apr 10 14:31:31 2016 +0800 Committer: Chia-Ping Tsai Committed: Mon Sep 4 16:13:36 2017 +0800 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/client/Append.java | 7 +++---- .../org/apache/hadoop/hbase/client/Increment.java | 7 +++---- .../java/org/apache/hadoop/hbase/client/Table.java | 14 ++++++-------- 3 files changed, 12 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3ffd03/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java index 6947313..56b5c42 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java @@ -34,10 +34,9 @@ import org.apache.hadoop.hbase.util.Bytes; /** * Performs Append operations on a single row. *

- * Note that this operation does not appear atomic to readers. Appends are done - * under a single row lock, so write operations to a row are synchronized, but - * readers do not take row locks so get and scan operations can see this - * operation partially completed. + * This operation ensures atomicty to readers. Appends are done + * under a single row lock, so write operations to a row are synchronized, and + * readers are guaranteed to see this operation fully completed. *

* To append to a set of columns of a row, instantiate an Append object with the * row to append to. At least one column to append must be specified using the http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3ffd03/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java index c144c87..a5765c3 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java @@ -38,10 +38,9 @@ import org.apache.hadoop.hbase.util.ClassSize; /** * Used to perform Increment operations on a single row. *

- * This operation does not appear atomic to readers. Increments are done - * under a single row lock, so write operations to a row are synchronized, but - * readers do not take row locks so get and scan operations can see this - * operation partially completed. + * This operation ensures atomicity to readers. Increments are done + * under a single row lock, so write operations to a row are synchronized, and + * readers are guaranteed to see this operation fully completed. *

* To increment columns of a row, instantiate an Increment object with the row * to increment. At least one column to increment must be specified using the http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3ffd03/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java index a215903..0aaf6dd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java @@ -326,10 +326,9 @@ public interface Table extends Closeable { /** * Appends values to one or more columns within a single row. *

- * This operation does not appear atomic to readers. Appends are done - * under a single row lock, so write operations to a row are synchronized, but - * readers do not take row locks so get and scan operations can see this - * operation partially completed. + * This operation guaranteed atomicity to readers. Appends are done + * under a single row lock, so write operations to a row are synchronized, and + * readers are guaranteed to see this operation fully completed. * * @param append object that specifies the columns and amounts to be used * for the increment operations @@ -341,10 +340,9 @@ public interface Table extends Closeable { /** * Increments one or more columns within a single row. *

- * This operation does not appear atomic to readers. Increments are done - * under a single row lock, so write operations to a row are synchronized, but - * readers do not take row locks so get and scan operations can see this - * operation partially completed. + * This operation ensures atomicity to readers. Increments are done + * under a single row lock, so write operations to a row are synchronized, and + * readers are guaranteed to see this operation fully completed. * * @param increment object that specifies the columns and amounts to be used * for the increment operations