diff --git a/README.md b/README.md index 512b524f..2dbbcc10 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ repositories { } dependencies { - implementation group: 'org.radarbase', name: 'radar-commons', version: '0.12.0' + implementation group: 'org.radarbase', name: 'radar-commons', version: '0.12.1' } ``` @@ -26,7 +26,7 @@ repositories { } dependencies { - implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.12.0' + implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.12.1' } ``` @@ -40,7 +40,7 @@ repositories { } dependencies { - testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.12.0' + testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.12.1' } ``` @@ -53,7 +53,7 @@ repositories { } dependencies { - runtimeOnly group: 'org.radarbase', name: 'radar-commons-unsafe', version: '0.12.0' + runtimeOnly group: 'org.radarbase', name: 'radar-commons-unsafe', version: '0.12.1' } ``` diff --git a/build.gradle b/build.gradle index d5dadd3e..6fc7d184 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { // Get bintray version id 'com.jfrog.bintray' version '1.8.4' apply false - id 'com.jfrog.artifactory' version '4.9.1' apply false + id 'com.jfrog.artifactory' version '4.9.6' apply false id 'com.commercehub.gradle.plugin.avro' version '0.16.0' } @@ -30,21 +30,21 @@ subprojects { // Configuration // //---------------------------------------------------------------------------// - version = '0.12.0' + version = '0.12.1' group = 'org.radarbase' ext.githubRepoName = 'RADAR-base/radar-commons' ext.slf4jVersion = '1.7.26' - ext.kafkaVersion = '2.1.1' + ext.kafkaVersion = '2.2.0-cp2' ext.avroVersion = '1.8.2' - ext.confluentVersion = '5.1.2' - ext.jacksonVersion = '2.9.8' - ext.okhttpVersion = '3.13.1' + ext.confluentVersion = '5.2.1' + ext.jacksonVersion = '2.9.9' + ext.okhttpVersion = '3.14.1' ext.junitVersion = '4.12' - ext.mockitoVersion = '2.24.5' + ext.mockitoVersion = '2.27.0' ext.hamcrestVersion = '1.3' - ext.codacyVersion = '4.0.5' - ext.radarSchemasVersion = '0.4.3' + ext.codacyVersion = '6.0.0' + ext.radarSchemasVersion = '0.5.0' ext.orgJsonVersion = '20180813' ext.githubUrl = "https://github.com/$githubRepoName" @@ -111,5 +111,5 @@ subprojects { } wrapper { - gradleVersion '5.2.1' + gradleVersion '5.4.1' } diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index bab00a0f..b81f2dc5 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -82,14 +82,14 @@ publishing { } bintray { - user project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') - key project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') - override false + user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') + key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') + override = false publications 'mavenJar' pkg { repo = project.group name = project.name - userOrg = 'radar-cns' + userOrg = 'radar-base' desc = project.description licenses = ['Apache-2.0'] websiteUrl = website diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 87b738cb..5c2d1cf0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 44e7c4d1..f4d7b2bf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index af6708ff..b0d6d0ab 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index 0f8d5937..15e1ee37 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/radar-commons-server/src/test/java/org/radarbase/stream/collector/NumericAggregateCollectorTest.java b/radar-commons-server/src/test/java/org/radarbase/stream/collector/NumericAggregateCollectorTest.java index a7879c69..13e60a86 100644 --- a/radar-commons-server/src/test/java/org/radarbase/stream/collector/NumericAggregateCollectorTest.java +++ b/radar-commons-server/src/test/java/org/radarbase/stream/collector/NumericAggregateCollectorTest.java @@ -148,19 +148,19 @@ public void testAddRecord() { @Test public void testAddRecordWithNull() { this.valueCollector = new NumericAggregateCollector("recordsCached", ApplicationRecordCounts.getClassSchema(), false); - valueCollector.add(new ApplicationRecordCounts(0d, 1, 0, 1)); + valueCollector.add(new ApplicationRecordCounts(0d, 1L, 0L, 1)); assertEquals(1, valueCollector.getCount()); assertEquals(1d, valueCollector.getMean(), 1e-5d); - valueCollector.add(new ApplicationRecordCounts(0d, null, 0, 1)); + valueCollector.add(new ApplicationRecordCounts(0d, null, 0L, 1)); assertEquals(1, valueCollector.getCount()); assertEquals(1d, valueCollector.getMean(), 1d); - valueCollector.add(new ApplicationRecordCounts(0d, 2, 0, 1)); + valueCollector.add(new ApplicationRecordCounts(0d, 2L, 0L, 1)); assertEquals(2, valueCollector.getCount()); assertEquals(1.5d, valueCollector.getMean(), 1e-5d); } @Test - public void testSerialization() throws IOException { + public void testSerialization() { valueCollector = new NumericAggregateCollector(); NumericAggregateState state = new NumericAggregateState(); state.setName("test"); diff --git a/radar-commons-testing/build.gradle b/radar-commons-testing/build.gradle index 8fb78f6f..bbe4da33 100644 --- a/radar-commons-testing/build.gradle +++ b/radar-commons-testing/build.gradle @@ -18,7 +18,12 @@ apply plugin: 'application' mainClassName = 'org.radarbase.mock.MockProducer' +configurations { + applicationRuntimeOnly +} + run { + classpath += configurations.applicationRuntimeOnly if (project.hasProperty("mockConfig")) { args project.property("mockConfig") } else { @@ -41,7 +46,7 @@ dependencies { api group: 'org.apache.avro', name: 'avro', version: avroVersion api group: 'org.radarcns', name: 'radar-schemas-commons', version: radarSchemasVersion - implementation group: 'com.opencsv', name: 'opencsv', version: '4.5' + implementation group: 'com.opencsv', name: 'opencsv', version: '4.6' implementation group: 'com.fasterxml.jackson.core' , name: 'jackson-databind' , version: jacksonVersion implementation group: 'org.apache.kafka', name: 'kafka-clients', version: kafkaVersion implementation (group: 'io.confluent', name: 'kafka-avro-serializer', version: confluentVersion) { @@ -49,7 +54,7 @@ dependencies { exclude group: 'org.slf4j', module: 'slf4j-log4j12' } - runtimeOnly group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion + applicationRuntimeOnly group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion // Direct producer uses KafkaAvroSerializer if initialized testImplementation group: 'junit', name: 'junit', version: junitVersion diff --git a/radar-commons/src/main/java/org/radarbase/data/AvroRecordData.java b/radar-commons/src/main/java/org/radarbase/data/AvroRecordData.java index 2451f4be..9180e7a6 100644 --- a/radar-commons/src/main/java/org/radarbase/data/AvroRecordData.java +++ b/radar-commons/src/main/java/org/radarbase/data/AvroRecordData.java @@ -49,7 +49,7 @@ public Iterator iterator() { @Override public boolean isEmpty() { - return records.isEmpty(); + return false; } @Override