Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
add kpl missing properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Torterolo committed Aug 16, 2017
1 parent be652dc commit 12c3a1f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ lazy val headerSettings =
headers := Map("scala" -> Apache2_0("2017", "WeightWatchers"))
)

coverageExcludedPackages := "reference.conf"
32 changes: 32 additions & 0 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ kinesis {
# Maximum (inclusive): 300000
ConnectTimeout = 6000


# How often to refresh credentials (in milliseconds).
# During a refresh, credentials are retrieved from any SDK credentials providers attached to
# the wrapper and pushed to the core.
#
# Default: 5000
# Minimum: 1
# Maximum (inclusive): 300000
# CredentialsRefreshDelay =

# Use a custom CloudWatch endpoint.
# Note this does not accept protocols or paths, only host names or ip addresses. There is no
# way to disable TLS. The KPL always connects with TLS.
Expand Down Expand Up @@ -265,6 +275,11 @@ kinesis {
# Maximum (inclusive): 16
MinConnections = 1

#Path to the native KPL binary. Only use this setting if you want to use a custom build of
#the native code.
#
#NativeExecutable=

# Limits the maximum allowed put rate for a shard, as a percentage of the
# backend limits.
#
Expand Down Expand Up @@ -350,11 +365,28 @@ kinesis {
# Maximum (inclusive): 600000
RequestTimeout = 6000

# Temp directory into which to extract the native binaries. The KPL requires write
# permissions in this directory.
#
# If not specified, defaults to /tmp in Unix. (Windows TBD)
# TempDirectory

# Verify the endpoint's certificate. Do not disable unless using
# custom_endpoint for testing. Never disable this in production.
#
# Default: true
VerifyCertificate = true

# Sets the threading model that the native process will use.
# Enum:
# ThreadingModel.PER_REQUEST: Tells the native process to create a thread for each request.
# ThreadingModel.POOLED: Tells the native process to use a thread pool. The size of the pool can be controlled by ThreadPoolSize
# Default = ThreadingModel.PER_REQUEST
# ThreadingModel =

# Sets the maximum number of threads that the native process' thread pool will be configured with.
# Default: 0
# ThreadPoolSize =
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ class KinesisProducerActorSpec
| Region = us-east-1
| KinesisEndpoint = "CustomKinesisEndpoint"
| KinesisPort = 1111
| CredentialsRefreshDelay = 5001
| CloudwatchEndpoint = "CustomCloudWatchEndpoint"
| CloudwatchPort = 2222
| EnableCoreDumps = true
| NativeExecutable = "NativeExecutable"
| TempDirectory = "TempDirectory"
| ThreadPoolSize = 1
| ThreadingModel = "ThreadingModel.POOLED"
| }
| }
|}
Expand All @@ -89,10 +94,15 @@ class KinesisProducerActorSpec
producerConf.kplConfig.getString("Region") should be("us-east-1") //validate an override properly
producerConf.kplConfig.getBoolean("AggregationEnabled") should be(true) //validate a default property
producerConf.kplConfig.getString("KinesisEndpoint") should be("CustomKinesisEndpoint") //validate an override property
producerConf.kplConfig.getInt("KinesisPort") should be(1111) //validate an override property
producerConf.kplConfig.getLong("KinesisPort") should be(1111) //validate an override property
producerConf.kplConfig.getLong("CredentialsRefreshDelay") should be(5001) //validate an override property
producerConf.kplConfig.getString("CloudwatchEndpoint") should be("CustomCloudWatchEndpoint") //validate an override property
producerConf.kplConfig.getInt("CloudwatchPort") should be(2222) //validate an override property
producerConf.kplConfig.getLong("CloudwatchPort") should be(2222) //validate an override property
producerConf.kplConfig.getBoolean("EnableCoreDumps") should be(true) //validate an override property
producerConf.kplConfig.getString("NativeExecutable") should be("NativeExecutable") //validate an override property
producerConf.kplConfig.getString("TempDirectory") should be("TempDirectory") //validate an override property
producerConf.kplConfig.getString("ThreadingModel") should be("ThreadingModel.POOLED") //validate an override property
producerConf.kplConfig.getInt("ThreadPoolSize") should be(1) //validate an override property
producerConf.throttlingConf.get.maxOutstandingRequests should be(50000)
producerConf.throttlingConf.get.retryDuration should be(100.millis)
producerConf.streamName should be("core-test-kinesis-producer")
Expand Down

0 comments on commit 12c3a1f

Please sign in to comment.