embulk-output-kafka 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/output/kafka/KafkaOutputPlugin.java +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be52a5a8989cb1081e251dfad03ff22445c30849
|
4
|
+
data.tar.gz: 202e3edf3266467bcfbe37f2f2e666a716403131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300d9c7c383c41da638512962f29d30d4824a5873083d5dda0e83bbbc89e00e2e57e5beb7e4e5f0d2a604a9db7702d30b99cd5f4c593cffb308696c6d68382b0
|
7
|
+
data.tar.gz: 80f3ad8a1811d3fa9a147c1a806eb65a9bf6d9df58cfe03275cc2400bd462d573c6ccaaf3b23b5f9c7ac352303b0bec4ec9095a80f56894ca07ac4ef47bcea85
|
data/build.gradle
CHANGED
@@ -40,6 +40,7 @@ import java.util.concurrent.ExecutionException;
|
|
40
40
|
import java.util.concurrent.TimeUnit;
|
41
41
|
import java.util.concurrent.TimeoutException;
|
42
42
|
import java.util.concurrent.atomic.AtomicInteger;
|
43
|
+
import java.util.concurrent.atomic.AtomicLong;
|
43
44
|
|
44
45
|
public class KafkaOutputPlugin
|
45
46
|
implements OutputPlugin
|
@@ -199,8 +200,8 @@ public class KafkaOutputPlugin
|
|
199
200
|
|
200
201
|
PageReader pageReader = new PageReader(schema);
|
201
202
|
PrimitiveIterator.OfLong randomLong = new Random().longs(1, Long.MAX_VALUE).iterator();
|
202
|
-
|
203
|
-
|
203
|
+
AtomicLong counter = new AtomicLong(0);
|
204
|
+
AtomicLong recordLoggingCount = new AtomicLong(1);
|
204
205
|
|
205
206
|
return new TransactionalPageOutput() {
|
206
207
|
private JsonFormatColumnVisitor columnVisitor = new JsonFormatColumnVisitor(task, pageReader, objectMapper);
|
@@ -228,7 +229,7 @@ public class KafkaOutputPlugin
|
|
228
229
|
|
229
230
|
logger.debug("sent record: {key: {}, value: {}}", producerRecord.key(), producerRecord.value());
|
230
231
|
|
231
|
-
|
232
|
+
long current = counter.incrementAndGet();
|
232
233
|
if (current >= recordLoggingCount.get()) {
|
233
234
|
logger.info("[task-{}] Producer sent {} records", String.format("%04d", taskIndex), current);
|
234
235
|
recordLoggingCount.set(recordLoggingCount.get() * 2);
|
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.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-01 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.
|
57
|
+
- classpath/embulk-output-kafka-0.1.5.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
|