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 Jan 30, 2023
1 parent 99f4ff7 commit 5cb4133
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 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
4 changes: 2 additions & 2 deletions logstash-input-kinesis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/logstash-plugins/logstash-input-kinesis"
spec.licenses = ['Apache-2.0']

spec.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
spec.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT','VERSION']
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib', 'vendor/jar-dependencies/runtime-jars']

Expand All @@ -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 5cb4133

Please sign in to comment.