[jira] [Commented] (HADOOP-15101) what testListStatusFile verified not consistent with listStatus declaration in FileSystem

2017-12-15 Thread Steve Loughran (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-15101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16292609#comment-16292609
 ] 

Steve Loughran commented on HADOOP-15101:
-

No. Not until you are confident that it is wrong.

The test is considered correct, in that listStatus(file), returns 
[status-of-file]. The test is executed by HDFS, which is the normative source 
of what things are meant to do.

This test is consistent with what we say in filesystem.md. Therefore I consider 
filesystem.md to be valid
```

If `path` refers to a file and the filter accepts it,
then that file's `FileStatus` entry is returned in a single-element array.

If the path refers to a directory, the call returns a list of all its immediate
child paths which are accepted by the filter —and does not include the directory
itself.
```
If there is confusion, it's in the javadocs. 

bq. Will the details in filesystem.md be add to FileSystem.java? At least add a 
link to filesystem.md.

there's one [right at the top of the 
javadocs|https://hadoop.apache.org/docs/r3.0.0/api/index.html].

> what testListStatusFile verified not consistent with listStatus declaration 
> in FileSystem
> ---
>
> Key: HADOOP-15101
> URL: https://issues.apache.org/jira/browse/HADOOP-15101
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: fs, test
>Affects Versions: 3.0.0-beta1
>Reporter: zhoutai.zt
>Priority: Critical
>
> {code}
>   @Test
>   public void testListStatusFile() throws Throwable {
> describe("test the listStatus(path) on a file");
> Path f = touchf("liststatusfile");
> verifyStatusArrayMatchesFile(f, getFileSystem().listStatus(f));
>   }
> {code}
> In this case, first create a file _f_, then listStatus on _f_,expect 
> listStatus returns an array of one FileStatus. But this is not consistent 
> with the declarations in FileSystem, i.e.
> {code}
> " 
> List the statuses of the files/directories in the given path if the path is a 
> directory.
> Parameters:
> f given path
> Returns:
> the statuses of the files/directories in the given patch
> "
> {code}
> Which is the expected? The behave in fs contract test or in FileSystem?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-15101) what testListStatusFile verified not consistent with listStatus declaration in FileSystem

2017-12-14 Thread Ajay Kumar (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-15101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16291482#comment-16291482
 ] 

Ajay Kumar commented on HADOOP-15101:
-

[~zhoutai.zt], We can update 
{{hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md}}.

> what testListStatusFile verified not consistent with listStatus declaration 
> in FileSystem
> ---
>
> Key: HADOOP-15101
> URL: https://issues.apache.org/jira/browse/HADOOP-15101
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: fs, test
>Affects Versions: 3.0.0-beta1
>Reporter: zhoutai.zt
>Priority: Critical
>
> {code}
>   @Test
>   public void testListStatusFile() throws Throwable {
> describe("test the listStatus(path) on a file");
> Path f = touchf("liststatusfile");
> verifyStatusArrayMatchesFile(f, getFileSystem().listStatus(f));
>   }
> {code}
> In this case, first create a file _f_, then listStatus on _f_,expect 
> listStatus returns an array of one FileStatus. But this is not consistent 
> with the declarations in FileSystem, i.e.
> {code}
> " 
> List the statuses of the files/directories in the given path if the path is a 
> directory.
> Parameters:
> f given path
> Returns:
> the statuses of the files/directories in the given patch
> "
> {code}
> Which is the expected? The behave in fs contract test or in FileSystem?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-15101) what testListStatusFile verified not consistent with listStatus declaration in FileSystem

2017-12-08 Thread zhoutai.zt (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-15101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284550#comment-16284550
 ] 

zhoutai.zt commented on HADOOP-15101:
-

Thanks Steve Loughran. Will the details in filesystem.md be add to 
FileSystem.java? At least add a link to filesystem.md.

> what testListStatusFile verified not consistent with listStatus declaration 
> in FileSystem
> ---
>
> Key: HADOOP-15101
> URL: https://issues.apache.org/jira/browse/HADOOP-15101
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: fs, test
>Affects Versions: 3.0.0-beta1
>Reporter: zhoutai.zt
>Priority: Critical
>
> {code}
>   @Test
>   public void testListStatusFile() throws Throwable {
> describe("test the listStatus(path) on a file");
> Path f = touchf("liststatusfile");
> verifyStatusArrayMatchesFile(f, getFileSystem().listStatus(f));
>   }
> {code}
> In this case, first create a file _f_, then listStatus on _f_,expect 
> listStatus returns an array of one FileStatus. But this is not consistent 
> with the declarations in FileSystem, i.e.
> {code}
> " 
> List the statuses of the files/directories in the given path if the path is a 
> directory.
> Parameters:
> f given path
> Returns:
> the statuses of the files/directories in the given patch
> "
> {code}
> Which is the expected? The behave in fs contract test or in FileSystem?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-15101) what testListStatusFile verified not consistent with listStatus declaration in FileSystem

2017-12-08 Thread zhoutai.zt (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-15101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284546#comment-16284546
 ] 

zhoutai.zt commented on HADOOP-15101:
-

Where can I find the file filesystem.md?

> what testListStatusFile verified not consistent with listStatus declaration 
> in FileSystem
> ---
>
> Key: HADOOP-15101
> URL: https://issues.apache.org/jira/browse/HADOOP-15101
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: fs, test
>Affects Versions: 3.0.0-beta1
>Reporter: zhoutai.zt
>Priority: Critical
>
> {code}
>   @Test
>   public void testListStatusFile() throws Throwable {
> describe("test the listStatus(path) on a file");
> Path f = touchf("liststatusfile");
> verifyStatusArrayMatchesFile(f, getFileSystem().listStatus(f));
>   }
> {code}
> In this case, first create a file _f_, then listStatus on _f_,expect 
> listStatus returns an array of one FileStatus. But this is not consistent 
> with the declarations in FileSystem, i.e.
> {code}
> " 
> List the statuses of the files/directories in the given path if the path is a 
> directory.
> Parameters:
> f given path
> Returns:
> the statuses of the files/directories in the given patch
> "
> {code}
> Which is the expected? The behave in fs contract test or in FileSystem?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-15101) what testListStatusFile verified not consistent with listStatus declaration in FileSystem

2017-12-08 Thread Steve Loughran (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-15101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16283541#comment-16283541
 ] 

Steve Loughran commented on HADOOP-15101:
-

What you get should be that defined in filesystem.md, as taken from what HDFS 
does

> what testListStatusFile verified not consistent with listStatus declaration 
> in FileSystem
> ---
>
> Key: HADOOP-15101
> URL: https://issues.apache.org/jira/browse/HADOOP-15101
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: fs, test
>Affects Versions: 3.0.0-beta1
>Reporter: zhoutai.zt
>Priority: Critical
>
> {code}
>   @Test
>   public void testListStatusFile() throws Throwable {
> describe("test the listStatus(path) on a file");
> Path f = touchf("liststatusfile");
> verifyStatusArrayMatchesFile(f, getFileSystem().listStatus(f));
>   }
> {code}
> In this case, first create a file _f_, then listStatus on _f_,expect 
> listStatus returns an array of one FileStatus. But this is not consistent 
> with the declarations in FileSystem, i.e.
> {code}
> " 
> List the statuses of the files/directories in the given path if the path is a 
> directory.
> Parameters:
> f given path
> Returns:
> the statuses of the files/directories in the given patch
> "
> {code}
> Which is the expected? The behave in fs contract test or in FileSystem?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org