hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-16948 Fix inconsistency between HRegion and Region javadoc on getRowLock
Date Wed, 26 Oct 2016 23:09:50 GMT
Repository: hbase
Updated Branches:
  refs/heads/master c776b3144 -> 8d9b9dc6b


HBASE-16948 Fix inconsistency between HRegion and Region javadoc on getRowLock


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8d9b9dc6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8d9b9dc6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8d9b9dc6

Branch: refs/heads/master
Commit: 8d9b9dc6b731d84e8db5c7cde86edf39d95827ae
Parents: c776b31
Author: Michael Stack <stack@apache.org>
Authored: Wed Oct 26 16:09:43 2016 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Wed Oct 26 16:09:43 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/HRegion.java      | 10 --------
 .../hadoop/hbase/regionserver/Region.java       | 26 +++++++++++++-------
 2 files changed, 17 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8d9b9dc6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 7bfd652..2c25efd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5247,16 +5247,6 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
     return getRowLock(row, false);
   }
 
-  /**
-   *
-   * Get a row lock for the specified row. All locks are reentrant.
-   *
-   * Before calling this function make sure that a region operation has already been
-   * started (the calling thread has already acquired the region-close-guard lock).
-   * @param row The row actions will be performed against
-   * @param readLock is the lock reader or writer. True indicates that a non-exlcusive
-   *                 lock is requested
-   */
   @Override
   public RowLock getRowLock(byte[] row, boolean readLock) throws IOException {
     checkRow(row, "row lock");

http://git-wip-us.apache.org/repos/asf/hbase/blob/8d9b9dc6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
index 18b0eb9..3a5acfe 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
@@ -281,15 +281,23 @@ public interface Region extends ConfigurationObserver {
   }
 
   /**
-   * Tries to acquire a lock on the given row.
-   * @param waitForLock if true, will block until the lock is available.
-   *        Otherwise, just tries to obtain the lock and returns
-   *        false if unavailable.
-   * @return the row lock if acquired,
-   *   null if waitForLock was false and the lock was not acquired
-   * @throws IOException if waitForLock was true and the lock could not be acquired after
waiting
-   */
-  RowLock getRowLock(byte[] row, boolean waitForLock) throws IOException;
+   *
+   * Get a row lock for the specified row. All locks are reentrant.
+   *
+   * Before calling this function make sure that a region operation has already been
+   * started (the calling thread has already acquired the region-close-guard lock).
+   * 
+   * NOTE: the boolean passed here has changed. It used to be a boolean that
+   * stated whether or not to wait on the lock. Now it is whether it an exclusive
+   * lock is requested.
+   * 
+   * @param row The row actions will be performed against
+   * @param readLock is the lock reader or writer. True indicates that a non-exclusive
+   * lock is requested
+   * @see #startRegionOperation()
+   * @see #startRegionOperation(Operation)
+   */
+  RowLock getRowLock(byte[] row, boolean readLock) throws IOException;
 
   /**
    * If the given list of row locks is not null, releases all locks.


Mime
View raw message