ProtobufDeserializer implements Deserializer { @Override public Object deserialize(Writable blob) throws SerDeException { BytesWritable bytes = (BytesWritable) blob; try { return protobufConverter.fromBytes(bytes.getBytes(), 0, bytes.getLength()); } catch (IOException e) { throw new SerDeException(e); } }  @Override void initialize(Configuration job, Properties tbl); @Override Object deserialize(Writable blob); @Override ObjectInspector getObjectInspector(); @Override SerDeStats getSerDeStats();  }
@Test public final void testDeserializer() throws SerDeException { BytesWritable serialized = new BytesWritable(test_ab.toByteArray()); AddressBook ab2 = (AddressBook) deserializer.deserialize(serialized); assertTrue(test_ab.equals(ab2)); }