hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1855) fsck should verify block placement
Date Thu, 04 Oct 2007 22:49:50 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532542
] 

Konstantin Shvachko commented on HADOOP-1855:
---------------------------------------------

Our block placement policy is:
# Place first replica on the node originated the block allocation request if this client belong
to the cluster,
or on a random node if the client node is outside the cluster.
# Place second replica on a rack different from the rack of the first replica if available,
randomly otherwise.
# Place third replica on the rack of the first or the second replicas, if possible, randomly
otherwise.
# All subsequent replicas are placed randomly.

The problem of verifying this policy is that fsck gets block locations sorted according to
the proximity to
the client, which means that fsck does not know which replica was chosen first, which second,
and which third.
Depending on the rack distribution and the choices on each stage the 3 replicas of a block
can be placed on
two or three racks, both of which will be legal, but impossible to verify not knowing the
history of choices.

The minimal condition we can verify is that the block is replicated at least on 2 racks. Is
that enough?

I think it is. This is the guarantee that loss of a single rack will not result in data loss.
The second condition that the third copy is placed on one of the previous racks is just an
optimization -
an attempt to minimize network traffic across the racks during writes, and there is no need
to enforce
it after the write is complete.

Thus, fsck should verify that each block is replicated on at least two racks if there is more
than one rack in the system.
Does it work for balancing?

> fsck should verify block placement
> ----------------------------------
>
>                 Key: HADOOP-1855
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1855
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: dhruba borthakur
>
> fsck currently detects missing and under-replicated blocks. It would be helpful if it
can also detect blocks that do not conform to the block placement policy. An administrator
can use this tool to verify that blocks are distributed across racks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message