hi, Yi A, Thanks for your response. I took a look at hdfs.h and hdfs.c, it seems the lib only exposes some of APIs, as there are a lot of other public methods can be accessed through java API/client, but not implemented in libhdfs, such as the one I am using now: DFSclient.getNamenode(). getBlockLocations(...)..
Is the libhdfs designed to limit the access? Thanks Demai On Thu, Sep 4, 2014 at 2:36 AM, Liu, Yi A <yi.a....@intel.com> wrote: > You could refer to the header file: “src/main/native/libhdfs/hdfs.h”, > you could get the APIs in detail. > > > > Regards, > > Yi Liu > > > > *From:* Demai Ni [mailto:nid...@gmail.com] > *Sent:* Thursday, September 04, 2014 5:21 AM > *To:* user@hadoop.apache.org > *Subject:* question about matching java API with libHDFS > > > > hi, folks, > > I am currently using java to access HDFS. for example, I am using this API > " DFSclient.getNamenode().getBlockLocations(...)..." to retrieve file > block information. > > Now I need to move the same logic into C/C++. so I am looking at libHDFS, > and this wiki page: http://wiki.apache.org/hadoop/LibHDFS. And I am also > using the hdfs_test.c for some reference. However, I couldn't find a way to > easily figure out whether above Java API is exposed through libHDFS? > > Probably not, since I couldn't find it. Then, it lead to my next question. > Is there an easy way to plug in the libHDFS framework, to include additonal > API? > > thanks a lot for your suggestions > > Demai >