Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Commit aedc0ba

Browse files
author
Florian Lautenschlager
committed
Upgraded chronix server integration to Chronix Server 0.1.3 and Kassiopeia 0.1.7
1 parent 8fc48d7 commit aedc0ba

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

chronix-server-integration/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ dependencies {
3131

3232
//Chronix
3333
compile 'de.qaware.chronix:chronix-api:0.1'
34-
compile 'de.qaware.chronix:chronix-server-client:0.1.2'
34+
compile 'de.qaware.chronix:chronix-server-client:0.1.3'
3535

3636
//Kassiopeia-Simple
37-
compile 'de.qaware.chronix:chronix-kassiopeia-simple:0.1.4'
38-
compile 'de.qaware.chronix:chronix-kassiopeia-simple-converter:0.1.4'
37+
compile 'de.qaware.chronix:chronix-kassiopeia-simple:0.1.7'
38+
compile 'de.qaware.chronix:chronix-kassiopeia-simple-converter:0.1.7'
3939

4040
//Kassiopeia
41-
compile 'de.qaware.chronix:chronix-kassiopeia:0.1.4'
42-
compile 'de.qaware.chronix:chronix-kassiopeia-converter:0.1.4'
41+
compile 'de.qaware.chronix:chronix-kassiopeia:0.1.7'
42+
compile 'de.qaware.chronix:chronix-kassiopeia-converter:0.1.7'
4343

4444
//Solr
4545
compile 'org.apache.solr:solr-solrj:5.5.0'

chronix-server-integration/src/main/java/de/qaware/chronix/examples/server/ChronixClientExampleWithKassiopeiaSimple.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@ public static void main(String[] args) {
5252

5353
//Define a reduce function for the grouped time series records
5454
BinaryOperator<MetricTimeSeries> reduce = (ts1, ts2) -> {
55-
MetricTimeSeries.Builder reduced = new MetricTimeSeries
56-
.Builder(ts1.getMetric())
57-
.points(concat(ts1.getTimestamps(), ts2.getTimestamps()),
58-
concat(ts1.getValues(), ts2.getValues()))
59-
.attributes(ts2.attributes());
60-
return reduced.build();
55+
if (ts1 == null || ts2 == null) {
56+
return new MetricTimeSeries.Builder("empty").build();
57+
}
58+
ts1.addAll(ts2.getTimestampsAsArray(), ts2.getValuesAsArray());
59+
return ts1;
6160
};
6261
//Instantiate a Chronix Client
6362
ChronixClient<MetricTimeSeries, SolrClient, SolrQuery> chronix = new ChronixClient<>(

0 commit comments

Comments
 (0)