hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-16469 Several log refactoring/improvement suggestions
Date Tue, 11 Apr 2017 19:26:35 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 82d554e37 -> 0b5bd78d6


HBASE-16469 Several log refactoring/improvement suggestions

Signed-off-by: Sean Busbey <busbey@apache.org>


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

Branch: refs/heads/master
Commit: 0b5bd78d6e7c51a5c1b6b30a1f385eafcdba8f7b
Parents: 82d554e
Author: Nemo Chen <chenfsd@gmail.com>
Authored: Wed Apr 5 21:20:40 2017 -0400
Committer: Sean Busbey <busbey@apache.org>
Committed: Tue Apr 11 14:16:12 2017 -0500

----------------------------------------------------------------------
 .../hadoop/hbase/client/PreemptiveFastFailInterceptor.java     | 2 +-
 .../test/java/org/apache/hadoop/hbase/HBaseClusterManager.java | 1 +
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java     | 6 +++---
 .../hadoop/hbase/regionserver/handler/CloseRegionHandler.java  | 2 +-
 .../org/apache/hadoop/hbase/util/MultiThreadedUpdater.java     | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0b5bd78d/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java
index a29a662..abac040 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java
@@ -291,7 +291,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor
{
     // If we were able to connect to the server, reset the failure
     // information.
     if (couldNotCommunicate == false) {
-      LOG.info("Clearing out PFFE for server " + server.getServerName());
+      LOG.info("Clearing out PFFE for server " + server);
       repeatedFailuresMap.remove(server);
     } else {
       // update time of last attempt

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b5bd78d/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
index 07014e5..d358b9a 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
@@ -84,6 +84,7 @@ public class HBaseClusterManager extends Configured implements ClusterManager
{
       sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
     }
     sshOptions = (sshOptions == null) ? "" : sshOptions;
+    sshUserName = (sshUserName == null) ? "" : sshUserName;
     tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
     // Print out ssh special config if any.
     if ((sshUserName != null && sshUserName.length() > 0) ||

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b5bd78d/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 a87b679..78ce608 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
@@ -1390,12 +1390,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
    */
   public boolean isMergeable() {
     if (!isAvailable()) {
-      LOG.debug("Region " + getRegionInfo().getRegionNameAsString()
+      LOG.debug("Region " + this
           + " is not mergeable because it is closing or closed");
       return false;
     }
     if (hasReferences()) {
-      LOG.debug("Region " + getRegionInfo().getRegionNameAsString()
+      LOG.debug("Region " + this
           + " is not mergeable because it has references");
       return false;
     }
@@ -1559,7 +1559,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
     // the close flag?
     if (!abort && worthPreFlushing() && canFlush) {
       status.setStatus("Pre-flushing region before close");
-      LOG.info("Running close preflush of " + getRegionInfo().getRegionNameAsString());
+      LOG.info("Running close preflush of " + this);
       try {
         internalFlushcache(status);
       } catch (IOException ioe) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b5bd78d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
index 8aff736..5ff7a1e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
@@ -103,7 +103,7 @@ public class CloseRegionHandler extends EventHandler {
           // This region got closed.  Most likely due to a split.
           // The split message will clean up the master state.
           LOG.warn("Can't close region: was already closed during close(): " +
-            regionInfo.getRegionNameAsString());
+            name);
           return;
         }
       } catch (IOException ioe) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b5bd78d/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
index f41a5cc..564c000 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
@@ -179,7 +179,7 @@ public class MultiThreadedUpdater extends MultiThreadedWriterBase {
                   LOG.info("Null result expected for the rowkey " + Bytes.toString(rowKey));
                 } else {
                   failedKeySet.add(rowKeyBase);
-                  LOG.error("Failed to update the row with key = [" + rowKey
+                  LOG.error("Failed to update the row with key = [" + Bytes.toString(rowKey)
                       + "], since we could not get the original row");
                 }
               }


Mime
View raw message