Skip to content

Commit 6a80d59

Browse files
Merge pull request #42 from RADAR-CNS/release_0.1.1
Prepare Release 0.1.1
2 parents 7fff01f + b0103ef commit 6a80d59

File tree

70 files changed

+1170
-1336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1170
-1336
lines changed

.idea/compiler.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ language: java
22
jdk:
33
- oraclejdk8
44
sudo: required
5+
56
services:
67
- docker
8+
79
env:
8-
DOCKER_COMPOSE_VERSION: 1.9.0
10+
DOCKER_COMPOSE_VERSION: 1.16.1
911
TERM: dumb
10-
before_cache:
11-
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
12-
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
12+
1313
cache:
1414
directories:
15-
- $HOME/.gradle/caches/
16-
- $HOME/.gradle/wrapper/
15+
- $HOME/.gradle/caches/jars-1
16+
- $HOME/.gradle/caches/jars-2
17+
- $HOME/.gradle/caches/jars-3
18+
- $HOME/.gradle/caches/modules-2/files-2.1/
19+
- $HOME/.gradle/native
20+
- $HOME/.gradle/wrapper
1721

1822
before_install:
1923
- mkdir -p "$HOME/bin";
@@ -31,7 +35,10 @@ deploy:
3135
provider: releases
3236
api_key: ${GH_TOKEN}
3337
file_glob: true
34-
file: "build/libs/*.jar"
38+
file:
39+
- build/libs/*.jar
40+
- build/distributions/*.zip
41+
- build/distributions/*.tar.gz
3542
skip_cleanup: true
3643
on:
3744
tags: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM confluentinc/cp-base:3.2.1-5
1+
FROM confluentinc/cp-base:3.3.0
22

33
ENV TERM=dumb
44

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ To get email notifications for Empatica E4 battery status, an email server witho
135135
data:
136136
- topic: topic1
137137
file: topic1.csv
138-
key_schema: org.radarcns.key.MeasurementKey
139-
value_schema: org.radarcns.empatica.EmpaticaE4Acceleration
138+
key_schema: org.radarcns.kafka.ObservationKey
139+
value_schema: org.radarcns.passive.empatica.EmpaticaE4Acceleration
140140
```
141141

142142
Each value has a topic to send the data to, a file containing the data, a schema class for the key and a schema class for the value. Also create a CSV file for each of these entries:
@@ -177,7 +177,7 @@ RADAR-Stream is a layer on top of Kafka streams. Topics are processed by streams
177177
KafkaStreams currently communicates using master-slave model. The [MasterAggregator][1] defines the stream-master, while [AggregatorWorker][2] represents the stream-slave. The master-stream creates, starts and stops a list of stream-slaves registered with the corresponding master.
178178
While the classical Kafka Consumer requires two implementations to support standalone and group executions, the AggregatorWorker provides both behaviors with one implementation.
179179

180-
To extend the RADAR-Stream API, follow these steps (see the `org.radarcns.empatica` package as an example):
180+
To extend the RADAR-Stream API, follow these steps (see the `org.radarcns.passive.empatica` package as an example):
181181

182182
- Create a stream group by overriding [GeneralStreamGroup][8]. Use its `createSensorStream` and `createStream` methods to create the stream definitions.
183183
- For each topic, create a [AggregatorWorker][2].

build.gradle

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plugins {
1717
//---------------------------------------------------------------------------//
1818

1919
group = 'org.radarcns'
20-
version = '0.1'
20+
version = '0.1.1'
2121
ext.description = 'Kafka backend for processing device data.'
2222

2323
mainClassName = 'org.radarcns.RadarBackend'
@@ -30,21 +30,22 @@ sourceCompatibility = '1.8'
3030

3131
ext.boundaryVersion = '1.0.6'
3232
ext.codacyVersion = '1.0.10'
33-
ext.confluentVersion = '3.2.1'
33+
ext.confluentVersion = '3.3.0'
3434
ext.hamcrestVersion = '1.3'
35-
ext.kafkaVersion = '0.10.2.1'
35+
ext.kafkaVersion = '0.11.0.1'
3636
ext.jacksonVersion='2.8.5'
3737
ext.javaMailVersion = '1.5.6'
3838
ext.junitVersion = '4.12'
3939
ext.mathVersion = '3.0'
4040
ext.findbugVersion = '3.0.1'
4141
ext.commonsCliVersion = '1.2'
4242
ext.mockitoVersion = '2.2.29'
43-
ext.radarCommonsVersion = '0.5'
44-
ext.radarSchemasVersion = '0.2-alpha.1'
43+
ext.radarCommonsVersion = '0.6.3'
44+
ext.radarSchemasVersion = '0.2.2'
4545
ext.subethamailVersion = '3.1.7'
4646
ext.jsoupVersion = '1.10.2'
47-
ext.slf4jVersion = '1.7.21'
47+
ext.slf4jVersion = '1.7.25'
48+
ext.log4jVersion = '1.2.17'
4849
ext.avroVersion = '1.8.2'
4950

5051
ext.githubUrl = 'https://github.com/' + githubRepoName + '.git'
@@ -81,9 +82,6 @@ configurations.all {
8182

8283
// In this section you declare where to find the dependencies of your project
8384
repositories {
84-
// For working with dev-branch commons
85-
maven { url "${rootProject.projectDir}/libs" }
86-
8785
// Use 'jcenter' for resolving your dependencies.
8886
// You can declare any Maven/Ivy/file repository here.
8987
jcenter()
@@ -100,15 +98,16 @@ repositories {
10098
dependencies {
10199
compile group: 'org.radarcns', name: 'radar-commons', version: radarCommonsVersion
102100
compile group: 'org.apache.avro', name: 'avro', version: avroVersion
103-
compile (group: 'org.radarcns', name: 'radar-commons-testing', version: radarCommonsVersion) {
104-
exclude group: 'org.slf4j', module: 'slf4j-simple'
105-
}
101+
compile group: 'org.radarcns', name: 'radar-commons-testing', version: radarCommonsVersion
106102
compile group: 'org.radarcns', name: 'radar-schemas-commons', version: radarSchemasVersion
107103

108104
// Kafka streaming API
109105
compile group: 'org.apache.kafka', name: 'kafka-streams', version: kafkaVersion
110-
compile (group: 'io.confluent', name: 'kafka-avro-serializer', version: confluentVersion) {
106+
compile (group: 'io.confluent', name: 'kafka-streams-avro-serde', version: confluentVersion) {
111107
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
108+
exclude group: 'log4j', module: 'log4j'
109+
exclude group: 'jline', module: 'jline'
110+
exclude group: 'io.netty', module: 'netty'
112111
}
113112

114113
// Nonnull annotation
@@ -135,8 +134,12 @@ dependencies {
135134
// Mock mail server
136135
testCompile group: 'org.subethamail', name: 'subethasmtp', version: subethamailVersion
137136

138-
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
139-
integrationTestImplementation group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
137+
runtimeOnly group: 'log4j', name: 'log4j', version: log4jVersion
138+
runtimeOnly group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
139+
testImplementation group: 'log4j', name: 'log4j', version: log4jVersion
140+
testImplementation group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
141+
integrationTestImplementation group: 'log4j', name: 'log4j', version: log4jVersion
142+
integrationTestImplementation group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
140143

141144
// For Topic name validation based on Kafka classes
142145
testImplementation (group: 'org.apache.kafka', name: 'kafka_2.11', version: kafkaVersion) {
@@ -300,6 +303,10 @@ ext.sharedManifest = manifest {
300303
// Packaging //
301304
//---------------------------------------------------------------------------//
302305

306+
processResources {
307+
expand(version: version)
308+
}
309+
303310
jar {
304311
manifest {
305312
from sharedManifest
@@ -309,7 +316,11 @@ jar {
309316

310317
shadowJar {
311318
mergeServiceFiles()
312-
exclude 'log4j.properties'
319+
}
320+
321+
tasks.withType(Tar){
322+
compression = Compression.GZIP
323+
extension = 'tar.gz'
313324
}
314325

315326
// custom tasks for creating source/javadoc jars
@@ -345,6 +356,11 @@ publishing {
345356
root.appendNode('description', description)
346357
root.appendNode('name', rootProject.name)
347358
root.appendNode('url', githubUrl)
359+
root.dependencies.'*'.findAll() {
360+
it.artifactId.text() in ['log4j', 'slf4j-log4j12']
361+
}.each() {
362+
it.parent().remove(it)
363+
}
348364
root.children().last() + pomConfig
349365
}
350366
}
@@ -380,7 +396,7 @@ bintray {
380396

381397
task wrapper(type: Wrapper) {
382398
gradleVersion = '4.1'
383-
distributionUrl distributionUrl.replace("bin", "all")
399+
distributionType 'all'
384400
}
385401

386402
run {

docker-compose.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
# Zookeeper Cluster #
77
#---------------------------------------------------------------------------#
88
zookeeper-1:
9-
image: confluentinc/cp-zookeeper:3.2.1
9+
image: confluentinc/cp-zookeeper:3.3.0
1010
environment:
1111
ZOOKEEPER_SERVER_ID: 1
1212
ZOOKEEPER_CLIENT_PORT: 2181
@@ -19,7 +19,7 @@ services:
1919
# Kafka Cluster #
2020
#---------------------------------------------------------------------------#
2121
kafka-1:
22-
image: confluentinc/cp-kafka:3.2.1
22+
image: confluentinc/cp-kafka:3.3.0
2323
depends_on:
2424
- zookeeper-1
2525
environment:
@@ -28,12 +28,19 @@ services:
2828
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092
2929
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
3030
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
31+
KAFKA_INTER_BROKER_PROTOCOL_VERSION: 0.11.0
32+
KAFKA_LOG_MESSAGE_FORMAT_VERSION: 0.11.0
33+
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
34+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
35+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
36+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
37+
3138

3239
#---------------------------------------------------------------------------#
3340
# Schema Registry #
3441
#---------------------------------------------------------------------------#
3542
schema-registry-1:
36-
image: confluentinc/cp-schema-registry:3.2.1
43+
image: confluentinc/cp-schema-registry:3.3.0
3744
depends_on:
3845
- zookeeper-1
3946
- kafka-1
@@ -50,7 +57,7 @@ services:
5057
# REST proxy #
5158
#---------------------------------------------------------------------------#
5259
rest-proxy-1:
53-
image: confluentinc/cp-kafka-rest:3.2.1
60+
image: confluentinc/cp-kafka-rest:3.3.0
5461
depends_on:
5562
- kafka-1
5663
- schema-registry-1
@@ -74,3 +81,6 @@ services:
7481
- schema-registry-1
7582
command:
7683
- integrationTest
84+
volumes:
85+
- ./build/jacoco:/code/build/jacoco
86+
- ./build/reports:/code/build/reports

radar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ broker:
1919

2020
#Kafka internal parameters
2121
stream_properties:
22-
auto_commit_interval_ms: 1000
23-
session_timeout_ms: 10000
22+
auto.commit.interval.ms: 1000
23+
session.timeout.ms: 10000
2424

2525
#============================ Kafka Streams ============================#
2626
#The number of threads that a stream must be run according is priority

src/integrationTest/java/org/radarcns/integration/DirectProducerTest.java

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)