Selwa, You are *creating* a new BlocksMap with the first line. It is NOT an API to get the blockmap from the namenode. The Namenode stores its blocks in a Blockmap in the BlockManager (for 0.23) or FSNameSystem (for 0.20)
Which version are you using? Regards, Ravi. On Sat, Feb 11, 2012 at 7:41 PM, Selwa <elhama...@gmail.com> wrote: > Hello there, > currently i am working on research about the block placement policy of > HDFS. > I want to find the blocks mapping of the pseudo cluster. > then i request the name node for this data structure by the following code > > BlocksMap blocksMap = new BlocksMap(16, 0.75f); > Collection<BlockInfo>blocks = blocksMap.getBlocks(); > but the collection does not hold any thing - always it is > empty > blocks.isempty() is becoming true even i saved some files on > the pseudo -cluster. > what is wrong with this code? > is there any other way to find block mapping? > > thanks > > Selwa > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/datanode-to-blocks-mapping-tp3736421p3736421.html > Sent from the Hadoop lucene-dev mailing list archive at Nabble.com. >