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"); 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.