Marcono1234 created HADOOP-17607:
------------------------------------
Summary: TFileDumper creates malformed hex sample output
Key: HADOOP-17607
URL: https://issues.apache.org/jira/browse/HADOOP-17607
Project: Hadoop Common
Issue Type: Bug
Affects Versions: 3.2.2
Reporter: Marcono1234
{{org.apache.hadoop.io.file.tfile.TFileDumper}} creates malformed hex output:
{code}
out.print("0X");
for (int j = 0; j < sampleLen; ++j) {
byte b = key[i];
out.printf("%X", b);
}
{code}
It should use {{"%02X"}} (zero-pad and use width 2) as formatting pattern;
otherwise bytes < 16 will only have on hex char and for example both {{1, 0}}
and {{16}} would have the result {{"10"}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]