linkedin / dynamometer

A tool for scale and performance testing of HDFS with a specific focus on the NameNode.
BSD 2-Clause "Simplified" License
131 stars 34 forks source link

Make XML parsing error message more explicit #97

Closed fengnanli closed 5 years ago

fengnanli commented 5 years ago

There are two points in this pr: 1) when parsing the xml INodeSection, the state machine actually requires that must be the ending of a line, otherwise other states will kick in thus will result in errors.

2) expose the actual line under parsing in the exceptions for easier debugging, otherwise there is no clue what happened.

xkrogen commented 5 years ago

@fengnanli , can you look into the test failure? It looks legitimate.

fengnanli commented 5 years ago

@xkrogen so the parsing failed at this line: <directory><parent>16386</parent><inode>16390</inode></directory> This line actually is not for the block report part <INodeSection> and it is in <INodeDirectorySection>. I will undo the change for the parser for </inode>, and file another pr to let the blockgen stop early when it finishes the INodeSection.

FYI, hdfs oiv 2.8.2 doesn't generate <inode> tag in the dir anymore, it is <child> instead.

xkrogen commented 5 years ago

Interesting... Thanks for the info! I would definitely welcome a change which supports the new-style <child> alongside the old-style <inode>. Annoying that it switched. I'll approve this change in the mean time.