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 kartheek muthyala <ka...@gmail.com> on 2011/11/29 13:37:14 UTC
blockID generation
Hi all,
I am interested in exploring how the blockID is generated in hadoop world
by the namenode. Any pointers to the class/method which takes care of this
generation?
Thanks in advance,
~Kartheek.
Re: blockID generation
Posted by Harsh J <ha...@cloudera.com>.
Kartheek,
(- hdfs-user (bcc'd))
Its simple enough to trace back a FileSystem -> DFSClient -> NameNode call in code, for the operation of creating a file (and thereafter a block).
What you are looking for, specifically, is in FSNamesystem#allocateBlock(…).
On 29-Nov-2011, at 6:07 PM, kartheek muthyala wrote:
> Hi all,
> I am interested in exploring how the blockID is generated in hadoop world by the namenode. Any pointers to the class/method which takes care of this generation?
> Thanks in advance,
> ~Kartheek.
Re: blockID generation
Posted by kartheek muthyala <ka...@gmail.com>.
Thanks you all for the reply.
~Kartheek
On Tue, Nov 29, 2011 at 6:30 PM, Uma Maheswara Rao G
<ma...@huawei.com>wrote:
> you can find the code directly in FSNameSystem#allocateBlock
> It is just a random long number and will ensure that blockid is not
> created already by NN.
> Regards,
> Uma
> ________________________________________
> From: kartheek muthyala [kartheek0274@gmail.com]
> Sent: Tuesday, November 29, 2011 6:07 PM
> To: hdfs-dev@hadoop.apache.org; hdfs-user
> Subject: blockID generation
>
> Hi all,
> I am interested in exploring how the blockID is generated in hadoop world
> by the namenode. Any pointers to the class/method which takes care of this
> generation?
> Thanks in advance,
> ~Kartheek.
>
Re: blockID generation
Posted by kartheek muthyala <ka...@gmail.com>.
Thanks you all for the reply.
~Kartheek
On Tue, Nov 29, 2011 at 6:30 PM, Uma Maheswara Rao G
<ma...@huawei.com>wrote:
> you can find the code directly in FSNameSystem#allocateBlock
> It is just a random long number and will ensure that blockid is not
> created already by NN.
> Regards,
> Uma
> ________________________________________
> From: kartheek muthyala [kartheek0274@gmail.com]
> Sent: Tuesday, November 29, 2011 6:07 PM
> To: hdfs-dev@hadoop.apache.org; hdfs-user
> Subject: blockID generation
>
> Hi all,
> I am interested in exploring how the blockID is generated in hadoop world
> by the namenode. Any pointers to the class/method which takes care of this
> generation?
> Thanks in advance,
> ~Kartheek.
>
RE: blockID generation
Posted by Uma Maheswara Rao G <ma...@huawei.com>.
you can find the code directly in FSNameSystem#allocateBlock
It is just a random long number and will ensure that blockid is not created already by NN.
Regards,
Uma
________________________________________
From: kartheek muthyala [kartheek0274@gmail.com]
Sent: Tuesday, November 29, 2011 6:07 PM
To: hdfs-dev@hadoop.apache.org; hdfs-user
Subject: blockID generation
Hi all,
I am interested in exploring how the blockID is generated in hadoop world
by the namenode. Any pointers to the class/method which takes care of this
generation?
Thanks in advance,
~Kartheek.
RE: blockID generation
Posted by Uma Maheswara Rao G <ma...@huawei.com>.
you can find the code directly in FSNameSystem#allocateBlock
It is just a random long number and will ensure that blockid is not created already by NN.
Regards,
Uma
________________________________________
From: kartheek muthyala [kartheek0274@gmail.com]
Sent: Tuesday, November 29, 2011 6:07 PM
To: hdfs-dev@hadoop.apache.org; hdfs-user
Subject: blockID generation
Hi all,
I am interested in exploring how the blockID is generated in hadoop world
by the namenode. Any pointers to the class/method which takes care of this
generation?
Thanks in advance,
~Kartheek.
Re: blockID generation
Posted by Harsh J <ha...@cloudera.com>.
Kartheek,
(- hdfs-user (bcc'd))
Its simple enough to trace back a FileSystem -> DFSClient -> NameNode call in code, for the operation of creating a file (and thereafter a block).
What you are looking for, specifically, is in FSNamesystem#allocateBlock(…).
On 29-Nov-2011, at 6:07 PM, kartheek muthyala wrote:
> Hi all,
> I am interested in exploring how the blockID is generated in hadoop world by the namenode. Any pointers to the class/method which takes care of this generation?
> Thanks in advance,
> ~Kartheek.