[ https://issues.apache.org/jira/browse/HDFS-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410570#comment-13410570 ]
Colin Patrick McCabe commented on HDFS-923: ------------------------------------------- If the problem is that hdfs_read is wrong, shouldn't we just fix hdfs_read.c? If the issue is that you think a readFully method would be a nice thing to have, why not file a JIRA with that description, and then implement (and document) hdfsReadFully? In any case, we should not change the original hdfsRead method. > libhdfs hdfs_read example uses hdfsRead wrongly > ----------------------------------------------- > > Key: HDFS-923 > URL: https://issues.apache.org/jira/browse/HDFS-923 > Project: Hadoop HDFS > Issue Type: Bug > Components: libhdfs > Reporter: Ruyue Ma > Assignee: Ruyue Ma > Attachments: hdfs-923.patch > > > In the examples of libhdfs, the hdfs_read.c uses hdfsRead wrongly. > {noformat} > // read from the file > tSize curSize = bufferSize; > for (; curSize == bufferSize;) { > curSize = hdfsRead(fs, readFile, (void*)buffer, curSize); > } > {noformat} > the condition curSize == bufferSize has problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira