vinothchandar commented on issue #2515:
URL: https://github.com/apache/hudi/issues/2515#issuecomment-772993801
I tried to reproduce this based on the same file you gave us. No luck. it's
fine. :(
```
@Test
public void testDeSer() throws IOException {
System.out.println("testDeSer");
byte[] content = FileIOUtils.readAsByteArray(new
FileInputStream("/tmp/20210203023128.commit.requested"));
HoodieCommitMetadata commitMetadata =
HoodieCommitMetadata.fromBytes(content, HoodieCommitMetadata.class);
org.apache.hudi.avro.model.HoodieCommitMetadata convertedCommitMetadata
= HoodieTimelineArchiveLog.convertCommitMetadata(commitMetadata);
System.out.println(commitMetadata);
GenericDatumWriter< IndexedRecord > writer = new
GenericDatumWriter<>(convertedCommitMetadata.getSchema());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream output = new DataOutputStream(baos);
ByteArrayOutputStream temp = new ByteArrayOutputStream();
BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(temp, null);
// Encode the record into bytes
writer.write(convertedCommitMetadata, encoder);
encoder.flush();
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]