hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taeho Kang" <tka...@gmail.com>
Subject Re: Hadoop C/C++ API : hdfsListDirectory and freehdfsFileInfo
Date Mon, 08 Oct 2007 05:43:06 GMT
Yes, you're right, Avinash.
Thank you.

p.s. Can someone please fix API comments in hdfs.h file in the next release?

On 10/8/07, Avinash Lakshman <alakshman@facebook.com> wrote:
>
> I believe it is hdfsFreeFileInfo().
>
> Avinash
>
> -----Original Message-----
> From: Taeho Kang [mailto:tkang1@gmail.com]
> Sent: Sunday, October 07, 2007 10:25 PM
> To: hadoop-user@lucene.apache.org
> Subject: Hadoop C/C++ API : hdfsListDirectory and freehdfsFileInfo
>
> Hello all,
>
> I am using Hadoop C/C++ API with API definitions found hdfs.h
> In comments for hdfsListDirectory function, there is a line "Get list of
> files/directories for a given directory-path. freehdfsFileInfo should be
> called to deallocate memory." However, there is no freehdfsFileInfo
> found
> anywhere.
>
> Or can I just free the memory allocated by hdfsListDirectory function?
>
> Thank you in advance,
>
> Taeho
>
> p.s. Here is the function API for hdfsListDirectory
>
>     /**
>      * hdfsListDirectory - Get list of files/directories for a given
>      * directory-path. freehdfsFileInfo 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.
>      */
>     hdfsFileInfo *hdfsListDirectory(hdfsFS fs, const char* path,
>                                     int *numEntries);
>
>
>
> --
> Taeho Kang [tkang.blogspot.com]
>



-- 
Taeho Kang [tkang.blogspot.com]
Software Engineer, NHN Corporation, Korea

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message