hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jya...@apache.org
Subject hbase git commit: HBASE-12979 Use setters instead of return values for handing back statistics from HRegion methods
Date Fri, 06 Feb 2015 21:32:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 78c50af3e -> 073badfd7


HBASE-12979 Use setters instead of return values for handing back statistics from HRegion
methods


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

Branch: refs/heads/branch-1
Commit: 073badfd7f91ae22fad71b14a58e2b17a2f956cb
Parents: 78c50af
Author: Jesse Yates <jyates@apache.org>
Authored: Fri Feb 6 10:42:03 2015 -0800
Committer: Jesse Yates <jyates@apache.org>
Committed: Fri Feb 6 13:31:56 2015 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/HRegion.java    | 11 +++++------
 .../apache/hadoop/hbase/regionserver/RSRpcServices.java  |  3 ++-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/073badfd/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 d980146..dbb74a6 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
@@ -5349,18 +5349,18 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver
{ //
     return results;
   }
 
-  public ClientProtos.RegionLoadStats mutateRow(RowMutations rm) throws IOException {
+  public void mutateRow(RowMutations rm) throws IOException {
     // Don't need nonces here - RowMutations only supports puts and deletes
-    return mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow()));
+    mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow()));
   }
 
   /**
    * Perform atomic mutations within the region w/o nonces.
    * See {@link #mutateRowsWithLocks(Collection, Collection, long, long)}
    */
-  public ClientProtos.RegionLoadStats mutateRowsWithLocks(Collection<Mutation> mutations,
+  public void mutateRowsWithLocks(Collection<Mutation> mutations,
       Collection<byte[]> rowsToLock) throws IOException {
-    return mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE);
+    mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE);
   }
 
   /**
@@ -5375,11 +5375,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver
{ //
    * <code>rowsToLock</code> is sorted in order to avoid deadlocks.
    * @throws IOException
    */
-  public ClientProtos.RegionLoadStats mutateRowsWithLocks(Collection<Mutation> mutations,
+  public void mutateRowsWithLocks(Collection<Mutation> mutations,
       Collection<byte[]> rowsToLock, long nonceGroup, long nonce) throws IOException
{
     MultiRowMutationProcessor proc = new MultiRowMutationProcessor(mutations, rowsToLock);
     processRowsWithLocks(proc, -1, nonceGroup, nonce);
-    return getRegionStats();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/073badfd/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index f2e5571..8aef52b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -385,7 +385,8 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
           throw new DoNotRetryIOException("Atomic put and/or delete only, not " + type.name());
       }
     }
-    return region.mutateRow(rm);
+    region.mutateRow(rm);
+    return region.getRegionStats();
   }
 
   /**


Mime
View raw message