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

Colin Patrick McCabe commented on HDFS-4214:
--------------------------------------------

I doubt that {{EditLogInputStream#getPosition}} could break without a huge 
number of edit log unit tests breaking.  At a minimum, nearly all of the 
recovery mode tests, a lot of the HA tests, and a bunch of other miscellaneous 
stuff would fail to work if we got the stream position wrong after an error.

However, we could file a JIRA for adding a test of 
{{EditLogInputStream#getPosition}} in {{TestEditLog}}.  Such a test should use 
a pre-calculated sequence of bytes, so that it doesn't break whenever the edit 
log format changes slightly (which happens often.)
                
> OfflineEditsViewer should print out the offset at which it encountered an 
> error
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-4214
>                 URL: https://issues.apache.org/jira/browse/HDFS-4214
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: tools
>    Affects Versions: 2.0.3-alpha
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Trivial
>             Fix For: 2.0.3-alpha
>
>         Attachments: HDFS-4214.001.patch
>
>
> OfflineEditsViewer should print out the offset at which it encountered an 
> error.  This helps developers or users debug problems with loading malformed 
> logs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to