triplets[i%3] is used to store the reference of datanode where the block replica is stored.
The datanode maintains a link list of blocks. The next two object entries are used for storing the next and previous block references of link list for that datanode. This organization is done to reduce the memory used for storing the link list. On 7/15/10 9:20 AM, "André Oriani" <ra078...@students.ic.unicamp.br> wrote: Hi, I am studying how block reports are processed, but I am not sure if I understood how BlockInfo::triplets are used by DatanodeDescriptors and BlocksMap. That's what I understood: For each Block, triplets[i] with i%3==0, gives the datanodes that are storing the block. New datanodes are inserted in the end of array. triplests[i+1] and triplets[i+2] are respectively the previous and next blocks of the current one in the linked list of blocks held by datanode triplets[i]. DatanodeDescriptor::blockList is actually is the head node of the list. Is it correct ? Thanks, André