aws-kclrb 1.0.0 → 1.0.1
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/VERSION +1 -1
- data/lib/aws/kclrb/checkpointer.rb +1 -1
- data/spec/checkpointer_spec.rb +2 -2
- data/spec/kcl_process_spec.rb +6 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d55dfffb55a3d32554c63e4636b5c4bcd7612145
|
4
|
+
data.tar.gz: a6257f914079ce6b9e28bfe03faba78d30a08e94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb02f6b1830d16ec02031c6d49d07487a54af4cadfe73fe774fd30f4ce3b11d5cbe369b795767954020fb3ad0387bd852d611bc2d54656d676b0f8dc9cf2749f
|
7
|
+
data.tar.gz: cfb93c0609cd2b76065347622adb49372322c381199f81debd6f39593197a5b72d15e14766778695c57d7bc7ea1a35a0704be44bfae135a8dfeaa2b3aaf0b710
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -75,7 +75,7 @@ module Aws
|
|
75
75
|
|
76
76
|
# (see Checkpointer#checkpoint)
|
77
77
|
def checkpoint(sequence_number=nil)
|
78
|
-
@io_proxy.write_action('checkpoint', '
|
78
|
+
@io_proxy.write_action('checkpoint', 'sequenceNumber' => sequence_number)
|
79
79
|
# Consume the response action
|
80
80
|
action = @io_proxy.read_action
|
81
81
|
# Happy response is expected to be of the form:
|
data/spec/checkpointer_spec.rb
CHANGED
@@ -20,7 +20,7 @@ module Aws::KCLrb
|
|
20
20
|
describe "#checkpoint" do
|
21
21
|
it "should emit a checkpoint action and consume response action" do
|
22
22
|
seq_number = rand(100_000).to_s
|
23
|
-
expected_output_string = %Q[{"action":"checkpoint","
|
23
|
+
expected_output_string = %Q[{"action":"checkpoint","sequenceNumber":"#{seq_number}"}]
|
24
24
|
input_string = %Q[{"action":"checkpoint","checkpoint":"#{seq_number}"}]
|
25
25
|
input = StringIO.new(input_string)
|
26
26
|
output = StringIO.new
|
@@ -34,7 +34,7 @@ module Aws::KCLrb
|
|
34
34
|
|
35
35
|
it "should raise a CheckpointError when error is received from MultiLangDaemon" do
|
36
36
|
seq_number = rand(100_000).to_s
|
37
|
-
expected_output_string = %Q[{"action":"checkpoint","
|
37
|
+
expected_output_string = %Q[{"action":"checkpoint","sequenceNumber":"#{seq_number}"}]
|
38
38
|
input_string = %Q[{"action":"checkpoint","checkpoint":"#{seq_number}","error":"ThrottlingException"}]
|
39
39
|
input = StringIO.new(input_string)
|
40
40
|
output = StringIO.new
|
data/spec/kcl_process_spec.rb
CHANGED
@@ -69,10 +69,10 @@ module Aws::KCLrb
|
|
69
69
|
input_string = <<-INPUT
|
70
70
|
{"action":"initialize","shardId":"shardId-123"}
|
71
71
|
{"action":"processRecords","records":[{"data":"bWVvdw==","partitionKey":"cat","sequenceNumber":"456"}]}
|
72
|
-
{"action":"checkpoint","
|
73
|
-
{"action":"checkpoint","
|
72
|
+
{"action":"checkpoint","sequenceNumber":"456","error":"ThrottlingException"}
|
73
|
+
{"action":"checkpoint","sequenceNumber":"456"}
|
74
74
|
{"action":"shutdown","reason":"TERMINATE"}
|
75
|
-
{"action":"checkpoint","
|
75
|
+
{"action":"checkpoint","sequenceNumber":"456"}
|
76
76
|
INPUT
|
77
77
|
|
78
78
|
# NOTE: The first checkpoint is expected to fail
|
@@ -80,10 +80,10 @@ module Aws::KCLrb
|
|
80
80
|
# retry.
|
81
81
|
expected_output_string = <<-OUTPUT
|
82
82
|
{"action":"status","responseFor":"initialize"}
|
83
|
-
{"action":"checkpoint","
|
84
|
-
{"action":"checkpoint","
|
83
|
+
{"action":"checkpoint","sequenceNumber":"456"}
|
84
|
+
{"action":"checkpoint","sequenceNumber":"456"}
|
85
85
|
{"action":"status","responseFor":"processRecords"}
|
86
|
-
{"action":"checkpoint","
|
86
|
+
{"action":"checkpoint","sequenceNumber":null}
|
87
87
|
{"action":"status","responseFor":"shutdown"}
|
88
88
|
OUTPUT
|
89
89
|
processor = TestRecordProcessor.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-kclrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -45,7 +45,7 @@ files:
|
|
45
45
|
- spec/io_proxy_spec.rb
|
46
46
|
- spec/kcl_process_spec.rb
|
47
47
|
- spec/spec_helper.rb
|
48
|
-
homepage:
|
48
|
+
homepage: http://github.com/aws/amazon-kinesis-client-ruby
|
49
49
|
licenses:
|
50
50
|
- Amazon Software License
|
51
51
|
metadata: {}
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.2
|
68
|
+
rubygems_version: 2.5.2
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Amazon Kinesis Client Library for Ruby
|