You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Wei-Chiu Chuang (Jira)" <ji...@apache.org> on 2019/12/11 17:35:00 UTC
[jira] [Created] (HDFS-15052) WebHDFS getTrashRoot leads to OOM due
to FileSystem object creation
Wei-Chiu Chuang created HDFS-15052:
--------------------------------------
Summary: WebHDFS getTrashRoot leads to OOM due to FileSystem object creation
Key: HDFS-15052
URL: https://issues.apache.org/jira/browse/HDFS-15052
Project: Hadoop HDFS
Issue Type: Bug
Components: webhdfs
Affects Versions: 3.0.0-alpha2, 2.9.0
Reporter: Wei-Chiu Chuang
Quoting [~daryn] in HDFS-10756 :
{quote}Surprised nobody has discovered this will lead to an inevitable OOM in the NN. The NN should not be creating filesystems to itself, and must never create filesystems in a remote user's context or the cache will explode.
{quote}
I guess the problem lies in side NamenodeWebHdfsMethods#getTrashRoot
{code:java}
private static String getTrashRoot(String fullPath,
Configuration conf) throws IOException {
FileSystem fs = FileSystem.get(conf != null ? conf : new Configuration());
return fs.getTrashRoot(
new org.apache.hadoop.fs.Path(fullPath)).toUri().getPath();
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org