hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8117) More accurate verification in SimulatedFSDataset: replace DEFAULT_DATABYTE with patterned data
Date Fri, 10 Apr 2015 01:05:13 GMT

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

Kai Zheng commented on HDFS-8117:
---------------------------------

bq.I haven't decided to verify the entire block or only part of it
Sorry to clarify, what I meant is, to wrap the mentioned block of codes in a method, maybe
something like below:
{code}
public static byte simulatedBytes(Block b, long offsetInBlk, long len, byte[] buffer, long
offsetInBuffer)  {
      for (int i = 0; i < len; ++i) {
           byte firstByte = (byte) (b.getBlockId() % Byte.MAX_VALUE);
           buffer[offsetInBuffer + i] = (byte) ((firstByte + offsetInBlk) % Byte.MAX_VALUE);
      }
 }
{code}

> More accurate verification in SimulatedFSDataset: replace DEFAULT_DATABYTE with patterned
data
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8117
>                 URL: https://issues.apache.org/jira/browse/HDFS-8117
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HDFS-8117.000.patch, HDFS-8117.001.patch
>
>
> Currently {{SimulatedFSDataset}} uses a single {{DEFAULT_DATABYTE}} to simulate _all_
block content. This is not accurate because the return of this byte just means the read request
has hit an arbitrary position in an arbitrary simulated block.
> This JIRA aims to improve it with a more accurate verification. When position {{p}} of
a simulated block {{b}} is accessed, the returned byte is {{b}}'s block ID plus {{p}}, moduled
by the max value of a byte.



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

Mime
View raw message