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-20989 Minor, miscellaneous logging fixes Signed-off-by: Zach York <zyork@amazon.com> Signed-off-by: Mingliang Liu <liuml07@apache.org>
Date Wed, 01 Aug 2018 18:20:49 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 bfb9c71e3 -> fc0c4660f


HBASE-20989 Minor, miscellaneous logging fixes
Signed-off-by: Zach York <zyork@amazon.com>
Signed-off-by: Mingliang Liu <liuml07@apache.org>


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

Branch: refs/heads/branch-2
Commit: fc0c4660fa2de39d7ee5114bd62919697822c421
Parents: bfb9c71
Author: Michael Stack <stack@apache.org>
Authored: Tue Jul 31 13:03:13 2018 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Wed Aug 1 11:20:26 2018 -0700

----------------------------------------------------------------------
 .../hbase/client/AsyncRequestFutureImpl.java      | 18 +++++++++---------
 .../hbase/procedure2/ProcedureExecutor.java       |  2 +-
 .../AbstractStateMachineTableProcedure.java       |  2 +-
 .../master/procedure/DeleteTableProcedure.java    | 12 ++++++------
 .../master/procedure/DisableTableProcedure.java   |  7 ++++---
 .../apache/hadoop/hbase/regionserver/HRegion.java |  2 +-
 6 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
