Refactor CallerContext's constructor to eliminate duplicate code (#5070)
Reviewed-by: Tao Li <tomscut@apache.org> Reviewed-by: Zander Xu <zanderxu@apache.org>
This commit is contained in:
parent
f140506d67
commit
37bff63c0f
|
@ -140,12 +140,8 @@ public final class CallerContext {
|
|||
}
|
||||
|
||||
public Builder(String context, Configuration conf) {
|
||||
if (isValid(context)) {
|
||||
sb.append(context);
|
||||
}
|
||||
fieldSeparator = conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
|
||||
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
|
||||
checkFieldSeparator(fieldSeparator);
|
||||
this(context, conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
|
||||
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT));
|
||||
}
|
||||
|
||||
public Builder(String context, String separator) {
|
||||
|
|
Loading…
Reference in New Issue