hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-18998 processor.getRowsToLock() always assumes there is some row being locked
Date Fri, 13 Oct 2017 15:48:34 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 9647351ec -> 3a86bfc26


HBASE-18998 processor.getRowsToLock() always assumes there is some row being locked


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

Branch: refs/heads/branch-1.1
Commit: 3a86bfc26282ea333363d917c9568a122927cdbe
Parents: 9647351
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Oct 13 08:48:27 2017 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Oct 13 08:48:27 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/HRegion.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3a86bfc2/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 ccb6a5c..53de3fc 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
@@ -6883,10 +6883,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
       try {
         processor.process(now, region, mutations, walEdit);
       } catch (IOException e) {
+        String row = processor.getRowsToLock().isEmpty() ? "" :
+          " on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next())
+ "...";
         LOG.warn("RowProcessor:" + processor.getClass().getName() +
-            " throws Exception on row(s):" +
-            Bytes.toStringBinary(
-              processor.getRowsToLock().iterator().next()) + "...", e);
+            " throws Exception" + row, e);
         throw e;
       }
       return;
@@ -6901,10 +6901,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
             processor.process(now, region, mutations, walEdit);
             return null;
           } catch (IOException e) {
+            String row = processor.getRowsToLock().isEmpty() ? "" :
+              " on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next())
+ "...";
             LOG.warn("RowProcessor:" + processor.getClass().getName() +
-                " throws Exception on row(s):" +
-                Bytes.toStringBinary(
-                    processor.getRowsToLock().iterator().next()) + "...", e);
+                " throws Exception" + row, e);
             throw e;
           }
         }
@@ -6913,9 +6913,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
     try {
       task.get(timeout, TimeUnit.MILLISECONDS);
     } catch (TimeoutException te) {
-      LOG.error("RowProcessor timeout:" + timeout + " ms on row(s):" +
-          Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) +
-          "...");
+      String row = processor.getRowsToLock().isEmpty() ? "" :
+        " on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next())
+ "...";
+      LOG.error("RowProcessor timeout:" + timeout + " ms" + row);
       throw new IOException(te);
     } catch (Exception e) {
       throw new IOException(e);


Mime
View raw message