Created
June 22, 2017 09:07
-
-
Save bvdeenen/d6c2008449683c6817c240e4e8ff9487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the gist of my deserialize | |
private DatumReader<GenericRecord> reader; | |
reader = new SpecificDatumReader<>(writerSchema, readerSchema); | |
GenericRecord deserialize(byte[] msg) throws IOException, IllegalStateException | |
{ | |
BinaryDecoder decoder = DecoderFactory.get().binaryDecoder(msg, null); | |
return reader.read(null, decoder); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment