liuml07 commented on a change in pull request #2327:
URL: https://github.com/apache/hadoop/pull/2327#discussion_r496126898



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java
##########
@@ -123,6 +140,37 @@ public Builder setSignature(byte[] signature) {
       return this;
     }
 
+    /**
+     * Append new item to the context.
+     * @param item
+     * @return builder
+     */
+    public Builder append(String item) {
+      if (isValid(item)) {
+        if (sb.length() > 0) {
+          sb.append(separator);
+        }
+        sb.append(item);
+      }
+      return this;
+    }
+
+    /**
+     * Append new item which contains key and value to the context.
+     * @param key
+     * @param value
+     * @return builder
+     */
+    public Builder append(String key, String value) {
+      if (isValid(key) && isValid(value)) {
+        if (sb.length() > 0) {
+          sb.append(separator);
+        }
+        sb.append(key + ":" + value);

Review comment:
       I was proposing fixed `:` for two reasons:
   1. We have too many Hadoop configurations and I was thinking we add one more 
only when necessary. Using `:` seems most popular choice to me
   1. There are not many choices I imagine and users have to know they can not 
use `\t`, `\n`, `=` etc. So I prefer simplicity. 
   
   But I'm also fine if we go with a new config for this, +0 on that.
   
   Thank you @goiri 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to