Skip to content

Instantly share code, notes, and snippets.

@talfco
Last active May 21, 2020 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talfco/dc7c6896e9360da1444c59579b878c92 to your computer and use it in GitHub Desktop.
Save talfco/dc7c6896e9360da1444c59579b878c92 to your computer and use it in GitHub Desktop.
Avro Schema Registry Abstract class
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