HDFS-12485. expunge may fail to remove trash from encryption zone. Contributed by Wei-Chiu Chuang.

This commit is contained in:
Wei-Chiu Chuang 2017-10-16 12:57:48 -07:00
parent 21bc855587
commit 8dbc8909c9
2 changed files with 1 additions and 3 deletions

View File

@ -2783,8 +2783,7 @@ public class DistributedFileSystem extends FileSystem {
}
}
} else {
Path userTrash = new Path(ezTrashRoot, System.getProperty(
"user.name"));
Path userTrash = new Path(ezTrashRoot, dfs.ugi.getShortUserName());
try {
ret.add(getFileStatus(userTrash));
} catch (FileNotFoundException ignored) {

View File

@ -225,7 +225,6 @@ public class TestTrashWithSecureEncryptionZones {
clientConf = new Configuration(conf);
clientConf.setLong(FS_TRASH_INTERVAL_KEY, 1);
shell = new FsShell(clientConf);
System.setProperty("user.name", HDFS_USER_NAME);
}
@AfterClass