You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by wei xu <sq...@gmail.com> on 2012/08/25 00:33:30 UTC

A question about the namenode's decision on the data placement of a new file

Hi,

I am doing some research on the data placement, but I am not quite familiar
with the Hadoop, is there any one who can tell me when a new file be added
into the HDFS, which function will be called by namenode to make a decision
on the allocation ( I mean, if there has a list of datanodes and the file
might be larger than 64MB, that is, several blocks may be included. What's
the function that decide the placement of those blocks to those datanode?)

Thanks for any help you provided!

Re: A question about the namenode's decision on the data placement of a new file

Posted by Le Hieu Hanh <le...@gmail.com>.
For 0.20 version, you should go to ReplicationTargetChooser which is called
from FSNamesystem.

Le Hieu Hanh


On Sat, Aug 25, 2012 at 9:00 AM, Vivi Lang <sq...@gmail.com> wrote:

> Thanks but I found that BlockPlacementPolicy only appear after 0.21.0? Is
> there any similar class or function appeared in 0.20.
>
>
> On Fri, Aug 24, 2012 at 6:03 PM, Andy Isaacson <ad...@cloudera.com> wrote:
>
> > On Fri, Aug 24, 2012 at 3:33 PM, wei xu <sq...@gmail.com> wrote:
> > > I am doing some research on the data placement, but I am not quite
> > familiar
> > > with the Hadoop, is there any one who can tell me when a new file be
> > added
> > > into the HDFS, which function will be called by namenode to make a
> > decision
> > > on the allocation ( I mean, if there has a list of datanodes and the
> file
> > > might be larger than 64MB, that is, several blocks may be included.
> > What's
> > > the function that decide the placement of those blocks to those
> > datanode?)
> >
> > You'll want to read BlockPlacementPolicy and its inheritors.
> >
> > -andy
> >
>

Re: A question about the namenode's decision on the data placement of a new file

Posted by Vivi Lang <sq...@gmail.com>.
Thanks but I found that BlockPlacementPolicy only appear after 0.21.0? Is
there any similar class or function appeared in 0.20.


On Fri, Aug 24, 2012 at 6:03 PM, Andy Isaacson <ad...@cloudera.com> wrote:

> On Fri, Aug 24, 2012 at 3:33 PM, wei xu <sq...@gmail.com> wrote:
> > I am doing some research on the data placement, but I am not quite
> familiar
> > with the Hadoop, is there any one who can tell me when a new file be
> added
> > into the HDFS, which function will be called by namenode to make a
> decision
> > on the allocation ( I mean, if there has a list of datanodes and the file
> > might be larger than 64MB, that is, several blocks may be included.
> What's
> > the function that decide the placement of those blocks to those
> datanode?)
>
> You'll want to read BlockPlacementPolicy and its inheritors.
>
> -andy
>

Re: A question about the namenode's decision on the data placement of a new file

Posted by Andy Isaacson <ad...@cloudera.com>.
On Fri, Aug 24, 2012 at 3:33 PM, wei xu <sq...@gmail.com> wrote:
> I am doing some research on the data placement, but I am not quite familiar
> with the Hadoop, is there any one who can tell me when a new file be added
> into the HDFS, which function will be called by namenode to make a decision
> on the allocation ( I mean, if there has a list of datanodes and the file
> might be larger than 64MB, that is, several blocks may be included. What's
> the function that decide the placement of those blocks to those datanode?)

You'll want to read BlockPlacementPolicy and its inheritors.

-andy