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

Masatake Iwasaki commented on HDFS-9576:
----------------------------------------

Thanks for working on this, [~zhz]. I tried the 01 patch and checked that the 
annotations are properly set in spans.

{code}
@@ -209,7 +209,7 @@ protected TraceScope createWriteTraceScope() {
   private void writeChecksumChunks(byte b[], int off, int len)
   throws IOException {
     sum.calculateChunkedSums(b, off, len, checksum, 0);
-    TraceScope scope = createWriteTraceScope();
+    TraceScope scope = createWriteTraceScope(len);
{code}

The {{len}} of "DFSOutputStream#write" span is basically size of internal 
buffer of FSOutputSummer and constant (4608) most of the time. Do you have 
specific usecase for this?

For read, if the length is useful, recording the number of bytes actually read 
(which is return value of read) as annotation might be helpful too.


> HTrace: collect path/offset/length information on read and write operations
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-9576
>                 URL: https://issues.apache.org/jira/browse/HDFS-9576
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client, tracing
>    Affects Versions: 2.7.1
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HDFS-9576.00.patch, HDFS-9576.01.patch
>
>




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

Reply via email to