[
https://issues.apache.org/jira/browse/HDFS-16537?focusedWorklogId=757735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-757735
]
ASF GitHub Bot logged work on HDFS-16537:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Apr/22 02:20
Start Date: 18/Apr/22 02:20
Worklog Time Spent: 10m
Work Description: GuoPhilipse commented on code in PR #4160:
URL: https://github.com/apache/hadoop/pull/4160#discussion_r851841569
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java:
##########
@@ -2946,7 +2946,7 @@ void fromXml(Stanza st) throws InvalidXmlException {
this.newLength = Long.parseLong(st.getValue("NEWLENGTH"));
this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
if (st.hasChildren("BLOCK"))
- this.truncateBlock = FSEditLogOp.blockFromXml(st);
+ this.truncateBlock =
FSEditLogOp.blockFromXml(st.getChildren("BLOCK").get(0));
Review Comment:
thanks @Hexiaoqiao for your review, will add test later
Issue Time Tracking
-------------------
Worklog Id: (was: 757735)
Time Spent: 1h (was: 50m)
> oev parse error when we have truncate operate
> ----------------------------------------------
>
> Key: HDFS-16537
> URL: https://issues.apache.org/jira/browse/HDFS-16537
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs
> Affects Versions: 3.3.2
> Reporter: guophilipse
> Priority: Major
> Labels: pull-request-available
> Attachments: image-2022-04-11-17-33-46-669.png
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> hi ,when we use oev tool to parse xml to fsimage file , and the xml contains
> OP_TRUNCATE ,the decode parse will fail with the following error
> !image-2022-04-11-17-33-46-669.png!
> the truncate record example as the following.
> <RECORD>
> <OPCODE>OP_TRUNCATE</OPCODE>
> <DATA>
> <TXID>4169074186</TXID>
> <SRC>/data/test/2022/03/24/part-9-123</SRC>
> <CLIENTNAME>DFSClient_NONMAPREDUCE_2025317379_1</CLIENTNAME>
> <CLIENTMACHINE>192.168.1.1</CLIENTMACHINE>
> <NEWLENGTH>3462890</NEWLENGTH>
> <TIMESTAMP>1648094066932</TIMESTAMP>
> <BLOCK>
> <BLOCK_ID>1369315031</BLOCK_ID>
> <NUM_BYTES>0</NUM_BYTES>
> <GENSTAMP>296479647</GENSTAMP>
> </BLOCK>
> </DATA>
> </RECORD>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]