Class SchemaPresenceChecker


  • public class SchemaPresenceChecker
    extends java.lang.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.
    • Method Detail

      • verifySchemaVersionPresentOrExit

        public void verifySchemaVersionPresentOrExit​(java.util.Optional<java.lang.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()