Last active
May 21, 2020 06:38
-
-
Save talfco/dc7c6896e9360da1444c59579b878c92 to your computer and use it in GitHub Desktop.
Avro Schema Registry Abstract class
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
import org.apache.avro.Schema; | |
import org.apache.avro.SchemaNormalization; | |
public abstract class SchemaRegistry { | |
public abstract long registerSchema(Schema schema) throws IOException; | |
public abstract Schema getSchema(long fingerprint) throws IOException; | |
public long getSchemaFingerprint(Schema schema) { | |
return SchemaNormalization.parsingFingerprint64(schema); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment