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 23:30:13 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 de08a82c6 -> d776789fc


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/d776789f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d776789f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d776789f

Branch: refs/heads/0.98
Commit: d776789fc42065e1422c5fc419fe0fd566e2043c
Parents: de08a82
Author: Jesse Yates <jyates@apache.org>
Authored: Fri Feb 6 15:30:06 2015 -0800
Committer: Jesse Yates <jyates@apache.org>
Committed: Fri Feb 6 15:30:06 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/d776789f/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 f4d4348..a1ff0b0 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
@@ -5019,18 +5019,18 @@ public class HRegion implements HeapSize { // , Writable{
     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);
   }
 
   /**
@@ -5045,11 +5045,10 @@ public class HRegion implements HeapSize { // , Writable{
    * <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/d776789f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index c04338f..e8e8c1b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -4644,7 +4644,8 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
           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