[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151223#comment-17151223 ] Hudson commented on HDFS-15446: --- SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #18406 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/18406/]) HDFS-15446. CreateSnapshotOp fails during edit log loading for (ayushsaxena: rev f86f15cf2003a7c74d6a8dffa4c61236bc0a208a) * (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java * (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java * (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Fix For: 3.2.2, 3.3.1, 3.4.0, 3.1.5 > > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151215#comment-17151215 ] Ayush Saxena commented on HDFS-15446: - Committed to trunk,branch-3.3,3.2,3.1 Thanx [~sodonnell] for the contribution, [~hemanthboyina] for the review and [~smajeti] for the report!!! > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151201#comment-17151201 ] Ayush Saxena commented on HDFS-15446: - v003 LGTM +1 > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151150#comment-17151150 ] hemanthboyina commented on HDFS-15446: -- [~ayushtkn] we can go ahead > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151097#comment-17151097 ] Ayush Saxena commented on HDFS-15446: - Correct, [~hemanthboyina] any further doubts or confusions, let me know if you find any trouble verifying this. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149720#comment-17149720 ] Stephen O'Donnell commented on HDFS-15446: -- I'm happy that the 003 patch is logically correct - especially as no tests failed. Your logic makes sense too - everything must have been checked after the client call, so we shouldn't need such checks replaying the edits. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149707#comment-17149707 ] Ayush Saxena commented on HDFS-15446: - We are not performing the createSnapshot operation here for the first time, this is when we are re playing the edit logs. The entry made into the edit log since these checked passed, if these traversal or permissions were not correct, it won't be there in the edit logs, Edit logs have only successful entries which changes the state of the filesystem, so that they can be used to reach to the same filesystem state. If checkTraverse() or permission check has to fail, it fail itself when the client makes such a call for the first time to the namenode, such a call will not make into the edit logs itself, because it didn't changed the FileSystem state. Secondly, lets go beyond and consider checkTraverse(..) was there, It is a void method it would be either silent or throw exception, won't change anything at FS layer, Correct? Now if it stays silent, it does nothing, No use of calling it and if it throws exception here, during edit loading the namenode would crash itself like it happened here, and if that happens then it is a critcal bug, that how the FS state is different when re applying the edits and how the client call was success and edit entry isn't. In that case as well we need to fix that bug, rather than having a check here. Going even further in the context, this is the reason, if you tend to change the behavior of an API to throw exception in some scenario, you would find {{unprotectedMethodName}} being called for the edit logs, they don't throw that exception, This is done because of two reasons firstly if someone is re playing edits which were of time before the exception change behavior was introduced, so his edit loading shall fail, Secondly it keeps the the new behavior intact as well, since the edit log entry would itself not be there if the operation threw exception when the client made the call for the first shot. Let me know for any further confusion, you both can try once, making an edit entry for create snapshot, where checkTraverse(..) was success when client called it, that will have an entry in the edit logs since the operation was success, and then when the edit is being replayed {{checkTraverse(..)}} throw an exception. Ideally that shouldn't happen. Give a try. We will hold this till then... > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) >
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149645#comment-17149645 ] Stephen O'Donnell commented on HDFS-15446: -- I am not sure if we need to call checkTraverse or not - the tests all seem to pass without it, so it seems like we don't need it in this use case, as permissions etc should all have been checked before the edit makes it into the edit stream. However, when the namenode receives a "createSnapshot" call it, eventually calls this code in FSDirSnapshotOp.java: {code} static String createSnapshot( FSDirectory fsd, FSPermissionChecker pc, SnapshotManager snapshotManager, String snapshotRoot, String snapshotName, boolean logRetryCache) throws IOException { final INodesInPath iip = fsd.resolvePath(pc, snapshotRoot, DirOp.WRITE); {code} As you can see, it calls fsd.resolvePath(...), and that is why my original patch changed to call this same method when loading the edits. I think it would be safer to use the same code in this change too, ie what was done in the 002 patch. [~ayushtkn] was concerned about the performance overhead, hence we created the cut down method in the 003 patch. However snapshot operations are relatively rare - maybe a few 1000's per day in an extreme case, and the cost of dropping a large snapshot is often several seconds of runtime. The cost of getting the IIP should be small compared to that. It also seems the original processing code was calling checkTraverse anyway, so we already had that overhead. [~ayushtkn] What do you think? Is there any risk from not calling checkTraverse(...) ? > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149616#comment-17149616 ] Hadoop QA commented on HDFS-15446: -- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 1m 27s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} dupname {color} | {color:green} 0m 0s{color} | {color:green} No case conflicting files found. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 21m 43s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 48s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 14s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 17m 50s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 41s{color} | {color:green} trunk passed {color} | | {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue} 3m 2s{color} | {color:blue} Used deprecated FindBugs config; considering switching to SpotBugs. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 0s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 13s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 43s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 15m 26s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 37s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 5s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red}111m 1s{color} | {color:red} hadoop-hdfs in the patch passed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 34s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black}182m 49s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean | | | hadoop.hdfs.server.balancer.TestBalancer | \\ \\ || Subsystem || Report/Notes || | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/PreCommit-HDFS-Build/29478/artifact/out/Dockerfile | | JIRA Issue | HDFS-15446 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/13006845/HDFS-15446.003.patch | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux f7b00921b9df 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | personality/hadoop.sh | | git revision | trunk / 04abd0eb17b | | Default Java | Private Build-1.8.0_252-8u252-b09-1~18.04-b09 | | unit | https://builds.apache.org/job/PreCommit-HDFS-Build/29478/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt | | Test Results |
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149591#comment-17149591 ] hemanthboyina commented on HDFS-15446: -- thanks [~sodonnell] for your work , i had a small question on latest patch in the existing code we are using getINodesInPath for getting iip , getINodesInPath internally calls checkTraverse(pc, iip, resolveLink) i think we are missing the functionality of this method in the latest patch , aren't we required this existing functionality ? > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149492#comment-17149492 ] Stephen O'Donnell commented on HDFS-15446: -- Hi [~ayushtkn] - thanks for the further suggestion. I have uploaded a new patch with your suggestion. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch, > HDFS-15446.003.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149470#comment-17149470 ] Ayush Saxena commented on HDFS-15446: - Hey [~sodonnell] I think for the edit log purpose only this much shall work : {code:java} public INodesInPath unprotectedResolvePath(String src) throws FileNotFoundException { byte[][] components = INode.getPathComponents(src); boolean isRaw = isReservedRawName(components); components = resolveComponents(components, this); return INodesInPath.resolve(rootDir, components, isRaw); } {code} The other client side logic checks {{isCreate}} and stuffs aren't required, we don't pass it here as well so no need to check. With this you might not be able to refactor and reuse this method above. But I am ok having a separate method. Though the impacts are minor, but edits are replayed in huge numbers so minor stuffs magnifies, Regarding the Snapshot operation. The snapshot operations are there in abundance in many cases, One of which I have is: if the cluster is part of Federation setup and there are tools running for load balancing between the clusters. Those tools relies too much on snapshots. So, I feel we can try this out, If you don't have any issues. :) > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149425#comment-17149425 ] Stephen O'Donnell commented on HDFS-15446: -- Hi [~ayushtkn] - I would be very concerned about the performance of fsDir.resolvePath(..) if it was used for common edits, but it is only being used here for snapshot operations, which should be very rare in comparison to other edit entries. As we are passing null as the permission checking, it only performs a lightweight traversal, although it is still some unnecessary work. With that in mind, do you think it is worth adding a new method to skip the traversal check? I will probably need to create a new method like this: {code} public INodesInPath resolvePathWithoutPermCheck(String src, DirOp dirOp) throws UnresolvedLinkException, FileNotFoundException, AccessControlException, ParentNotDirectoryException { boolean isCreate = (dirOp == DirOp.CREATE || dirOp == DirOp.CREATE_LINK); // prevent creation of new invalid paths if (isCreate && !DFSUtil.isValidName(src)) { throw new InvalidPathException("Invalid file name: " + src); } byte[][] components = INode.getPathComponents(src); boolean isRaw = isReservedRawName(components); if (isPermissionEnabled && pc != null && isRaw) { switch(dirOp) { case READ_LINK: case READ: break; default: pc.checkSuperuserPrivilege(); break; } } components = resolveComponents(components, this); return INodesInPath.resolve(rootDir, components, isRaw); } {code} Then have the existing `resolvePath(...)` call this new one and then perform the traversal check. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149408#comment-17149408 ] Ayush Saxena commented on HDFS-15446: - Thanx [~sodonnell] for the root cause and patch. The changes looks good. On a thought, {{fsDir.resolvePath(..)}} does some more checks as well rather than just giving the path components, like {{checkTravesrse}} and {{isValidName}}, which I don't think we need here? If not, we can have a own method, just resolving path. Might save some time during edit loading. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > Attachments: HDFS-15446.001.patch, HDFS-15446.002.patch > > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149020#comment-17149020 ] Hadoop QA commented on HDFS-15446: -- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 1m 16s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} dupname {color} | {color:green} 0m 0s{color} | {color:green} No case conflicting files found. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 21m 57s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 49s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 16s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 17m 35s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 42s{color} | {color:green} trunk passed {color} | | {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue} 3m 4s{color} | {color:blue} Used deprecated FindBugs config; considering switching to SpotBugs. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 2s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 9s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 42s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 12s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 15m 6s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 39s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 7s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red}109m 57s{color} | {color:red} hadoop-hdfs in the patch passed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 37s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black}181m 20s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped | | | hadoop.hdfs.TestDecommissionWithStripedBackoffMonitor | | | hadoop.hdfs.server.namenode.TestNameNodeRetryCacheMetrics | \\ \\ || Subsystem || Report/Notes || | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/PreCommit-HDFS-Build/29473/artifact/out/Dockerfile | | JIRA Issue | HDFS-15446 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/13006767/HDFS-15446.002.patch | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux 23572cf560a2 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | personality/hadoop.sh | | git revision | trunk / e8dc862d385 | | Default Java | Private Build-1.8.0_252-8u252-b09-1~18.04-b09 | | unit |
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148950#comment-17148950 ] Hadoop QA commented on HDFS-15446: -- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 1m 30s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} dupname {color} | {color:green} 0m 0s{color} | {color:green} No case conflicting files found. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 20m 3s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 10s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 48s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 19s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 17m 19s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 45s{color} | {color:green} trunk passed {color} | | {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue} 3m 6s{color} | {color:blue} Used deprecated FindBugs config; considering switching to SpotBugs. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 4s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 5s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 44s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 16s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 13m 58s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 45s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 9s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red}109m 41s{color} | {color:red} hadoop-hdfs in the patch passed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 40s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black}178m 36s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | hadoop.hdfs.TestDFSStripedOutputStreamWithFailureWithRandomECPolicy | | | hadoop.hdfs.server.balancer.TestBalancerWithNodeGroup | | | hadoop.hdfs.TestFileChecksumCompositeCrc | | | hadoop.hdfs.TestDFSStorageStateRecovery | | | hadoop.hdfs.TestMaintenanceState | | | hadoop.hdfs.TestReconstructStripedFile | | | hadoop.hdfs.server.namenode.TestNameNodeRetryCacheMetrics | | | hadoop.hdfs.TestDFSInputStreamBlockLocations | | | hadoop.hdfs.TestDecommissionWithStripedBackoffMonitor | | | hadoop.hdfs.TestDecommission | | | hadoop.hdfs.TestDFSClientRetries | | | hadoop.hdfs.TestStripedFileAppend | | | hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting | | | hadoop.hdfs.server.sps.TestExternalStoragePolicySatisfier | | | hadoop.hdfs.server.datanode.TestBPOfferService | | | hadoop.hdfs.TestEncryptionZonesWithKMS | | | hadoop.hdfs.TestReadWhileWriting | | | hadoop.hdfs.TestDistributedFileSystemWithECFile | | |
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148748#comment-17148748 ] Hadoop QA commented on HDFS-15446: -- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 2m 22s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} dupname {color} | {color:green} 0m 0s{color} | {color:green} No case conflicting files found. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 23m 0s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 50s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 16s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 17m 57s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 43s{color} | {color:green} trunk passed {color} | | {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue} 3m 9s{color} | {color:blue} Used deprecated FindBugs config; considering switching to SpotBugs. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 7s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 19s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 11s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 11s{color} | {color:green} the patch passed {color} | | {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange} 0m 49s{color} | {color:orange} hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 128 unchanged - 0 fixed = 129 total (was 128) {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 15s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 15m 11s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 39s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 21s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red}113m 23s{color} | {color:red} hadoop-hdfs in the patch passed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 36s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black}188m 20s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean | | | hadoop.hdfs.server.namenode.ha.TestPipelinesFailover | | | hadoop.hdfs.server.sps.TestExternalStoragePolicySatisfier | \\ \\ || Subsystem || Report/Notes || | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/PreCommit-HDFS-Build/29467/artifact/out/Dockerfile | | JIRA Issue | HDFS-15446 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/13006746/HDFS-15446.001.patch | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux e6497ccbfe27 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | personality/hadoop.sh | | git revision | trunk / 4249c04d454 | | Default Java | Private
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148511#comment-17148511 ] Srinivasu Majeti commented on HDFS-15446: - Hi [~sodonnell], Thank for picking current Jira . Do we need to review delete snapshot operation as well and anything else to be fixed similar ? > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-15446) CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with error java.io.FileNotFoundException: Directory does not exist: /.reserved/raw/path
[ https://issues.apache.org/jira/browse/HDFS-15446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148505#comment-17148505 ] Stephen O'Donnell commented on HDFS-15446: -- The reason this happens, is because the edit loading code uses the internal call `FSDirectory.getINodesInPath()`, which does not full resolve the path. Infact, from the java doc it says: {quote} /** * Resolves the given path into inodes. Reserved paths are not handled and * permissions are not verified. Client supplied paths should be * resolved via {@link #resolvePath(FSPermissionChecker, String, DirOp)}. * This method should only be used by internal methods. {quote} The solution is to use `FSDirectory.resolvePath()` as indicated above. > CreateSnapshotOp fails during edit log loading for /.reserved/raw/path with > error java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/path > --- > > Key: HDFS-15446 > URL: https://issues.apache.org/jira/browse/HDFS-15446 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs >Affects Versions: 3.2.0, 3.3.0 >Reporter: Srinivasu Majeti >Assignee: Stephen O'Donnell >Priority: Major > Labels: reserved-word, snapshot > > After allowing snapshot creation for a path say /app-logs , when we try to > create snapshot on > /.reserved/raw/app-logs , its successful with snapshot creation but later > when Standby Namenode is restarted and tries to load the edit record > OP_CREATE_SNAPSHOT , we see it failing and Standby Namenode shuts down with > an exception "ava.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs" . > Here are the steps to reproduce : > {code:java} > # hdfs dfs -ls /.reserved/raw/ > Found 15 items > drwxrwxrwt - yarn hadoop 0 2020-06-29 10:27 > /.reserved/raw/app-logs > drwxr-xr-x - hive hadoop 0 2020-06-29 10:29 /.reserved/raw/prod > ++ > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /app-logs > Allowing snapshot on /app-logs succeeded > [root@c3230-node2 ~]# hdfs dfsadmin -allowSnapshot /prod > Allowing snapshot on /prod succeeded > ++ > # hdfs lsSnapshottableDir > drwxrwxrwt 0 yarn hadoop 0 2020-06-29 10:27 1 65536 /app-logs > drwxr-xr-x 0 hive hadoop 0 2020-06-29 10:29 1 65536 /prod > ++ > [root@c3230-node2 ~]# hdfs dfs -createSnapshot /.reserved/raw/app-logs testSS > Created snapshot /.reserved/raw/app-logs/.snapshot/testSS > {code} > Exception we see in Standby namenode while loading the snapshot creation edit > record. > {code:java} > 2020-06-29 10:33:25,488 ERROR namenode.NameNode (NameNode.java:main(1715)) - > Failed to start namenode. > java.io.FileNotFoundException: Directory does not exist: > /.reserved/raw/app-logs > at > org.apache.hadoop.hdfs.server.namenode.INodeDirectory.valueOf(INodeDirectory.java:60) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.getSnapshottableRoot(SnapshotManager.java:259) > at > org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager.createSnapshot(SnapshotManager.java:307) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:772) > at > org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:257) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org