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 Builder(String context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Builder(String context, Configuration conf) {
|
public Builder(String context, Configuration conf) {
|
||||||
if (isValid(context)) {
|
this(context, conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
|
||||||
sb.append(context);
|
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT));
|
||||||
}
|
|
||||||
fieldSeparator = conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
|
|
||||||
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
|
|
||||||
checkFieldSeparator(fieldSeparator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder(String context, String separator) {
|
public Builder(String context, String separator) {
|
||||||
|
Loading…
Reference in New Issue
Block a user