logstash-input-kinesis 1.4.0-java → 1.4.1-java
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: b68bf35b3236310729f6e71a74e5fb323391454e
|
4
|
+
data.tar.gz: 8315e0556cdd1b1dffd6e0e978787f69bebcedd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0190571925326c2ed76370be48cebcf491c17ebd269a9dcc0f475c08450ff8fa8cd48ebd74ddf8c397e9cea491be95bc6c233d0a6ec3a934213cfb7bc648eda
|
7
|
+
data.tar.gz: d8a547a1c7cc58f8ecff68496598bcbe9249f3d078d7672524aa87b622c57639360bc6c999946d833a64f7f4a9d132904ea60401bffedc031dca3c405f9d9c20
|
@@ -31,7 +31,7 @@ class LogStash::Inputs::Kinesis::Worker
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def shutdown(shutdown_input)
|
34
|
-
if shutdown_input.
|
34
|
+
if shutdown_input.shutdown_reason == com.amazonaws.services.kinesis.clientlibrary.types::ShutdownReason::TERMINATE
|
35
35
|
checkpoint(shutdown_input.checkpointer)
|
36
36
|
end
|
37
37
|
end
|
@@ -25,19 +25,19 @@ RSpec.describe "LogStash::Inputs::Kinesis::Worker" do
|
|
25
25
|
double(getData: data)
|
26
26
|
end
|
27
27
|
|
28
|
-
let(:process_input) {
|
28
|
+
let(:process_input) {
|
29
29
|
KCL_TYPES::ProcessRecordsInput.new()
|
30
30
|
.withRecords(java.util.Arrays.asList([
|
31
|
-
record(id: "record1", message: "test1"),
|
31
|
+
record(id: "record1", message: "test1"),
|
32
32
|
record(id: "record2", message: "test2")
|
33
33
|
].to_java)
|
34
34
|
)
|
35
|
-
.withCheckpointer(checkpointer)
|
35
|
+
.withCheckpointer(checkpointer)
|
36
36
|
}
|
37
|
-
let(:empty_process_input) {
|
37
|
+
let(:empty_process_input) {
|
38
38
|
KCL_TYPES::ProcessRecordsInput.new()
|
39
39
|
.withRecords(java.util.Arrays.asList([].to_java))
|
40
|
-
.withCheckpointer(checkpointer)
|
40
|
+
.withCheckpointer(checkpointer)
|
41
41
|
}
|
42
42
|
|
43
43
|
context "initialized" do
|
@@ -69,5 +69,17 @@ RSpec.describe "LogStash::Inputs::Kinesis::Worker" do
|
|
69
69
|
worker.processRecords(empty_process_input)
|
70
70
|
end
|
71
71
|
end
|
72
|
+
|
73
|
+
describe "#shutdown" do
|
74
|
+
it "checkpoints on termination" do
|
75
|
+
input = KCL_TYPES::ShutdownInput.new
|
76
|
+
checkpointer = double('checkpointer')
|
77
|
+
expect(checkpointer).to receive(:checkpoint)
|
78
|
+
input.
|
79
|
+
with_shutdown_reason(KCL_TYPES::ShutdownReason::TERMINATE).
|
80
|
+
with_checkpointer(checkpointer)
|
81
|
+
worker.shutdown(input)
|
82
|
+
end
|
83
|
+
end
|
72
84
|
end
|
73
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Brian Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|