diff --git a/theodolite-benchmarks/uc3-beam-samza/Dockerfile b/theodolite-benchmarks/uc3-beam-samza/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f16ec202eedc33062f29a2a5856b70c0b7fd43ec --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/Dockerfile @@ -0,0 +1,5 @@ +FROM openjdk:8-slim + +ADD build/distributions/uc4-application-flink.tar / + +CMD /uc4-application-flink/bin/uc4-application-flink --runner=FlinkRunner --flinkMaster=flink-jobmanager:8081 --streaming --parallelism=$PARALLELISM --disableMetrics=true --fasterCopy --stateBackend=rocksdb --stateBackendStoragePath=file:///data/flink/checkpoints \ No newline at end of file diff --git a/theodolite-benchmarks/uc3-beam-samza/build.gradle b/theodolite-benchmarks/uc3-beam-samza/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..3673058cdf273586f1ff165723d16610cb3719d0 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/build.gradle @@ -0,0 +1,11 @@ +plugins { + id 'theodolite.beam' +} + + +dependencies { + compile group: 'org.apache.beam', name: 'beam-runners-samza', version: '2.22.0' + compile project(':uc3-beam') +} + +mainClassName = "application.Uc3BeamSamza" \ No newline at end of file diff --git a/theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java b/theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java new file mode 100644 index 0000000000000000000000000000000000000000..d25e692aa79465d0c68e9efafa503d2a9469158a --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java @@ -0,0 +1,39 @@ +package application; + +import org.apache.beam.runners.samza.SamzaRunner; +import theodolite.commons.beam.AbstractBeamService; + +/** + * Implementation of the use case Aggregation based on Time Attributes using Apache Beam with the + * Flink Runner. To run locally in standalone start Kafka, Zookeeper, the schema-registry and the + * workload generator using the delayed_startup.sh script. And configure the Kafka, Zookeeper and + * Schema Registry urls accordingly. Start a Flink cluster and pass its REST adress + * using--flinkMaster as run parameter. To persist logs add + * ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File under Standard + * Input Output in Common in the Run Configuration Start via Eclipse Run. + */ +public final class Uc3BeamSamza extends AbstractBeamService { + + /** + * Private constructor to avoid instantiation. + */ + private Uc3BeamSamza(final String[] args) { //NOPMD + super(args); + this.options.setRunner(SamzaRunner.class); + } + + /** + * Start running this microservice. + */ + public static void main(final String[] args) { + + final Uc3BeamSamza uc3BeamSamza = new Uc3BeamSamza(args); + + final Uc3BeamPipeline pipeline = + new Uc3BeamPipeline(uc3BeamSamza.options, uc3BeamSamza.getConfig()); + + pipeline.run().waitUntilFinish(); + } + +} + diff --git a/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..6e9d22bca01e9bf341518b2026390b1c9098af0f --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties @@ -0,0 +1,22 @@ +application.name=theodolite-uc1-application +application.version=0.0.1 + +kafka.bootstrap.servers=localhost:9092 +kafka.input.topic=input +kafka.output.topic=output +kafka.window.duration.minutes=1 + +schema.registry.url=http://localhost:8081 + +aggregation.duration.days=30 +aggregation.advance.days=1 + +trigger.interval=15 + +num.threads=1 +commit.interval.ms=1000 +cache.max.bytes.buffering=-1 + +specific.avro.reader=True +enable.auto.commit.config=True +auto.offset.reset.config=earliest \ No newline at end of file