[
https://issues.apache.org/jira/browse/HDFS-8762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14654327#comment-14654327
]
Zhe Zhang commented on HDFS-8762:
---------------------------------
Thanks Bo for the work and Walter for the comment.
# I don't think we should change {{createSocketForPipeline}} and other static
elements to non-static. Being {{static}} means that we don't need an instance
of {{DataStreamer}} to call the methods. Then why do we need to know the
streamer ID in debugging? For example, {{createSocketForPipeline}} only creates
a socket to a given DN. Some other logic (such as {{createBlockOutputStream}})
will associate it with a streamer, and that's where we should print streamer ID.
# Adding a trivial {{logString}} method in {{DataStreamer}} looks a little
awkward. Appending {{this}} to every log message (as Walter suggested) is fine
for {{debug}} but too much for {{info}}. How about similar to Walter's
suggestion, but append {{this.appendToLog()}} instead of {{this}}? Then
{{StripedDataStreamer}} can override {{appendToLog}}. This is similar to
{{Block#appendStringTo}}.
> Erasure Coding: the log of each streamer should show its index
> --------------------------------------------------------------
>
> Key: HDFS-8762
> URL: https://issues.apache.org/jira/browse/HDFS-8762
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Li Bo
> Assignee: Li Bo
> Attachments: HDFS-8762-HDFS-7285-001.patch,
> HDFS-8762-HDFS-7285-002.patch
>
>
> The log in {{DataStreamer}} doesn't show which streamer it's generated from.
> In order to make log information more convenient for debugging, each log
> should include the index of the streamer it's generated from.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)