autumnust commented on a change in pull request #2956: GOBBLIN-1116: Avoid
registering schema with schema registry during Me…
URL: https://github.com/apache/incubator-gobblin/pull/2956#discussion_r409153864
##########
File path:
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/metrics/reporter/util/SchemaRegistryVersionWriter.java
##########
@@ -41,58 +44,50 @@
* {@link org.apache.gobblin.metrics.kafka.KafkaAvroSchemaRegistry} to get
Schema version identifier and write it to
* {@link java.io.DataOutputStream}.
*/
+@Slf4j
public class SchemaRegistryVersionWriter implements
SchemaVersionWriter<Schema> {
private final KafkaAvroSchemaRegistry registry;
private Map<Schema, String> registrySchemaIds;
- private final Optional<String> overrideName;
- private final Optional<Schema> schema;
- private final Optional<String> schemaId;
+ private final String overrideName;
+ private final Schema schema;
+ private final String schemaId;
private final int schemaIdLengthBytes;
public SchemaRegistryVersionWriter(Config config)
- throws IOException {
- this(new KafkaAvroSchemaRegistry(ConfigUtils.configToProperties(config)),
Optional.<String>absent(),
- Optional.<Schema>absent());
- }
-
- public SchemaRegistryVersionWriter(KafkaAvroSchemaRegistry registry, String
overrideName)
- throws IOException {
- this(registry, overrideName, Optional.<Schema>absent());
+ throws SchemaRegistryException {
+ this(new KafkaAvroSchemaRegistry(ConfigUtils.configToProperties(config)),
null, null, null);
}
- public SchemaRegistryVersionWriter(KafkaAvroSchemaRegistry registry, String
overrideName,
- Optional<Schema> singleSchema)
- throws IOException {
- this(registry, Optional.of(overrideName), singleSchema);
+ public SchemaRegistryVersionWriter(KafkaAvroSchemaRegistry registry,
@Nullable String overrideName, @Nullable Schema singleSchema)
Review comment:
The original method is being referenced internally according to code-search:
Should we consider maintain back-compatiblity here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services