hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [45/50] [abbrv] hadoop git commit: YARN-7406. Moving logging APIs over to slf4j in hadoop-yarn-api. Contributed by Yeliang Cang.
Date Sat, 11 Nov 2017 11:02:28 GMT
YARN-7406. Moving logging APIs over to slf4j in hadoop-yarn-api. Contributed by Yeliang Cang.


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

Branch: refs/heads/YARN-5881
Commit: 2c2b7a3672e0744ce6a77a117cedefba04fed603
Parents: 796a0d3
Author: bibinchundatt <bibinchundatt@apache.org>
Authored: Sat Nov 11 10:36:27 2017 +0530
Committer: bibinchundatt <bibinchundatt@apache.org>
Committed: Sat Nov 11 10:36:27 2017 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/yarn/conf/HAUtil.java   | 12 ++++++------
 .../apache/hadoop/yarn/util/resource/ResourceUtils.java |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2c2b7a36/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/HAUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/HAUtil.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/HAUtil.java
index 528b642..60c370b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/HAUtil.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/HAUtil.java
@@ -21,8 +21,6 @@ package org.apache.hadoop.yarn.conf;
 import java.net.InetSocketAddress;
 import java.util.Collection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.HadoopIllegalArgumentException;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
@@ -30,10 +28,12 @@ import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
 
 import com.google.common.annotations.VisibleForTesting;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @InterfaceAudience.Private
 public class HAUtil {
-  private static Log LOG = LogFactory.getLog(HAUtil.class);
+  private static Logger LOG = LoggerFactory.getLogger(HAUtil.class);
 
   @VisibleForTesting
   public static final String BAD_CONFIG_MESSAGE_PREFIX =
@@ -302,9 +302,9 @@ public class HAUtil {
     String confKey = getConfKeyForRMInstance(prefix, conf);
     String retVal = conf.getTrimmed(confKey);
     if (LOG.isTraceEnabled()) {
-      LOG.trace("getConfValueForRMInstance: prefix = " + prefix +
-          "; confKey being looked up = " + confKey +
-          "; value being set to = " + retVal);
+      LOG.trace("getConfValueForRMInstance: prefix = {};" +
+          " confKey being looked up = {};" +
+          " value being set to = {}", prefix, confKey, retVal);
     }
     return retVal;
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2c2b7a36/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
index 9c9c0ef8..1170c72 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
@@ -20,8 +20,6 @@ package org.apache.hadoop.yarn.util.resource;
 
 import com.google.common.annotations.VisibleForTesting;
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.api.protocolrecords.ResourceTypes;
 import org.apache.hadoop.yarn.api.records.Resource;
@@ -32,6 +30,8 @@ import org.apache.hadoop.yarn.conf.ConfigurationProviderFactory;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -71,7 +71,7 @@ public class ResourceUtils {
   private static volatile Map<String, ResourceInformation> readOnlyNodeResources;
   private static volatile int numKnownResourceTypes = -1;
 
-  static final Log LOG = LogFactory.getLog(ResourceUtils.class);
+  static final Logger LOG = LoggerFactory.getLogger(ResourceUtils.class);
 
   private ResourceUtils() {
   }
@@ -396,7 +396,7 @@ public class ResourceUtils {
     } catch (FileNotFoundException fe) {
       LOG.info("Unable to find '" + resourceFile + "'.");
     } catch (IOException | YarnException ex) {
-      LOG.fatal("Exception trying to read resource types configuration '"
+      LOG.error("Exception trying to read resource types configuration '"
           + resourceFile + "'.", ex);
       throw new YarnRuntimeException(ex);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message