public static boolean checkReaderWriterCompatibility ( Schema readerSchema , Schema writerSchema , boolean ignoreNamespace ) { if ( ignoreNamespace ) { List < Schema . Field > fields = deepCopySchemaFields ( readerSchema ) ; readerSchema = Schema . createRecord ( writerSchema . getName ( ) , writerSchema . getDoc ( ) , writerSchema . getNamespace ( ) , readerSchema . isError ( ) ) ; readerSchema . setFields ( fields ) ; } return SchemaCompatibility . checkReaderWriterCompatibility ( readerSchema , writerSchema ) . getType ( ) . equals ( SchemaCompatibility . SchemaCompatibilityType . COMPATIBLE ) ; }
Validates that the provided reader schema can be used to decode avro data written with the provided writer schema .