hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject hadoop git commit: HADOOP-11714. Add more trace log4j messages to SpanReceiverHost (cmccabe)
Date Tue, 17 Mar 2015 01:42:00 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 647d9ae27 -> 03b979b8a


HADOOP-11714. Add more trace log4j messages to SpanReceiverHost (cmccabe)

(cherry picked from commit bf3275dbaa99105d49520e25f5a6eadd6fd5b7ed)
(cherry picked from commit eb4eb63de3b929d154360e20abb895f0e14134cf)


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

Branch: refs/heads/branch-2.7
Commit: 03b979b8a51efd8452b1db81d878996482966cee
Parents: 647d9ae
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Mon Mar 16 12:02:10 2015 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Mon Mar 16 18:41:51 2015 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt        |  2 ++
 .../org/apache/hadoop/tracing/SpanReceiverHost.java    | 13 ++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/03b979b8/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 255879c..37f4f3e 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -236,6 +236,8 @@ Release 2.7.0 - UNRELEASED
     HADOOP-8059. Add javadoc to InterfaceAudience and InterfaceStability.
     (Brandon Li via suresh)
 
+    HADOOP-11714. Add more trace log4j messages to SpanReceiverHost (cmccabe)
+
   OPTIMIZATIONS
 
     HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/03b979b8/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
index 01ba76d..f2de0a0 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
@@ -134,20 +134,27 @@ public class SpanReceiverHost implements TraceAdminProtocol {
     String[] receiverNames =
         config.getTrimmedStrings(SPAN_RECEIVERS_CONF_KEY);
     if (receiverNames == null || receiverNames.length == 0) {
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("No span receiver names found in " +
+                  SPAN_RECEIVERS_CONF_KEY + ".");
+      }
       return;
     }
     // It's convenient to have each daemon log to a random trace file when
     // testing.
     if (config.get(LOCAL_FILE_SPAN_RECEIVER_PATH) == null) {
-      config.set(LOCAL_FILE_SPAN_RECEIVER_PATH,
-          getUniqueLocalTraceFileName());
+      String uniqueFile = getUniqueLocalTraceFileName();
+      config.set(LOCAL_FILE_SPAN_RECEIVER_PATH, uniqueFile);
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("Set " + LOCAL_FILE_SPAN_RECEIVER_PATH + " to " +  uniqueFile);
+      }
     }
     for (String className : receiverNames) {
       try {
         SpanReceiver rcvr = loadInstance(className, EMPTY);
         Trace.addReceiver(rcvr);
         receivers.put(highestId++, rcvr);
-        LOG.info("SpanReceiver " + className + " was loaded successfully.");
+        LOG.info("Loaded SpanReceiver " + className + " successfully.");
       } catch (IOException e) {
         LOG.error("Failed to load SpanReceiver", e);
       }


Mime
View raw message