[ 
https://issues.apache.org/jira/browse/HDFS-8407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14560138#comment-14560138
 ] 

Hadoop QA commented on HDFS-8407:
---------------------------------

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | pre-patch |   5m 16s | Pre-patch trunk compilation is 
healthy. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any 
@author tags. |
| {color:green}+1{color} | tests included |   0m  0s | The patch appears to 
include 1 new or modified test files. |
| {color:green}+1{color} | javac |   7m 40s | There were no new javac warning 
messages. |
| {color:green}+1{color} | release audit |   0m 21s | The applied patch does 
not increase the total number of release audit warnings. |
| {color:green}+1{color} | whitespace |   0m  0s | The patch has no lines that 
end in whitespace. |
| {color:green}+1{color} | install |   1m 33s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 32s | The patch built with 
eclipse:eclipse. |
| {color:green}+1{color} | native |   1m  8s | Pre-build of native portion |
| {color:red}-1{color} | hdfs tests | 162m 38s | Tests failed in hadoop-hdfs. |
| | | 179m 21s | |
\\
\\
|| Reason || Tests ||
| Failed unit tests | hadoop.hdfs.server.balancer.TestBalancer |
| Timed out tests | org.apache.hadoop.hdfs.server.namenode.TestEditLog |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12734001/HDFS-8407.003.patch |
| Optional Tests | javac unit |
| git revision | trunk / 7dba700 |
| hadoop-hdfs test log | 
https://builds.apache.org/job/PreCommit-HDFS-Build/11131/artifact/patchprocess/testrun_hadoop-hdfs.txt
 |
| Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/11131/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/11131/console |


This message was automatically generated.

> libhdfs hdfsListDirectory() API has different behavior than documentation
> -------------------------------------------------------------------------
>
>                 Key: HDFS-8407
>                 URL: https://issues.apache.org/jira/browse/HDFS-8407
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: HDFS
>            Reporter: Juan Yu
>            Assignee: Masatake Iwasaki
>         Attachments: HDFS-8407.001.patch, HDFS-8407.002.patch, 
> HDFS-8407.003.patch
>
>
> The documentation says it returns NULL on error, but it could also return 
> NULL when the directory is empty.
>     /** 
>      * hdfsListDirectory - Get list of files/directories for a given
>      * directory-path. hdfsFreeFileInfo should be called to deallocate 
> memory. 
>      * @param fs The configured filesystem handle.
>      * @param path The path of the directory. 
>      * @param numEntries Set to the number of files/directories in path.
>      * @return Returns a dynamically-allocated array of hdfsFileInfo
>      * objects; NULL on error.
>      */
> {code}
>     hdfsFileInfo *pathList = NULL; 
>     ...
>     //Figure out the number of entries in that directory
>     jPathListSize = (*env)->GetArrayLength(env, jPathList);
>     if (jPathListSize == 0) {
>         ret = 0;
>         goto done;
>     }
>     ...
>     if (ret) {
>         hdfsFreeFileInfo(pathList, jPathListSize);
>         errno = ret;
>         return NULL;
>     }
>     *numEntries = jPathListSize;
>     return pathList;
> {code}
> Either change the implementation to match the doc, or fix the doc to match 
> the implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to