-
Notifications
You must be signed in to change notification settings - Fork 16
Test: Aerospike module storage #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: aerospike-module-storage
Are you sure you want to change the base?
Changes from all commits
adf8a35
382ad09
744f760
be58a9d
a1f5ca2
60910a7
0a85c18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package org.prebid.cache.functional.model.request | ||
|
|
||
| data class AvailableTag( | ||
| val tag: String, | ||
| val values: List<String> | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package org.prebid.cache.functional.model.request | ||
|
|
||
| data class Measurement( | ||
| val statistic: String, | ||
| val value: Number | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package org.prebid.cache.functional.model.request | ||
|
|
||
| data class MetricDetail( | ||
| val name: String, | ||
| val description: String? = null, | ||
| val baseUnit: String? = null, | ||
| val measurements: List<Measurement>, | ||
| val availableTags: List<AvailableTag> | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,10 +35,18 @@ class PrebidCacheContainerConfig( | |
| ): Map<String, String> = | ||
| getBaseConfig(allowExternalUuid, cacheWriteSecured) + getApacheIgniteConfig(ingineCacheName) | ||
|
|
||
| fun getBaseModuleStorageConfig(applicationName: String, apiKey: String): Map<String, String> = | ||
| fun getRedisModuleStorageConfig(applicationName: String, apiKey: String): Map<String, String> = | ||
| getBaseConfig(allowExternalUuid = true, apiKey = apiKey) + | ||
| getModuleStorageRedisConfig(applicationName) + getRedisConfig() | ||
|
|
||
| fun getAerospikeModuleStorageConfig( | ||
| applicationName: String, | ||
| apiKey: String, | ||
| aerospikeNamespace: String = NAMESPACE | ||
| ): Map<String, String> = getBaseConfig(allowExternalUuid = true, apiKey = apiKey) + | ||
| getModuleStorageAerospikeConfig(applicationName) + | ||
| getAerospikeConfig(aerospikeNamespace) | ||
|
|
||
| fun getCacheExpiryConfig(minExpiry: String = "15", maxExpiry: String = "28800"): Map<String, String> = | ||
| mapOf( | ||
| "cache.min.expiry" to minExpiry, | ||
|
|
@@ -92,12 +100,29 @@ class PrebidCacheContainerConfig( | |
|
|
||
| private fun getModuleStorageRedisConfig( | ||
| applicationName: String, | ||
| timeoutMs: Long = 9999L, | ||
| ): Map<String, String> = | ||
| mapOf( | ||
| "storage.redis.${applicationName}.port" to RedisContainer.PORT.toString(), | ||
| "storage.redis.${applicationName}.host" to redisHost, | ||
| "storage.redis.${applicationName}.timeout" to timeoutMs.toString(), | ||
| "storage.redis.${applicationName}.timeout" to "9999", | ||
| "storage.default-ttl-seconds" to 1000L.toString() | ||
| ) | ||
|
|
||
| private fun getModuleStorageAerospikeConfig( | ||
| applicationName: String, | ||
| preventUuidDuplication: Boolean = false, | ||
| ): Map<String, String> = | ||
| mapOf( | ||
| "storage.aerospike.${applicationName}.port" to AerospikeContainer.PORT.toString(), | ||
| "storage.aerospike.${applicationName}.host" to aerospikeHost, | ||
| "storage.aerospike.${applicationName}.cores" to "4", | ||
| "storage.aerospike.${applicationName}.timeout" to "9999", | ||
| "storage.aerospike.${applicationName}.password" to "", | ||
| "storage.aerospike.${applicationName}.first_backoff" to "300", | ||
| "storage.aerospike.${applicationName}.max_backoff" to "1000", | ||
| "storage.aerospike.${applicationName}.max_retry" to "3", | ||
| "storage.aerospike.${applicationName}.namespace" to NAMESPACE, | ||
| "storage.aerospike.${applicationName}.prevent-u-u-i-d-duplication" to preventUuidDuplication.toString(), | ||
| "storage.default-ttl-seconds" to 1000L.toString() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's basically the base config + getAerospikePreventUuidDuplicationConfig, so why not use them?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getAerospikePreventUuidDuplicationConfig and storage.aerospike.${applicationName}.prevent-u-u-i-d-duplication different property |
||
| ) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.