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

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

                Author: ASF GitHub Bot
            Created on: 22/Nov/21 09:46
            Start Date: 22/Nov/21 09:46
    Worklog Time Spent: 10m 
      Work Description: virajjasani commented on a change in pull request #3698:
URL: https://github.com/apache/hadoop/pull/3698#discussion_r754099463



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogger.java
##########
@@ -599,6 +599,36 @@ public void testAuditLogWithRemotePort() throws Exception {
     }
   }
 
+  @Test
+  public void testCallerContextCharacterEscape() throws IOException {
+    Configuration conf = new HdfsConfiguration();
+    conf.setBoolean(HADOOP_CALLER_CONTEXT_ENABLED_KEY, true);
+    conf.setInt(HADOOP_CALLER_CONTEXT_MAX_SIZE_KEY, 128);
+    conf.setInt(HADOOP_CALLER_CONTEXT_SIGNATURE_MAX_SIZE_KEY, 40);
+    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
+    LogCapturer auditlog = LogCapturer.captureLogs(FSNamesystem.auditLog);
+
+    try {
+      cluster.waitClusterUp();
+      final FileSystem fs = cluster.getFileSystem();
+      final long time = System.currentTimeMillis();
+      final Path p = new Path("/");

Review comment:
       nit: how about using try-with-resources here?
   ```
       try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build()) {
         LogCapturer auditlog = LogCapturer.captureLogs(FSNamesystem.auditLog);
         cluster.waitClusterUp();
         ...
         ...
         ...
       }
   ```




-- 
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.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

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


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

    Worklog Id:     (was: 684591)
    Time Spent: 1h 10m  (was: 1h)

> CallerContext should not include some characters
> ------------------------------------------------
>
>                 Key: HADOOP-18014
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18014
>             Project: Hadoop Common
>          Issue Type: Task
>            Reporter: Takanobu Asanuma
>            Assignee: Takanobu Asanuma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
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