HDFS-12485. expunge may fail to remove trash from encryption zone. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 8dbc8909c9
)
This commit is contained in:
parent
166c75a0eb
commit
1347e83c90
|
@ -2837,8 +2837,7 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Path userTrash = new Path(ezTrashRoot, System.getProperty(
|
Path userTrash = new Path(ezTrashRoot, dfs.ugi.getShortUserName());
|
||||||
"user.name"));
|
|
||||||
try {
|
try {
|
||||||
ret.add(getFileStatus(userTrash));
|
ret.add(getFileStatus(userTrash));
|
||||||
} catch (FileNotFoundException ignored) {
|
} catch (FileNotFoundException ignored) {
|
||||||
|
|
|
@ -225,7 +225,6 @@ public class TestTrashWithSecureEncryptionZones {
|
||||||
clientConf = new Configuration(conf);
|
clientConf = new Configuration(conf);
|
||||||
clientConf.setLong(FS_TRASH_INTERVAL_KEY, 1);
|
clientConf.setLong(FS_TRASH_INTERVAL_KEY, 1);
|
||||||
shell = new FsShell(clientConf);
|
shell = new FsShell(clientConf);
|
||||||
System.setProperty("user.name", HDFS_USER_NAME);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
|
|
Loading…
Reference in New Issue