embulk-output-kafka 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb1edf4ce79bd490f0f01662547d36c2e6d2dd6e
|
4
|
+
data.tar.gz: 44b9affb8e9d1385314274b5d1ac083fd5a4848e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c76d2cca3d141b7f44208449ba092ee732993183de6e6f19ec4e5280f302f0e3a4b5746414332103aa492b0cb7ea7df55159fa936248839bb68a8280ecfc060
|
7
|
+
data.tar.gz: 28dcd4f04aceec97e78c427b2b859266b9adb5147ae8cd28a63c5df86840d5c4051af049b225eefe01d410007afdd17222ec96fc3525cf0cd28e60c30414f6a2
|
data/README.md
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
- **acks**: kafka producer require acks (string, default: `"1"`)
|
23
23
|
- **retries**: kafka producer max retry count (integer, default: `1`)
|
24
24
|
- **other_producer_configs**: other producer configs (json, default: `{}`)
|
25
|
+
- **value_subject_name_strategy**: Set SchemaRegistry subject name strategy (string, default: `null`, ex. `io.confluent.kafka.serializers.subject.RecordNameStrategy`)
|
25
26
|
|
26
27
|
If use `avro_with_schema_registry` format, following configs are required.
|
27
28
|
|
data/build.gradle
CHANGED
@@ -115,6 +115,10 @@ public class KafkaOutputPlugin
|
|
115
115
|
@Config("ignore_columns")
|
116
116
|
@ConfigDefault("[]")
|
117
117
|
public List<String> getIgnoreColumns();
|
118
|
+
|
119
|
+
@Config("value_subject_name_strategy")
|
120
|
+
@ConfigDefault("null")
|
121
|
+
public Optional<String> getValueSubjectNameStrategy();
|
118
122
|
}
|
119
123
|
|
120
124
|
private static ObjectMapper objectMapper = new ObjectMapper();
|
@@ -95,9 +95,14 @@ class RecordProducerFactory
|
|
95
95
|
KafkaAvroSerializer kafkaAvroSerializer = new KafkaAvroSerializer();
|
96
96
|
String schemaRegistryUrl = task.getSchemaRegistryUrl().orElseThrow(() -> new ConfigException("avro_with_schema_registry format needs schema_registry_url"));
|
97
97
|
|
98
|
-
|
99
|
-
.put(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, schemaRegistryUrl)
|
100
|
-
|
98
|
+
ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String>builder()
|
99
|
+
.put(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, schemaRegistryUrl);
|
100
|
+
|
101
|
+
if (task.getValueSubjectNameStrategy().isPresent()) {
|
102
|
+
builder.put(AbstractKafkaAvroSerDeConfig.VALUE_SUBJECT_NAME_STRATEGY, task.getValueSubjectNameStrategy().get());
|
103
|
+
}
|
104
|
+
|
105
|
+
Map<String, String> avroSerializerConfigs = builder.build();
|
101
106
|
kafkaAvroSerializer.configure(avroSerializerConfigs, false);
|
102
107
|
|
103
108
|
return new KafkaProducer<>(buildProperties(task, schema, configs), null, kafkaAvroSerializer);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
@@ -54,7 +54,7 @@ files:
|
|
54
54
|
- classpath/common-config-5.3.0.jar
|
55
55
|
- classpath/common-utils-5.3.0.jar
|
56
56
|
- classpath/commons-compress-1.18.jar
|
57
|
-
- classpath/embulk-output-kafka-0.1.
|
57
|
+
- classpath/embulk-output-kafka-0.1.3.jar
|
58
58
|
- classpath/jackson-annotations-2.9.0.jar
|
59
59
|
- classpath/jackson-core-2.9.9.jar
|
60
60
|
- classpath/jackson-databind-2.9.9.jar
|