You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2018/11/26 12:58:00 UTC
[jira] [Commented] (HADOOP-15949) open(PathHandle) spec and
implementations ambiguous about what to raise when path is deleted
[ https://issues.apache.org/jira/browse/HADOOP-15949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16698886#comment-16698886 ]
Steve Loughran commented on HADOOP-15949:
-----------------------------------------
stack you can get on HDFS with a new test in HADOOP-15229. Raw Local *always* throws FNFE; HDFS's stack depends on when the failure is detected. But catching {{InvalidPathHandleException}} and converting to FNFE in the {{DFSClient.open()}} call is potentially dangers.
Either {{HdfsPathHandle.verify}} is modified to raise FNFE when the stat fails, or the spec is left open as to which is raised
{code}
org.apache.hadoop.fs.InvalidPathHandleException: Could not resolve handle
at org.apache.hadoop.hdfs.protocol.HdfsPathHandle.verify(HdfsPathHandle.java:70)
at org.apache.hadoop.hdfs.DFSClient.open(DFSClient.java:1041)
at org.apache.hadoop.hdfs.DistributedFileSystem.open(DistributedFileSystem.java:353)
at org.apache.hadoop.fs.FileSystem.openFileWithOptions(FileSystem.java:4392)
at org.apache.hadoop.fs.FileSystem$FSDataInputStreamBuilder.build(FileSystem.java:4451)
at org.apache.hadoop.fs.contract.AbstractContractPathHandleTest.testOpenFileDelete(AbstractContractPathHandleTest.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
{code}
> open(PathHandle) spec and implementations ambiguous about what to raise when path is deleted
> --------------------------------------------------------------------------------------------
>
> Key: HADOOP-15949
> URL: https://issues.apache.org/jira/browse/HADOOP-15949
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 3.1.1
> Reporter: Steve Loughran
> Priority: Minor
>
> It's not clear exactly what exception must be raised if the file referenced by a path handle is deleted in the interval between the path handle being created and it being opened.
> For reference
> * RawLocalFileSystem: FileNotFoundException, either in getFileStatus or the File.open() call.
> * HDFS: varies between FNFE and InvalidPathHandleException
> Having experimented with it, it's hard to make them consistent —and we don't know what other implementations may do. Probably best to say "may throw either"
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org