Skip to content

Commit

Permalink
Merge pull request #179 from RADAR-base/release-0.5.2
Browse files Browse the repository at this point in the history
Release 0.5.2
  • Loading branch information
yatharthranjan authored Aug 29, 2019
2 parents 7a831d3 + 2a61bce commit 6353fa4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ deploy:
before_install:
- cd java-sdk
- ./gradlew downloadDependencies

install:
- ./gradlew assemble --stacktrace
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"namespace": "org.radarcns.monitor.questionnaire",
"type": "record",
"name": "QuestionnaireApplicationInteractionEvent",
"doc": "Schema of reporting events for user interaction with the questionnaire application. This describes significant user interactions, such as response to notifications and starting or completing questionnaires.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "eventType", "type": {
"name": "InteractionEventType",
"doc": "NOTIFICATION_OPEN = When a user presses the notification to open the app, APP_OPEN = When a user opens the app directly, QUESTIONNAIRE_STARTED = When a user starts a questionnaire, QUESTIONNAIRE_FINISHED = When a user completes a questionnaire, QUESTIONNAIRE_CANCELLED = When a user closes a questionnaire without completing it.",
"type": "enum",
"symbols": ["NOTIFICATION_OPEN", "APP_OPEN", "QUESTIONNAIRE_STARTED", "QUESTIONNAIRE_FINISHED", "QUESTIONNAIRE_CANCELLED", "OTHER", "UNKNOWN"]
},
"doc": "Questionnaire app activity usage event type.",
"default": "UNKNOWN"
},
{ "name": "questionnaireName", "type": ["null", "string"], "doc": "Name of the questionnaire.", "default": null }
]
}
10 changes: 5 additions & 5 deletions java-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
plugins {
id 'com.commercehub.gradle.plugin.avro-base' version '0.16.0'
id 'com.jfrog.bintray' version '1.8.4' apply false
id 'com.jfrog.artifactory' version '4.9.5' apply false
id 'com.jfrog.artifactory' version '4.9.8' apply false
}

subprojects {
Expand All @@ -17,7 +17,7 @@ subprojects {
apply plugin: 'idea'

// Configuration
version = '0.5.1'
version = '0.5.2'
group = 'org.radarcns'
ext.githubRepoName = 'RADAR-base/RADAR-Schemas'

Expand All @@ -27,8 +27,8 @@ subprojects {
ext.issueUrl = "https://github.com/${githubRepoName}/issues"
ext.website = 'http://radar-cns.org'

targetCompatibility = '1.8'
sourceCompatibility = '1.8'
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8

// dependencies

Expand Down Expand Up @@ -128,5 +128,5 @@ subprojects {
}

wrapper {
gradleVersion '5.4'
gradleVersion '5.5.1'
}
15 changes: 8 additions & 7 deletions java-sdk/radar-schemas-tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ plugins {
id 'com.jfrog.artifactory'
}

targetCompatibility = '1.11'
sourceCompatibility = '1.11'
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
mainClassName = 'org.radarcns.schema.CommandLineApp'

configurations {
Expand All @@ -31,13 +31,14 @@ ext {
description = 'RADAR Schemas specification and validation tools.'

argparseVersion = '0.8.1'
jacksonVersion = '2.9.9'
jacksonVersion = '2.9.9.1'
jacksonYamlVersion = '2.9.9'
jerseyVersion = '2.28'
jettyVersion = '9.4.17.v20190418'
junitVersion = '4.12'
confluentVersion = '5.2.1'
kafkaVersion = '2.2.0-cp2'
okHttpVersion = '3.14.1'
confluentVersion = '5.3.0'
kafkaVersion = '2.3.0'
okHttpVersion = '4.0.0'
radarCommonsVersion = '0.12.1'
slf4jVersion = '1.7.26'
}
Expand All @@ -54,7 +55,7 @@ dependencies {
api group: 'javax.validation', name: 'validation-api', version: '2.0.0.Final'
api group: 'org.apache.kafka', name: 'kafka_2.12', version: kafkaVersion

implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: jacksonYamlVersion
implementation project(':radar-schemas-commons')
implementation group: 'org.radarbase', name: 'radar-commons', version: radarCommonsVersion
implementation group: 'org.radarbase', name: 'radar-commons-server', version: radarCommonsVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.radarcns.schema.util.SubCommand;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.Option;
import scala.collection.JavaConverters$;
import scala.collection.Seq;

Expand All @@ -53,7 +54,7 @@ public class KafkaTopics implements Closeable {
public KafkaTopics(@NotNull String zookeeper) {
this.zkClient = KafkaZkClient
.apply(zookeeper, false, 15_000, 10_000, 30, Time.SYSTEM, "kafka.server",
"SessionExpireListener");
"SessionExpireListener", Option.apply("radar-schemas"));
bootstrapServers = null;
initialized = false;
}
Expand All @@ -76,14 +77,14 @@ public boolean initialize(int brokers) throws InterruptedException,
numBrokers = brokerList.size();

if (numBrokers >= brokers) {
logger.info("Kafka brokers available. Waiting for topics to become available.");
// wait for 5sec before proceeding with topic creation
bootstrapServers = brokerList.stream()
.map(Broker::endPoints)
.flatMap(KafkaTopics::asStream)
.map(EndPoint::connectionString)
.collect(Collectors.joining(","));

logger.info("Creating Kafka client with bootstrap servers {}", bootstrapServers);
kafkaClient = AdminClient.create(Map.of(
BOOTSTRAP_SERVERS_CONFIG, bootstrapServers));
} else if (tries < numTries - 1) {
Expand Down Expand Up @@ -116,6 +117,7 @@ private void ensureInitialized() {
*/
public boolean refreshTopics() throws InterruptedException {
ensureInitialized();
logger.info("Waiting for topics to become available.");
int sleep = 10;
int numTries = 10;

Expand Down
11 changes: 11 additions & 0 deletions specifications/active/aRMT-1.4.3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ data:
- type: AUDIO
topic: questionnaire_audio
value_schema: .active.questionnaire.Questionnaire
questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio/audio_armt.json
- type: AUDIO_2
topic: questionnaire_audio
value_schema: .active.questionnaire.Questionnaire
questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_2/audio_2_armt.json
- type: AUDIO_3
topic: questionnaire_audio
value_schema: .active.questionnaire.Questionnaire
questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_3/audio_3_armt.json
- type: AUDIO_4
topic: questionnaire_audio
value_schema: .active.questionnaire.Questionnaire
questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_4/audio_4_armt.json
- type: RSES
topic: questionnaire_rses
value_schema: .active.questionnaire.Questionnaire
Expand All @@ -61,3 +68,7 @@ data:
doc: Timezone information sent along with each questionnaire.
topic: questionnaire_timezone
value_schema: .monitor.application.ApplicationTimeZone
- type: APP_EVENT
doc: Questionnaire application interaction event.
topic: questionnaire_app_event
value_schema: .monitor.questionnaire.QuestionnaireApplicationInteractionEvent

0 comments on commit 6353fa4

Please sign in to comment.