Skip to content

Commit cc82c7c

Browse files
committed
make code more understandable
1 parent 389d469 commit cc82c7c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,14 @@ private void logAuditEvent(boolean succeeded,
461461
}
462462

463463
private void appendClientPortToCallerContextIfAbsent() {
464-
String clientPortInfo = CLIENT_PORT_STR + ":" + Server.getRemotePort();
465464
final CallerContext ctx = CallerContext.getCurrent();
466-
if (isClientPortInfoAbsent(clientPortInfo, ctx)) {
465+
if (isClientPortInfoAbsent(CLIENT_PORT_STR + ":" + Server.getRemotePort(),
466+
ctx)) {
467467
String origContext = ctx == null ? null : ctx.getContext();
468468
byte[] origSignature = ctx == null ? null : ctx.getSignature();
469469
CallerContext.setCurrent(
470470
new CallerContext.Builder(origContext, contextFieldSeparator)
471-
.append(clientPortInfo)
471+
.append(CLIENT_PORT_STR, String.valueOf(Server.getRemotePort()))
472472
.setSignature(origSignature)
473473
.build());
474474
}

0 commit comments

Comments
 (0)