hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takanobu Asanuma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11179) LightWeightHashSet can't remove blocks correctly which have a large number blockId
Date Mon, 28 Nov 2016 03:55:58 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15700826#comment-15700826
] 

Takanobu Asanuma commented on HDFS-11179:
-----------------------------------------

When a blockId is a large number, this method doesn't remove the block correctly.
{code:title=LightWeightHashSet.java}
protected LinkedElement<T> removeElem(final T key) {
  LinkedElement<T> found = null;
  final int hashCode = key.hashCode();
  final int index = getIndex(hashCode);
  if (entries[index] == null) {
    return null;
{code}

> LightWeightHashSet can't remove blocks correctly which have a large number blockId
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-11179
>                 URL: https://issues.apache.org/jira/browse/HDFS-11179
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Takanobu Asanuma
>            Assignee: Takanobu Asanuma
>            Priority: Blocker
>
> Our test cluster has faced a problem that {{postponedMisreplicatedBlocksCount}} has been
going below zero. The version of the cluster is a recent 3.0. We haven't created any EC files
yet. This is the NN's log:
> {noformat}
> Rescan of postponedMisreplicatedBlocks completed in 13 msecs. 448 blocks are left. 176
blocks are removed.
> Rescan of postponedMisreplicatedBlocks completed in 13 msecs. 272 blocks are left. 176
blocks are removed.
> Rescan of postponedMisreplicatedBlocks completed in 14 msecs. 96 blocks are left. 176
blocks are removed.
> Rescan of postponedMisreplicatedBlocks completed in 327 msecs. -77 blocks are left. 177
blocks are removed.
> Rescan of postponedMisreplicatedBlocks completed in 15 msecs. -253 blocks are left. 179
blocks are removed.
> Rescan of postponedMisreplicatedBlocks completed in 14 msecs. -432 blocks are left. 179
blocks are removed.
> {noformat}
> I looked into this issue and found that it is caused by {{LightWeightHashSet}} which
is used for {{postponedMisreplicatedBlocks}} recently. When {{LightWeightHashSet}} remove
blocks which have a large number blockId, overflows happen and the blocks can't be removed
correctly(, let alone ec blocks whose blockId starts with the minimum of long).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message