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

Kai Zheng commented on HDFS-9694:
---------------------------------

Hi [~andrew.wang], the reported findbugs were introduced by the following code 
block. I'm wondering how to avoid them but meanwhile not to complicate the 
simple {{struct}} like class. Could you give a hint? Thanks.
{code}
+  public StripedBlockInfo(ExtendedBlock block, DatanodeInfo[] datanodes,
+                          Token<BlockTokenIdentifier>[] blockTokens,
+                          ErasureCodingPolicy ecPolicy) {
+    this.block = block;
+    this.datanodes = datanodes;
+    this.blockTokens = blockTokens;
+    this.ecPolicy = ecPolicy;
+  }
+
+  public ExtendedBlock getBlock() {
+    return block;
+  }
+
+  public DatanodeInfo[] getDatanodes() {
+    return datanodes;
+  }
+
+  public Token<BlockTokenIdentifier>[] getBlockTokens() {
+    return blockTokens;
+  }
+
+  public ErasureCodingPolicy getErasureCodingPolicy() {
+    return ecPolicy;
+  }
+}
{code}

> Make existing DFSClient#getFileChecksum() work for striped blocks
> -----------------------------------------------------------------
>
>                 Key: HDFS-9694
>                 URL: https://issues.apache.org/jira/browse/HDFS-9694
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Kai Zheng
>            Assignee: Kai Zheng
>         Attachments: HDFS-9694-v1.patch, HDFS-9694-v2.patch, 
> HDFS-9694-v3.patch, HDFS-9694-v4.patch
>
>
> This is a sub-task of HDFS-8430 and will get the existing API 
> {{FileSystem#getFileChecksum(path)}} work for striped files. It will also 
> refactor existing codes and layout basic work for subsequent tasks like 
> support of the new API proposed there.



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

Reply via email to