index c3cb866..80535a1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
@@ -952,13 +952,13 @@ class AsyncRequestFutureImpl<CResult> implements AsyncRequestFuture
{
                            Throwable error, long backOffTime, boolean willRetry, String startTime,
                            int failed, int stopped) {
     StringBuilder sb = new StringBuilder();
-    sb.append("id=").append(asyncProcess.id).append(", table=").append(tableName).append(",
")
-        .append("attempt=").append(numAttempt)
-        .append("/").append(asyncProcess.numTries).append(", ");
+    sb.append("id=").append(asyncProcess.id).append(", table=").append(tableName).
+        append(", attempt=").append(numAttempt).append("/").append(asyncProcess.numTries).
+        append(", ");
 
     if (failureCount > 0 || error != null){
-      sb.append("failed=").append(failureCount).append("ops").append(", last exception=").
-          append(error == null ? "null" : error);
+      sb.append("failureCount=").append(failureCount).append("ops").append(", last exception=").
+          append(error);
     } else {
       sb.append("succeeded");
     }
@@ -967,15 +967,15 @@ class AsyncRequestFutureImpl<CResult> implements AsyncRequestFuture
{
 
     if (willRetry) {
       sb.append(", retrying after=").append(backOffTime).append("ms").
-          append(", replay=").append(replaySize).append("ops");
+          append(", operationsToReplay=").append(replaySize);
     } else if (failureCount > 0) {
       if (stopped > 0) {
-        sb.append("; not retrying ").append(stopped).append(" due to success from other replica");
+        sb.append("; NOT retrying, stopped=").append(stopped).
+            append(" because successful operation on other replica");
       }
       if (failed > 0) {
-        sb.append("; not retrying ").append(failed).append(" - final failure");
+        sb.append("; NOT retrying, failed=").append(failed).append(" -- final attempt!");
       }
-
     }
 
     return sb.toString();

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
index e2215c6..2ee80d7 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
@@ -1500,7 +1500,7 @@ public class ProcedureExecutor<TEnvironment> {
   private void execProcedure(RootProcedureState<TEnvironment> procStack,
       Procedure<TEnvironment> procedure) {
     Preconditions.checkArgument(procedure.getState() == ProcedureState.RUNNABLE,
-      procedure.toString());
+        "NOT RUNNABLE! " + procedure.toString());
 
     // Procedures can suspend themselves. They skip out by throwing a ProcedureSuspendedException.
     // The exception is caught below and then we hurry to the exit without disturbing state.
The

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
index 50a0149..4c77f6b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
@@ -188,7 +188,7 @@ public abstract class AbstractStateMachineTableProcedure<TState>
       throw new UnknownRegionException("No RegionState found for " + ri.getEncodedName());
     }
     if (!rs.isOpened()) {
-      throw new DoNotRetryRegionException(ri.getEncodedName() + " is not OPEN");
+      throw new DoNotRetryRegionException(ri.getEncodedName() + " is not OPEN; regionState="
+ rs);
     }
     if (ri.isSplitParent()) {
       throw new DoNotRetryRegionException(ri.getEncodedName() +

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
index 487bb27..060af01 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
@@ -94,7 +94,7 @@ public class DeleteTableProcedure
           }
 
           // TODO: Move out... in the acquireLock()
-          LOG.debug("Waiting for '" + getTableName() + "' regions in transition");
+          LOG.debug("Waiting for RIT for {}", this);
           regions = env.getAssignmentManager().getRegionStates().getRegionsOfTable(getTableName());
           assert regions != null && !regions.isEmpty() : "unexpected 0 regions";
           ProcedureSyncWait.waitRegionInTransition(env, regions);
@@ -105,29 +105,29 @@ public class DeleteTableProcedure
           setNextState(DeleteTableState.DELETE_TABLE_REMOVE_FROM_META);
           break;
         case DELETE_TABLE_REMOVE_FROM_META:
-          LOG.debug("delete '" + getTableName() + "' regions from META");
+          LOG.debug("Deleting regions from META for {}", this);
           DeleteTableProcedure.deleteFromMeta(env, getTableName(), regions);
           setNextState(DeleteTableState.DELETE_TABLE_CLEAR_FS_LAYOUT);
           break;
         case DELETE_TABLE_CLEAR_FS_LAYOUT:
-          LOG.debug("delete '" + getTableName() + "' from filesystem");
+          LOG.debug("Deleting regions from filesystem for {}", this);
           DeleteTableProcedure.deleteFromFs(env, getTableName(), regions, true);
           setNextState(DeleteTableState.DELETE_TABLE_UPDATE_DESC_CACHE);
           regions = null;
           break;
         case DELETE_TABLE_UPDATE_DESC_CACHE:
-          LOG.debug("delete '" + getTableName() + "' descriptor");
+          LOG.debug("Deleting descriptor for {}", this);
           DeleteTableProcedure.deleteTableDescriptorCache(env, getTableName());
           setNextState(DeleteTableState.DELETE_TABLE_UNASSIGN_REGIONS);
           break;
         case DELETE_TABLE_UNASSIGN_REGIONS:
-          LOG.debug("delete '" + getTableName() + "' assignment state");
+          LOG.debug("Deleting assignment state for {}", this);
           DeleteTableProcedure.deleteAssignmentState(env, getTableName());
           setNextState(DeleteTableState.DELETE_TABLE_POST_OPERATION);
           break;
         case DELETE_TABLE_POST_OPERATION:
           postDelete(env);
-          LOG.debug("delete '" + getTableName() + "' completed");
+          LOG.debug("Finished {}", this);
           return Flow.NO_MORE_STATE;
         default:
           throw new UnsupportedOperationException("unhandled state=" + state);

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
index 685a73e..3a2a952 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
@@ -142,7 +142,7 @@ public class DisableTableProcedure
       if (isRollbackSupported(state)) {
         setFailure("master-disable-table", e);
       } else {
-        LOG.warn("Retriable error trying to disable table={} (in state={})", tableName, state,
e);
+        LOG.warn("Retryable error in {}", this, e);
       }
     }
     return Flow.HAS_MORE_STATE;
@@ -256,7 +256,7 @@ public class DisableTableProcedure
       TableStateManager tsm = env.getMasterServices().getTableStateManager();
       TableState ts = tsm.getTableState(tableName);
       if (!ts.isEnabled()) {
-        LOG.info("Not ENABLED tableState=" + ts + "; skipping disable");
+        LOG.info("Not ENABLED skipping {}", this);
         setFailure("master-disable-table", new TableNotEnabledException(ts.toString()));
         canTableBeDisabled = false;
       }
@@ -292,6 +292,7 @@ public class DisableTableProcedure
     env.getMasterServices().getTableStateManager().setTableState(
       tableName,
       TableState.State.DISABLING);
+    LOG.info("Set {} to state={}", tableName, TableState.State.DISABLING);
   }
 
   /**
@@ -306,7 +307,7 @@ public class DisableTableProcedure
     env.getMasterServices().getTableStateManager().setTableState(
       tableName,
       TableState.State.DISABLED);
-    LOG.info("Disabled table, " + tableName + ", is completed.");
+    LOG.info("Set {} to state={}", tableName, TableState.State.DISABLED);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc0c4660/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 6c1f7ff..64904cc 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
@@ -1523,7 +1523,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 {}" + this.getRegionInfo().getEncodedName());
+      LOG.info("Running close preflush of {}", this.getRegionInfo().getEncodedName());
       try {
         internalFlushcache(status);
       } catch (IOException ioe) {


Mime
View raw message