Skip to content
Snippets Groups Projects
Commit 0bd6372c authored by Sören Henning's avatar Sören Henning
Browse files

Add repositories for missing sources

parent 6bc5224e
No related branches found
No related tags found
No related merge requests found
Pipeline #368 passed
......@@ -12,6 +12,18 @@ buildscript {
sourceCompatibility = "1.11"
targetCompatibility = "1.11"
allprojects {
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
}
}
dependencies {
compile project(':')
......
package uc4.streamprocessing;
import com.google.common.math.Stats;
import org.apache.avro.specific.SpecificRecord;
import org.apache.kafka.common.serialization.Serde;
import titan.ccp.common.kafka.GenericSerde;
import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory;
import titan.ccp.model.records.ActivePowerRecord;
import titan.ccp.model.records.AggregatedActivePowerRecord;
import titan.ccp.model.records.WindowedActivePowerRecord;
final class Serdes {
// private final SchemaRegistryAvroSerdeFactory avroSerdeFactory;
private final SchemaRegistryAvroSerdeFactory avroSerdeFactory;
public Serdes(final String schemaRegistryUrl) {
// this.avroSerdeFactory = new SchemaRegistryAvroSerdeFactory(schemaRegistryUrl);
this.avroSerdeFactory = new SchemaRegistryAvroSerdeFactory(schemaRegistryUrl);
}
public Serde<String> string() {
return org.apache.kafka.common.serialization.Serdes.String();
}
/*
* public Serde<WindowedActivePowerRecord> windowedActivePowerValues() { return
* this.avroSerdeFactory.forKeys(); }
*
* public Serde<ActivePowerRecord> activePowerRecordValues() { return
* this.avroSerdeFactory.forValues(); }
*
* public Serde<AggregatedActivePowerRecord> aggregatedActivePowerRecordValues() { return
* this.avroSerdeFactory.forValues(); }
*
* public <T extends SpecificRecord> Serde<T> avroValues() { return
* this.avroSerdeFactory.forValues(); }
*/
public Serde<WindowedActivePowerRecord> windowedActivePowerValues() {
return this.avroSerdeFactory.forKeys();
}
public Serde<ActivePowerRecord> activePowerRecordValues() {
return this.avroSerdeFactory.forValues();
}
public Serde<AggregatedActivePowerRecord> aggregatedActivePowerRecordValues() {
return this.avroSerdeFactory.forValues();
}
public <T extends SpecificRecord> Serde<T> avroValues() {
return this.avroSerdeFactory.forValues();
}
public Serde<Stats> stats() {
return GenericSerde.from(Stats::toByteArray, Stats::fromByteArray);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment