Skip to content

Commit

Permalink
#384 Update POM. Update Documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jemacineiras committed Jan 8, 2024
2 parents 4c9d1ed + 02a814f commit 3273838
Show file tree
Hide file tree
Showing 14 changed files with 340 additions and 170 deletions.
Binary file modified docs/images/SchemaRegistrySelection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/schema-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ A list of the properties explained here:
* `schema.registry.username` Username
* `schema.registry.password` Password
* `schema.registry.bearer` Token for SASL/OAUTHBEARER
* `schema.registry.keystore.location` The absolute path of the keystore file for the schema registry
* `schema.registry.keystore.password` The password that protects the keystore file for the schema registry
* `schema.registry.truststore.location` The absolute path of the truststore file for the schema registry
* `schema.registry.truststore.password` The password that protects the truststore file for the schema registry
* `ssl.keystore.location` The absolute path of the keystore file for the connection against the schema registry
* `ssl.keystore.password` The password that protects the keystore file for the connection against the schema registry
* `ssl.truststore.location` The absolute path of the truststore file for the connection against the schema registry
* `ssl.truststore.password` The password that protects the truststore file for the connection against the schema registry

## Some Recommendations

Expand Down
115 changes: 90 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,24 +225,24 @@
<timezone>Europe/Madrid</timezone>
</developer>
<developer>
<id>rabad-sng</id>
<name>Raúl Abad</name>
<email>raul.abad@sngular.com</email>
<id>nuriaricorf</id>
<name>Nuria Rico Freire</name>
<email>nuria.rico@sngular.com</email>
<organization>Sngular</organization>
<organizationUrl>https://www.sngular.com</organizationUrl>
<organizationUrl>https://sngular.github.io/</organizationUrl>
<roles>
<role>Senior Backend Developer</role>
<role>Junior Developer</role>
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
<developer>
<id>nuriaricorf</id>
<name>Nuria Rico Freire</name>
<email>nuria.rico@sngular.com</email>
<id>rabad-sng</id>
<name>Raúl Abad</name>
<email>raul.abad@sngular.com</email>
<organization>Sngular</organization>
<organizationUrl>https://sngular.github.io/</organizationUrl>
<organizationUrl>https://www.sngular.com</organizationUrl>
<roles>
<role>Junior Developer</role>
<role>Senior Backend Developer</role>
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
Expand Down Expand Up @@ -370,15 +370,15 @@
<junit-jupiter-api.version>5.8.2</junit-jupiter-api.version>
<kafka-schema-registry-client.version>7.1.1</kafka-schema-registry-client.version>
<apicurio-registry.version>2.4.3.Final</apicurio-registry.version>
<kafka.version>3.5.1</kafka.version>
<kafka.version>3.6.1</kafka.version>
<lombok.version>1.18.22</lombok.version>
<minimal-json.version>0.9.5</minimal-json.version>
<mockito-core.version>4.2.0</mockito-core.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<rest-assured.version>4.5.0</rest-assured.version>
<slf4j-api.version>2.0.0-alpha1</slf4j-api.version>
<slf4j-api.version>2.0.9</slf4j-api.version>
<wiremock-junit5.version>1.3.1</wiremock-junit5.version>
<wiremock.version>2.35.1</wiremock.version>
<wiremock.version>3.0.0-beta-4</wiremock.version>
<jackson-annotations.version>2.15.2</jackson-annotations.version>
<jackson-dataformat-yaml.version>2.15.3</jackson-dataformat-yaml.version>
</properties>
Expand Down Expand Up @@ -413,8 +413,17 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.24.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down Expand Up @@ -445,6 +454,17 @@
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
<version>${kafka-schema-registry-client.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
Expand All @@ -465,12 +485,32 @@
<groupId>com.github.everit-org.json-schema</groupId>
<artifactId>org.everit.json.schema</artifactId>
</exclusion>
<exclusion>
<artifactId>org.jetbrains.kotlin</artifactId>
<groupId>kotlin-stdlib</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-serializer</artifactId>
<version>${kafka-schema-registry-client.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>io.apicurio</groupId>
Expand Down Expand Up @@ -498,6 +538,26 @@
<artifactId>apicurio-registry-serdes-protobuf-serde</artifactId>
<version>${apicurio-registry.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.charleskorn.kaml</groupId>
<artifactId>kaml</artifactId>
<version>0.53.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>5.0.0-alpha.11</version>
</dependency>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-utils-serde</artifactId>
Expand All @@ -506,28 +566,23 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-protobuf</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
</dependency>
<dependency>
<groupId>com.github.os72</groupId>
<artifactId>protobuf-dynamic</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-java-generator</artifactId>
<version>4.0.1</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<version>2.24.0</version>
<version>2.30.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.24.3</version>
<version>3.25.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -559,6 +614,12 @@
<groupId>com.github.everit-org.json-schema</groupId>
<artifactId>org.everit.json.schema</artifactId>
<version>1.14.2</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Options -->
<dependency>
Expand Down Expand Up @@ -636,7 +697,7 @@
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -672,13 +733,17 @@
</dependencies>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<id>central</id>
<url> https://repo1.maven.org/maven2/</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ private void serializeProperties() {
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_TYPE);
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_CREDENTIALS_SOURCE, "STATIC_TOKEN");
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_TOKEN_CONFIG, schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_KEY));
} else if (SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE.equalsIgnoreCase(schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY))) {
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE);

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.sngular.kloadgen.model.PropertyMapping;
import com.sngular.kloadgen.property.editor.SchemaRegistryConfigPropertyEditor;
import com.sngular.kloadgen.property.editor.SchemaRegistryNamePropertyEditor;
import com.sngular.kloadgen.sampler.gui.SchemaRegistryProperties;
import com.sngular.kloadgen.sampler.gui.DefaultPropertiesHelper;
import com.sngular.kloadgen.util.SchemaRegistryKeyHelper;
import org.apache.jmeter.testbeans.BeanInfoSupport;
import org.apache.jmeter.testbeans.gui.TableEditor;
Expand All @@ -23,7 +23,8 @@ public SchemaRegistryConfigElementBeanInfo() {

super(SchemaRegistryConfigElement.class);

createPropertyGroup("schema_registry_config", new String[] {SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME, SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_URL,
createPropertyGroup("schema_registry_config", new String[] {SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME,
SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_URL,
SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_PROPERTIES});

final PropertyDescriptor schemaRegistryName = property(SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME);
Expand All @@ -43,7 +44,7 @@ public SchemaRegistryConfigElementBeanInfo() {
tableProperties.setValue(TableEditor.CLASSNAME, PropertyMapping.class.getName());
tableProperties.setValue(TableEditor.HEADERS, new String[]{"Property Name", "Property Value"});
tableProperties.setValue(TableEditor.OBJECT_PROPERTIES, new String[]{PropertyMapping.PROPERTY_NAME, PropertyMapping.PROPERTY_VALUE});
tableProperties.setValue(DEFAULT, SchemaRegistryProperties.DEFAULTS);
tableProperties.setValue(DEFAULT, DefaultPropertiesHelper.DEFAULTS);
tableProperties.setValue(NOT_UNDEFINED, Boolean.TRUE);
tableProperties.setValue(NOT_EXPRESSION, Boolean.FALSE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,4 @@ public final Component getCustomEditor() {
public final boolean supportsCustomEditor() {
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import org.apache.kafka.common.serialization.Serializer;
import org.reflections.Reflections;

final class ReflectionUtils {
public final class ReflectionUtils {

private ReflectionUtils() {
}

static void extractSerializers(final JComboBox<String> serializerComboBox, final Reflections reflections, final Class reflectedClass) {
public static List<String> extractSerializers(final Reflections reflections, final Class reflectedClass) {
final Set<Class<? extends Serializer>> subTypes = reflections.getSubTypesOf(reflectedClass);
final List<String> classList = new ArrayList<>();

Expand All @@ -31,7 +31,11 @@ static void extractSerializers(final JComboBox<String> serializerComboBox, final
}

classList.sort(Comparator.naturalOrder());
for (String serializer : classList) {
return classList;
}

static void extractSerializers(final JComboBox<String> serializerComboBox, final Reflections reflections, final Class reflectedClass) {
for (String serializer : extractSerializers(reflections, reflectedClass)) {
serializerComboBox.addItem(serializer);
}
serializerComboBox.setSelectedItem(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public final void actionPerformed(final ActionEvent event) {
}

@Override
public final void clearGui() {}
public final void clearGui() {
}

@Override
public final void setDescriptor(final PropertyDescriptor descriptor) {
Expand Down
Loading

0 comments on commit 3273838

Please sign in to comment.