public class LoggerUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
conditionalSetStatusAndLog(boolean condition,
org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.log4j.Logger logger,
org.apache.log4j.Level level,
String message)
Helper method to set the status and log message together if condition
has been been met.
|
static void |
setStatusAndLog(org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.log4j.Logger logger,
org.apache.log4j.Level level,
String message)
Helper method to set the status and log message together.
|
public static void conditionalSetStatusAndLog(boolean condition, org.apache.hadoop.mapreduce.TaskAttemptContext context, org.apache.log4j.Logger logger, org.apache.log4j.Level level, String message)
condition
- Must be true to write status and logcontext
- Context to set the status withlogger
- Logger to write tolevel
- Level of loggingmessage
- Message to set status withpublic static void setStatusAndLog(org.apache.hadoop.mapreduce.TaskAttemptContext context, org.apache.log4j.Logger logger, org.apache.log4j.Level level, String message)
context
- Context to set the status withlogger
- Logger to write tolevel
- Level of loggingmessage
- Message to set status withCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.