[ 
https://issues.apache.org/jira/browse/HADOOP-17276?focusedWorklogId=492897&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-492897
 ]

ASF GitHub Bot logged work on HADOOP-17276:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Sep/20 11:38
            Start Date: 30/Sep/20 11:38
    Worklog Time Spent: 10m 
      Work Description: aajisaka commented on a change in pull request #2327:
URL: https://github.com/apache/hadoop/pull/2327#discussion_r497441115



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java
##########
@@ -109,11 +113,32 @@ public String toString() {
 
   /** The caller context builder. */
   public static final class Builder {
-    private final String context;
+    private static final String KEY_VALUE_SEPARATOR = ":";
+    private final String fieldSeparator;
+    private final StringBuilder sb = new StringBuilder();
     private byte[] signature;
 
     public Builder(String context) {
-      this.context = context;
+      fieldSeparator = HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT;
+      if (isValid(context)) {
+        sb.append(context);
+      }
+    }
+
+    public Builder(Configuration conf) {
+      fieldSeparator = conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
+          HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
+    }

Review comment:
       After adding this constructor, `new Builder(null)` fails. This is an 
incompatible change because CallerContext is `@Public`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 492897)
    Time Spent: 6h 20m  (was: 6h 10m)

> Extend CallerContext to make it include many items
> --------------------------------------------------
>
>                 Key: HADOOP-17276
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17276
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Hui Fei
>            Assignee: Hui Fei
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> Now context is string. We need to extend the CallerContext because context 
> may contains many items.
> Items include 
> * router ip
> * MR or CLI
> * etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to