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-19912 Remove useless 'writeToWAL' flag of Region#checkAndRowMutate
Date Thu, 01 Feb 2018 20:34:53 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 4cdc13b86 -> 86ca65218


HBASE-19912 Remove useless 'writeToWAL' flag of Region#checkAndRowMutate

Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/branch-2
Commit: 86ca65218d615dc9487a4974767290ee40e5fa85
Parents: 4cdc13b
Author: kewang <cpckewang@gmail.com>
Authored: Thu Feb 1 18:22:05 2018 +0800
Committer: Michael Stack <stack@apache.org>
Committed: Thu Feb 1 12:34:46 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/86ca6521/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 ae0f3d1..ecc9a74 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
@@ -3919,16 +3919,14 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
   throws IOException{
     checkMutationType(mutation, row);
     return doCheckAndRowMutate(row, family, qualifier, op, comparator, null,
-      mutation, writeToWAL);
+      mutation);
   }
 
   @Override
   public boolean checkAndRowMutate(byte [] row, byte [] family, byte [] qualifier,
-                                   CompareOperator op, ByteArrayComparable comparator, RowMutations
rm,
-                                   boolean writeToWAL)
+    CompareOperator op, ByteArrayComparable comparator, RowMutations rm)
   throws IOException {
-    return doCheckAndRowMutate(row, family, qualifier, op, comparator, rm, null,
-      writeToWAL);
+    return doCheckAndRowMutate(row, family, qualifier, op, comparator, rm, null);
   }
 
   /**
@@ -3937,7 +3935,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
    */
   private boolean doCheckAndRowMutate(byte [] row, byte [] family, byte [] qualifier,
                                       CompareOperator op, ByteArrayComparable comparator,
RowMutations rowMutations,
-                                      Mutation mutation, boolean writeToWAL)
+                                      Mutation mutation)
   throws IOException {
     // Could do the below checks but seems wacky with two callers only. Just comment out
for now.
     // One caller passes a Mutation, the other passes RowMutation. Presume all good so we
don't

http://git-wip-us.apache.org/repos/asf/hbase/blob/86ca6521/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 5a01581..b6ca599 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
@@ -618,7 +618,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
           resultOrExceptionOrBuilder.build());
     }
     return region.checkAndRowMutate(row, family, qualifier, op,
-        comparator, rm, Boolean.TRUE);
+        comparator, rm);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/86ca6521/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 75f02a3..52d01fe 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
@@ -309,12 +309,11 @@ public interface Region extends ConfigurationObserver {
    * @param op the comparison operator
    * @param comparator
    * @param mutations
-   * @param writeToWAL
    * @return true if mutations were applied, false otherwise
    * @throws IOException
    */
   boolean checkAndRowMutate(byte [] row, byte [] family, byte [] qualifier, CompareOperator
op,
-      ByteArrayComparable comparator, RowMutations mutations, boolean writeToWAL)
+      ByteArrayComparable comparator, RowMutations mutations)
       throws IOException;
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/86ca6521/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
index 04dcb92..0d9db31 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
@@ -6387,7 +6387,7 @@ public class TestHRegion {
     RowMutations rm = new RowMutations(row);
     rm.add(p);
     assertTrue(region.checkAndRowMutate(row, fam1, qual1, CompareOperator.EQUAL,
-        new BinaryComparator(qual1), rm, false));
+        new BinaryComparator(qual1), rm));
     result = region.get(new Get(row));
     c = result.getColumnLatestCell(fam1, qual1);
     assertEquals(10L, c.getTimestamp());


Mime
View raw message