hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhe Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8550) Erasure Coding: Fix FindBugs Multithreaded correctness Warning
Date Thu, 17 Sep 2015 21:37:04 GMT

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

Zhe Zhang commented on HDFS-8550:
---------------------------------

Thanks Rakesh! The fixes look good except for the following questions / suggestions:
{code}
-      if (b.isStriped()) {
+      if (b.isStriped() && b instanceof LocatedStripedBlock) {
{code}

Better be:
{code}
if (b.isStriped()) {
  Preconditions.checkState(b instanceof LocatedStripedBlock);
}
{code}

{{int bufOffset = (int) (rangeStartInBlockGroup % ((long) cellSize * dataBlkNum));}}: should
it be {{(long)(cellSize * dataBlkNum)}}?

{{synchronized (DFSStripedInputStream.this)}} maybe {{synchronized (curStripeBuf)}} is more
explicit?

> Erasure Coding: Fix FindBugs Multithreaded correctness Warning
> --------------------------------------------------------------
>
>                 Key: HDFS-8550
>                 URL: https://issues.apache.org/jira/browse/HDFS-8550
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>         Attachments: HDFS-8550-HDFS-7285-00.patch, HDFS-8550-HDFS-7285-01.patch
>
>
> Please find the findbug warnings [report|https://builds.apache.org/job/PreCommit-HDFS-Build/12444/artifact/patchprocess/patchFindbugsWarningshadoop-hdfs.html]
> 1) {code}
> Bug type IS2_INCONSISTENT_SYNC (click for details) 
> In class org.apache.hadoop.hdfs.DFSStripedInputStream
> Field org.apache.hadoop.hdfs.DFSStripedInputStream.curStripeBuf
> Synchronized 90% of the time
> Unsynchronized access at DFSStripedInputStream.java:[line 829]
> Synchronized access at DFSStripedInputStream.java:[line 183]
> Synchronized access at DFSStripedInputStream.java:[line 186]
> Synchronized access at DFSStripedInputStream.java:[line 184]
> Synchronized access at DFSStripedInputStream.java:[line 382]
> Synchronized access at DFSStripedInputStream.java:[line 460]
> Synchronized access at DFSStripedInputStream.java:[line 461]
> Synchronized access at DFSStripedInputStream.java:[line 461]
> Synchronized access at DFSStripedInputStream.java:[line 285]
> Synchronized access at DFSStripedInputStream.java:[line 297]
> Synchronized access at DFSStripedInputStream.java:[line 298]
> {code}
> 2) 
> {code}
> Unread field: org.apache.hadoop.hdfs.DFSStripedInputStream$BlockReaderInfo.targetBlock
> Bug type URF_UNREAD_FIELD (click for details) 
> In class org.apache.hadoop.hdfs.DFSStripedInputStream$BlockReaderInfo
> Field org.apache.hadoop.hdfs.DFSStripedInputStream$BlockReaderInfo.targetBlock
> At DFSStripedInputStream.java:[line 126]
> {code}
> 3) 
> {code}
> Unchecked/unconfirmed cast from org.apache.hadoop.hdfs.protocol.LocatedBlock to org.apache.hadoop.hdfs.protocol.LocatedStripedBlock
in org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.setBlockToken(LocatedBlock,
BlockTokenIdentifier$AccessMode)
> Bug type BC_UNCONFIRMED_CAST (click for details) 
> In class org.apache.hadoop.hdfs.server.blockmanagement.BlockManager
> In method org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.setBlockToken(LocatedBlock,
BlockTokenIdentifier$AccessMode)
> Actual type org.apache.hadoop.hdfs.protocol.LocatedBlock
> Expected org.apache.hadoop.hdfs.protocol.LocatedStripedBlock
> Value loaded from b
> At BlockManager.java:[line 974]
> {code}
> 4) 
> {code}
> Result of integer multiplication cast to long in org.apache.hadoop.hdfs.util.StripedBlockUtil.divideOneStripe(ErasureCodingPolicy,
int, LocatedStripedBlock, long, long, ByteBuffer)
> Bug type ICAST_INTEGER_MULTIPLY_CAST_TO_LONG (click for details) 
> In class org.apache.hadoop.hdfs.util.StripedBlockUtil
> In method org.apache.hadoop.hdfs.util.StripedBlockUtil.divideOneStripe(ErasureCodingPolicy,
int, LocatedStripedBlock, long, long, ByteBuffer)
> At StripedBlockUtil.java:[line 375]
> {code}



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

Mime
View raw message