private static Object getObjectFromMap ( Map map , String key ) { Utf8 utf8Key = new Utf8 ( key ) ; return map . get ( utf8Key ) ; }
This method is to get object from map given a key as string . Avro persists string as Utf8