### Get Top-Level Configuration Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Retrieves the global configuration settings for the Schema Registry, such as the default compatibility level. ```bash # Get top level config $ curl -X GET http://localhost:8081/config {"compatibilityLevel":"BACKWARD"} ``` -------------------------------- ### Run Benchmarks with Custom Parameters Source: https://github.com/confluentinc/schema-registry/blob/master/benchmark/README.md Execute JMH benchmarks with custom thread and fork configurations. This example sets 8 threads and 1 fork. ```bash java -jar ./target/benchmarks.jar -t 8 -f 1 ``` -------------------------------- ### Run Subset of Benchmarks Source: https://github.com/confluentinc/schema-registry/blob/master/benchmark/README.md Execute a specific subset of JMH benchmarks by setting parameters. This example filters for AVRO serialization format. ```bash java -jar ./target/benchmarks.jar -p serializationFormat=AVRO ``` -------------------------------- ### Compile Schema Registry from Source Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Execute this Maven command to compile the Schema Registry project from its source code. ```bash mvn compile ``` -------------------------------- ### Run All Benchmarks Source: https://github.com/confluentinc/schema-registry/blob/master/benchmark/README.md Execute all JMH microbenchmarks for the Schema Registry module. Ensure the module is built to produce 'target/benchmarks.jar'. ```bash java -jar ./target/benchmarks.jar ``` -------------------------------- ### Maven Dependency Resolution Error Example Source: https://github.com/confluentinc/schema-registry/wiki/FAQ This error indicates that Maven could not resolve SNAPSHOT dependencies required for building the Kafka Avro serializer. It typically occurs when developing against new features and local SNAPSHOT versions are not available. ```text [ERROR] Failed to execute goal on project kafka-avro-serializer: Could not resolve dependencies for project io.confluent:kafka-avro-serializer:jar:3.3.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.kafka:kafka_2.11:jar:0.11.0.0-SNAPSHOT, io.confluent:common-config:jar:3.3.0-SNAPSHOT: Failure to find org.apache.kafka:kafka_2.11:jar:0.11.0.0-SNAPSHOT in http://packages.confluent.io/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of confluent has elapsed or updates are forced -> [Help 1] ``` -------------------------------- ### Run Schema Registry with Local Kafka Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Use this Maven command to run an instance of Schema Registry against a local Kafka cluster using the default configuration. ```bash mvn exec:java -pl :kafka-schema-registry -Dexec.args="config/schema-registry.properties" ``` -------------------------------- ### Display JMH Help Source: https://github.com/confluentinc/schema-registry/blob/master/benchmark/README.md View the full list of available JMH command-line options and parameters. ```bash java -jar ./target/benchmarks.jar -h ``` -------------------------------- ### Package Schema Registry Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Execute this Maven command to create a packaged version of the Schema Registry. Tests can be optionally skipped. ```bash mvn package [-DskipTests] ``` -------------------------------- ### Fetch Schema by Subject and Version Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Retrieves a specific version of a schema registered under a given subject. ```bash # Fetch version 1 of the schema registered under subject "Kafka-value" $ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/1 {"subject":"Kafka-value","version":1,"id":1,"schema":"\"string\""} ``` -------------------------------- ### Run Schema Registry Tests Source: https://github.com/confluentinc/schema-registry/blob/master/README.md Execute this Maven command to run both unit and integration tests for the Schema Registry project. ```bash mvn test ```