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

Brahma Reddy Battula commented on HDFS-10265:
---------------------------------------------

Following two testcases are failing after this in...Even above jenkins report 
shows this failures... will raise seperate jira to track this...

{noformat}
FAILED:  
org.apache.hadoop.hdfs.server.namenode.TestNamenodeRetryCache.testRetryCacheRebuild

Error Message:
expected:<25> but was:<26>

Stack Trace:
java.lang.AssertionError: expected:<25> but was:<26>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at 
org.apache.hadoop.hdfs.server.namenode.TestNamenodeRetryCache.testRetryCacheRebuild(TestNamenodeRetryCache.java:419)


FAILED:  
org.apache.hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA.testRetryCacheOnStandbyNN

Error Message:
expected:<25> but was:<26>

Stack Trace:
java.lang.AssertionError: expected:<25> but was:<26>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at 
org.apache.hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA.testRetryCacheOnStandbyNN(TestRetryCacheWithHA.java:169)
{noformat}

> OEV tool fails to read edit xml file if OP_UPDATE_BLOCKS has no BLOCK tag
> -------------------------------------------------------------------------
>
>                 Key: HDFS-10265
>                 URL: https://issues.apache.org/jira/browse/HDFS-10265
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 2.4.1, 2.7.1
>            Reporter: Wan Chang
>            Assignee: Wan Chang
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.8.0
>
>         Attachments: HDFS-10265-001.patch, HDFS-10265-002.patch
>
>
> I use OEV tool to convert editlog to xml file, then convert the xml file back 
> to binary editslog file(so that low version NameNode can load edits that 
> generated by higher version NameNode). But when OP_UPDATE_BLOCKS has no BLOCK 
> tag, the OEV tool doesn't handle the case and exits with InvalidXmlException.
> Here is the stack:
> {code}
> fromXml error decoding opcode null
> {<PATH>{"/tmp/100M3/slive/data/subDir_13/subDir_7/subDir_15/subDir_11/subFile_5"},
>  <RPC_CALLID>{"-2"}, <RPC_CLIENTID>{},
> <TXID>{"3875711"}}
> Encountered exception. Exiting: no entry found for BLOCK
> org.apache.hadoop.hdfs.util.XMLUtils$InvalidXmlException: no entry found for 
> BLOCK
>         at 
> org.apache.hadoop.hdfs.util.XMLUtils$Stanza.getChildren(XMLUtils.java:242)
>         at 
> org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$UpdateBlocksOp.fromXml(FSEditLogOp.java:908)
>         at 
> org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.decodeXml(FSEditLogOp.java:3942)
>         ...
> {code}
> Here is part of the xml file:
> {code}
> <RECORD>
>   <OPCODE>OP_UPDATE_BLOCKS</OPCODE>
>   <DATA>
>     <TXID>3875711</TXID>
>     
> <PATH>/tmp/100M3/slive/data/subDir_13/subDir_7/subDir_15/subDir_11/subFile_5</PATH>
>     <RPC_CLIENTID></RPC_CLIENTID>
>     <RPC_CALLID>-2</RPC_CALLID>
>   </DATA>
> </RECORD>
> {code}
> I tracked the NN's log and found those operation:
>     0. The file 
> /tmp/100M3/slive/data/subDir_13/subDir_7/subDir_15/subDir_11/subFile_5 is 
> very small and contains only one block.
>     1. Client ask NN to add block to the file.
>     2. Client failed to write to DN and asked NameNode to abandon block.
>     3. NN remove the block and write an OP_UPDATE_BLOCKS to editlog
> Finally NN generated a OP_UPDATE_BLOCKS with no BLOCK tags.
> In FSEditLogOp$UpdateBlocksOp.fromXml, we need to handle the case above.



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

Reply via email to