You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Demai Ni <ni...@gmail.com> on 2014/09/03 23:20:31 UTC

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

Re: question about matching java API with libHDFS

Posted by Demai Ni <ni...@gmail.com>.
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...@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:nidmgg@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
>

Re: question about matching java API with libHDFS

Posted by Demai Ni <ni...@gmail.com>.
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...@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:nidmgg@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
>

Re: question about matching java API with libHDFS

Posted by Demai Ni <ni...@gmail.com>.
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...@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:nidmgg@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
>

Re: question about matching java API with libHDFS

Posted by Demai Ni <ni...@gmail.com>.
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...@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:nidmgg@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
>

RE: question about matching java API with libHDFS

Posted by "Liu, Yi A" <yi...@intel.com>.
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:nidmgg@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

RE: question about matching java API with libHDFS

Posted by "Liu, Yi A" <yi...@intel.com>.
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:nidmgg@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

RE: question about matching java API with libHDFS

Posted by "Liu, Yi A" <yi...@intel.com>.
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:nidmgg@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

RE: question about matching java API with libHDFS

Posted by "Liu, Yi A" <yi...@intel.com>.
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:nidmgg@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