Class SchemaPresenceChecker

java.lang.Object
com.linkedin.venice.serialization.avro.SchemaPresenceChecker

public class SchemaPresenceChecker extends Object
This class helps checks presence of a schema version in ZK. This can be used to ensure forward compatibility when a protocol gets upgraded.
  • Constructor Details

  • Method Details

    • verifySchemaVersionPresentOrExit

      public void verifySchemaVersionPresentOrExit(Optional<Integer> protocolVersion, boolean retry)
      When schema is present this returns nothing, otherwise it throws an exception and exits the JVM. This is added for testing purpose.
      Parameters:
      protocolVersion - -- the protocol version to fetch the schema for, if not present then fetch the current version.
      retry - -- should retry fetching the schema or not
    • verifySchemaVersionPresentOrExit

      public void verifySchemaVersionPresentOrExit()