[
https://issues.apache.org/jira/browse/HDFS-9694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207611#comment-15207611
]
Kai Zheng commented on HDFS-9694:
---------------------------------
Hi [~umamaheswararao], thanks for the more review!
bq. Are you planning to have a flag to indicate striped or non striped modes
later? or you want to have separate flag itself?
Good question! In my early work I had a flag in the new
{{OpBlockGroupChecksumProto}} where I added the flag. The code was as follows.
{code}
+ @Override
+ public void blockGroupChecksum(StripedBlockInfo stripedBlockInfo,
+ Token<BlockTokenIdentifier> blockToken, int mode) throws IOException {
+ OpBlockGroupChecksumProto proto = OpBlockGroupChecksumProto.newBuilder()
+ .setHeader(DataTransferProtoUtil.buildBaseHeader(
+ stripedBlockInfo.getBlock(), blockToken))
+ .setDatanodes(PBHelperClient.convertToProto(
+ stripedBlockInfo.getDatanodes()))
+ .addAllBlockTokens(PBHelperClient.convert(
+ stripedBlockInfo.getBlockTokens()))
+ .setEcPolicy(PBHelperClient.convertErasureCodingPolicy(
+ stripedBlockInfo.getErasureCodingPolicy()))
+ .setMode(mode)
+ .build();
+
+ send(out, Op.BLOCK_GROUP_CHECKSUM, proto);
+ }
{code}
I guess I'd better incorporate the change in the patch to be in together, so we
may avoid the further change into the protocol. Sounds good?
bq. NonStripedBlockGroupChecksumComputer -->
BlockGroupNonStripedChecksumComputer is more consistent with
StripedFileNonStripedChecksumComputer?
Yeah, agree. Will do the change.
> 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, HDFS-9694-v5.patch,
> HDFS-9694-v6.patch, HDFS-9694-v7.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)