Skip to content

Commit 88dd084

Browse files
Heng CuiHeng Cui
authored andcommitted
update in application.*.conf and clean up
1 parent ae0836a commit 88dd084

5 files changed

Lines changed: 21 additions & 11 deletions

File tree

candyfloss/src/main/resources/application.dev.conf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ kafka {
1313
replication.factor = 2
1414
num.stream.threads = 2
1515
probing.rebalance.interval.ms = 120000
16-
# we may need to tune "metadata.max.age.ms" and "partition.assignment.strategy" for pattern subscription.
17-
# metadata.max.age.ms = 30000
16+
17+
# the following settings could be relevant for behaviors when having multiple topics subscribed.
1818
# partition.assignment.strategy = "org.apache.kafka.clients.consumer.CooperativeStickyAssignor"
19+
# max.partition.fetch.bytes = 128000
20+
# metadata.max.age.ms = 300000
1921
}
2022
kstream {
21-
input.topic.pattern = "dev.*\\.device-.*-raw"
22-
input.topic.name = dev.device-json-raw-input
23+
input.topic.pattern = "dev\\.device-yang(-[^-]+)?-raw"
24+
input.topic.name = "null"
2325
discard.topic.name = dev.candyfloss-processing-discard # All messages that didn't match any step in the pipeline
2426
dlq.topic.name = dev.candyfloss-processing--dlq # Messages that encountered a Java exception during the processing
2527
normalization.statestore.cutoff.time.ms = 1800000 # 30 minutes

candyfloss/src/main/resources/application.ietf.dev.conf renamed to candyfloss/src/main/resources/application.itm.dev.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
kafka {
22
application.id = "daisy.dev.candyfloss"
33
group.id = "daisy.dev.candyfloss-1"
4-
bootstrap.servers = "kafka.sbd.corproot.net:9093"
4+
bootstrap.servers = "localhost:9092"
55
acks = 1
66
linger.ms = 5
77
processing.guarantee = at_least_once
88
enable.idempotence = false
9-
schema.registry.url = "https://schema-registry.zhh.sbd.corproot.net"
9+
schema.registry.url = "https://localhost:8081"
1010
key.serializer = "org.apache.kafka.common.serialization.StringSerializer"
1111
value.serializer = "org.apache.kafka.common.serialization.StringSerializer"
1212
metrics.recording.level = DEBUG
@@ -15,6 +15,10 @@ kafka {
1515
num.stream.threads = 2
1616
auto.offset.reset = latest
1717
probing.rebalance.interval.ms = 120000
18+
19+
# partition.assignment.strategy = "org.apache.kafka.clients.consumer.CooperativeStickyAssignor"
20+
# max.partition.fetch.bytes = 128000
21+
# metadata.max.age.ms = 300000
1822
}
1923
kstream {
2024
input.topic.name = daisy.dev.device-json-raw
@@ -27,7 +31,7 @@ kstream {
2731
state.store.long.counter.wrap.limit = 10000000
2832
state.store.long.counter.time.ms = 300000 # allow max 5 min for counter wrap around otherwise it's a reset
2933
state.store.delete.scan.frequency.days = 7 # how often to trigger scanning for old unused counters and delete them
30-
pre.transform = pre-transform.ietf.dev.json
34+
pre.transform = pre-transform.itm.dev.json
3135
pipeline = {
3236
# todo: customize ietf-telemetry-message pipeline here
3337
fano-interfaces {

candyfloss/src/main/resources/application.prod.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ kafka {
1313
replication.factor = 2
1414
num.stream.threads = 2
1515
probing.rebalance.interval.ms = 120000
16+
17+
# partition.assignment.strategy = "org.apache.kafka.clients.consumer.CooperativeStickyAssignor"
18+
# max.partition.fetch.bytes = 128000
19+
# metadata.max.age.ms = 300000
1620
}
1721
kstream {
1822
input.topic.name = prod.device-json-raw-input

candyfloss/src/main/resources/pre-transform.ietf.dev.json renamed to candyfloss/src/main/resources/pre-transform.itm.dev.json

File renamed without changes.

candyfloss/src/test/java/com/swisscom/daisy/cosmos/candyfloss/DeploymentTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ protected void test(String applicationConfigFileName, String env, String name, P
2525
protected static Stream<Arguments> providerForAllYangModels()
2626
throws IOException, URISyntaxException {
2727
var outLegacy = providerForYangModels("legacy");
28-
var outIetf = providerForYangModels("ietf");
28+
var outItm = providerForYangModels("itm");
2929

30-
return Stream.concat(outLegacy, outIetf);
30+
return Stream.concat(outLegacy, outItm);
3131
}
3232

3333
/*** Discover YANG model test cases and provide them as arguments to the parametrized test */
@@ -38,7 +38,7 @@ protected static Stream<Arguments> providerForYangModels(String profile)
3838
// Create a map from the discovered folders in the `test/resources/deployment` folder
3939
// The key is the sub-folder name and the value is a full path to the sub folder
4040
String deploymentFolder =
41-
profile.equals("ietf") ? "deployment-ietf-telemetry-message" : "deployment";
41+
profile.equals("itm") ? "deployment-ietf-telemetry-message" : "deployment";
4242
var yangModels =
4343
Files.list(Path.of(Objects.requireNonNull(loader.getResource(deploymentFolder)).toURI()))
4444
.filter(Files::isDirectory)
@@ -57,7 +57,7 @@ protected static Stream<Arguments> providerForYangModels(String profile)
5757
var testFixtures = Files.list(path).filter(Files::isDirectory).toList();
5858
for (var testPath : testFixtures) {
5959
for (var env : List.of("dev", "test", "prod")) {
60-
String fileNamePrefix = profile.equals("ietf") ? "application.ietf." : "application.";
60+
String fileNamePrefix = profile.equals("itm") ? "application.itm." : "application.";
6161

6262
String applicationConfig = fileNamePrefix + env + ".conf";
6363
if (loader.getResource(applicationConfig) != null)

0 commit comments

Comments
 (0)