You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by stan lee <le...@gmail.com> on 2010/06/09 10:48:27 UTC

How to create a temporary HDFS file system using Java?

Hi Experts,

Although HDFS file system has exposed some APIs which can be used to create
directory, file, read and write data, can you tell me that whether there is
any API exposed to be used to create an HDFS file system in Java programe?

For example, I have two machines, one is namenode, the other one is
datanode, before using HDFS API to create/delete dir and read/write data
into distributed system, how can I create a tempory HDFS file system under
/home/stan/hdfs using Java? Is there any API or example to do this?

Thanks!
Stan

Re: How to create a temporary HDFS file system using Java?

Posted by Ted Yu <yu...@gmail.com>.
We developed some in-house tool to deploy hadoop/hbase to mini cluster and
carry performance evaluation on the cluster.

On Wed, Jun 9, 2010 at 8:54 AM, Patrick Angeles <pa...@cloudera.com>wrote:

> Hey Stan,
>
> There's really no way to programmatically spin up an HDFS cluster. What's
> your actual goal?
>
> Regards,
>
> - Patrick
>
> p.s., Thanks for all the great comix! ;-)
>
> On Wed, Jun 9, 2010 at 4:48 AM, stan lee <le...@gmail.com> wrote:
>
> > Hi Experts,
> >
> > Although HDFS file system has exposed some APIs which can be used to
> create
> > directory, file, read and write data, can you tell me that whether there
> is
> > any API exposed to be used to create an HDFS file system in Java
> programe?
> >
> > For example, I have two machines, one is namenode, the other one is
> > datanode, before using HDFS API to create/delete dir and read/write data
> > into distributed system, how can I create a tempory HDFS file system
> under
> > /home/stan/hdfs using Java? Is there any API or example to do this?
> >
> > Thanks!
> > Stan
> >
>

Re: How to create a temporary HDFS file system using Java?

Posted by Patrick Angeles <pa...@cloudera.com>.
Hey Stan,

There's really no way to programmatically spin up an HDFS cluster. What's
your actual goal?

Regards,

- Patrick

p.s., Thanks for all the great comix! ;-)

On Wed, Jun 9, 2010 at 4:48 AM, stan lee <le...@gmail.com> wrote:

> Hi Experts,
>
> Although HDFS file system has exposed some APIs which can be used to create
> directory, file, read and write data, can you tell me that whether there is
> any API exposed to be used to create an HDFS file system in Java programe?
>
> For example, I have two machines, one is namenode, the other one is
> datanode, before using HDFS API to create/delete dir and read/write data
> into distributed system, how can I create a tempory HDFS file system under
> /home/stan/hdfs using Java? Is there any API or example to do this?
>
> Thanks!
> Stan
>