Skip to content

Commit

Permalink
Support ddb billing mode in additional_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
c4pQ committed Feb 7, 2023
1 parent 99f4ff7 commit 141c24d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1
2.3.0
11 changes: 9 additions & 2 deletions lib/logstash/inputs/kinesis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# The library can optionally also send worker statistics to CloudWatch.
class LogStash::Inputs::Kinesis < LogStash::Inputs::Base
KCL = com.amazonaws.services.kinesis.clientlibrary.lib.worker
DDB = com.amazonaws.services.dynamodbv2
DDB_BILLING_MODE = com.amazonaws.services.dynamodbv2.model.BillingMode
KCL_PROCESSOR_FACTORY_CLASS = com.amazonaws.services.kinesis.clientlibrary.interfaces.v2.IRecordProcessorFactory
require "logstash/inputs/kinesis/worker"

Expand Down Expand Up @@ -135,8 +137,13 @@ def register
# Call arbitrary "withX()" functions
# snake_case => withCamelCase happens automatically
@additional_settings.each do |key, value|
fn = "with_#{key}"
@kcl_config.send(fn, value)
fn = "with_#{key}"
arg = if key == "billing_mode"
DDB_BILLING_MODE::fromValue(value)
else
value
end
@kcl_config.send(fn, arg)
end

unless @http_proxy.to_s.empty?
Expand Down
2 changes: 1 addition & 1 deletion logstash-input-kinesis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|

spec.platform = 'java'

spec.requirements << "jar 'com.amazonaws:amazon-kinesis-client', '1.13.3'"
spec.requirements << "jar 'com.amazonaws:amazon-kinesis-client', '1.14.3'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-core', '1.11.1034'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-sts', '1.11.1034'"

Expand Down

0 comments on commit 141c24d

Please sign in to comment.