embulk-output-kafka 0.1.6 → 0.1.7

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: 1139409de37d3c3098fa4040a852b97c871c9b12
4
- data.tar.gz: 5cc5b35275a4b907d8800b4b7a7467d7bd301045
3
+ metadata.gz: c2c8249b98bf48ab359b21e01dc0f4112ebf800f
4
+ data.tar.gz: 538847da32ff4ad84f24495c67d790185043ce02
5
5
  SHA512:
6
- metadata.gz: 1aea6aa1b01c00ea6150d9d240059274ecb2154cdb3d19a2ee3524dd4b6e7a8692435eecbe619053258c8d6e1ab053282ea67315fc62ddd254e3ce892de3c3ca
7
- data.tar.gz: bfc15f45fd1c8546a59ba8ac20b9f93407b80b468ac1f857977f1a55f075774d658bd75a9fabbe7024d6e155002aad9df89c9fd4402428cf8c4be0a847f0d20b
6
+ metadata.gz: 0542a0a92e3c8b2a998177c874acf4d0209d0e90889894999daff756840169fe585877af51b5368eaada9ba4eb8bd6c6676fafc8ff5fc84d4edf193df19881de
7
+ data.tar.gz: 1cd8fb2c55282f082eef56ea983cbc59cbae551db606f55bf21c1fccfbea37cfe633ef713eb66b089f0229ab5b97ae7b9e79ad38eddfc79d9157ca2e68fc869a
data/build.gradle CHANGED
@@ -17,7 +17,7 @@ configurations {
17
17
  provided
18
18
  }
19
19
 
20
- version = "0.1.6"
20
+ version = "0.1.7"
21
21
 
22
22
  sourceCompatibility = 1.8
23
23
  targetCompatibility = 1.8
@@ -39,7 +39,6 @@ import java.util.Random;
39
39
  import java.util.concurrent.ExecutionException;
40
40
  import java.util.concurrent.TimeUnit;
41
41
  import java.util.concurrent.TimeoutException;
42
- import java.util.concurrent.atomic.AtomicInteger;
43
42
  import java.util.concurrent.atomic.AtomicLong;
44
43
 
45
44
  public class KafkaOutputPlugin
@@ -221,13 +220,17 @@ public class KafkaOutputPlugin
221
220
  }
222
221
 
223
222
  String targetTopic = columnVisitor.getTopicName() != null ? columnVisitor.getTopicName() : task.getTopic();
224
- ProducerRecord<Object, ObjectNode> producerRecord = new ProducerRecord<>(targetTopic, recordKey, columnVisitor.getJsonNode());
223
+ ProducerRecord<Object, ObjectNode> producerRecord = new ProducerRecord<>(targetTopic, columnVisitor.getPartition(), recordKey, columnVisitor.getJsonNode());
225
224
  producer.send(producerRecord, (metadata, exception) -> {
226
225
  if (exception != null) {
227
226
  logger.error("produce error", exception);
228
227
  }
229
228
 
230
- logger.debug("sent record: {key: {}, value: {}}", producerRecord.key(), producerRecord.value());
229
+ logger.debug("sent record: {topic: {}, key: {}, value: {}, partition: {}}",
230
+ producerRecord.topic(),
231
+ producerRecord.key(),
232
+ producerRecord.value(),
233
+ producerRecord.partition());
231
234
 
232
235
  long current = counter.incrementAndGet();
233
236
  if (current >= recordLoggingCount.get()) {
@@ -320,7 +323,11 @@ public class KafkaOutputPlugin
320
323
  logger.error("produce error", exception);
321
324
  }
322
325
 
323
- logger.debug("sent record: {key: {}, value: {}}", producerRecord.key(), producerRecord.value());
326
+ logger.debug("sent record: {topic: {}, key: {}, value: {}, partition: {}}",
327
+ producerRecord.topic(),
328
+ producerRecord.key(),
329
+ producerRecord.value(),
330
+ producerRecord.partition());
324
331
 
325
332
  long current = counter.incrementAndGet();
326
333
  if (current >= recordLoggingCount.get()) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-28 00:00:00.000000000 Z
11
+ date: 2020-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -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.6.jar
57
+ - classpath/embulk-output-kafka-0.1.7.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