You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2019/05/16 14:03:56 UTC

[hadoop] branch branch-3.1 updated: HADOOP-16307. Intern User Name and Group Name in FileStatus.

This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new cf0d5a0  HADOOP-16307. Intern User Name and Group Name in FileStatus.
cf0d5a0 is described below

commit cf0d5a0e6ee174387669ece51ae206a467d3395c
Author: David Mollitor <da...@cloudera.com>
AuthorDate: Thu May 16 16:03:34 2019 +0200

    HADOOP-16307. Intern User Name and Group Name in FileStatus.
    
    Author:    David Mollitor
    
    (cherry picked from commit 2713dcf6e9ef308ffe6102532c90b27c52d27f7c)
---
 .../src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java
index 3b6724a..6841c6e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.fs.protocolPB;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.StringInterner;
 
 import java.io.IOException;
 
@@ -91,8 +92,8 @@ public final class PBHelper {
     mtime = proto.getModificationTime();
     atime = proto.getAccessTime();
     permission = convert(proto.getPermission());
-    owner = proto.getOwner();
-    group = proto.getGroup();
+    owner = StringInterner.weakIntern(proto.getOwner());
+    group = StringInterner.weakIntern(proto.getGroup());
     int flags = proto.getFlags();
     FileStatus fileStatus = new FileStatus(length, isdir, blockReplication,
         blocksize, mtime, atime, permission, owner, group, symlink, path,


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org