Skip to content

Commit f3c018a

Browse files
authored
Merge pull request #88 from RADAR-base/release-1.1.6
Release 1.1.6
2 parents 178ebf0 + bd0fda0 commit f3c018a

File tree

18 files changed

+92
-110
lines changed

18 files changed

+92
-110
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ cache:
1616
- $HOME/.gradle/wrapper/
1717

1818
env:
19-
- DOCKER_COMPOSE_VERSION=1.25.4
19+
- DOCKER_COMPOSE_VERSION=1.27.4
2020

2121
before_install:
22-
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
22+
- curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" > docker-compose
2323
- chmod +x docker-compose
2424
- sudo mv docker-compose /usr/local/bin
2525
- ./gradlew downloadDependencies

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
FROM gradle:6.6.1-jdk11 AS builder
13+
FROM gradle:6.7.1-jdk11 AS builder
1414

1515
RUN mkdir /code
1616
WORKDIR /code
@@ -31,10 +31,18 @@ MAINTAINER Joris Borgdorff <[email protected]>, Yatharth Ranjan<yatharth.ranjan@k
3131

3232
LABEL description="RADAR-base output data restructuring"
3333

34+
ENV RADAR_OUTPUT_RESTRUCTURE_OPTS=""
3435
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -XX:+UseG1GC -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=10"
3536

3637
COPY --from=builder /code/build/third-party/* /usr/lib/
3738
COPY --from=builder /code/build/scripts/* /usr/bin/
3839
COPY --from=builder /code/build/libs/* /usr/lib/
3940

41+
RUN mkdir /output \
42+
&& chown 101:101 /output
43+
44+
VOLUME ["/output"]
45+
46+
USER 101:101
47+
4048
ENTRYPOINT ["radar-output-restructure"]

Dockerfile.hdfs

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

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ It supports data written by [RADAR HDFS sink connector](https://github.com/RADAR
77

88
## Upgrade instructions
99

10+
When upgrading to version 1.2.0, please follow the following instructions:
11+
12+
- When using local target storage, ensure that:
13+
1. it is writable by the user 101, or change the runtime user using the docker command-line flag `--user` to a user that can write to the target storage and
14+
2. local storage properties `userId` and `groupId` are set to values that can write to the target storage.
15+
1016
When upgrading to version 1.0.0 or later from version 0.6.0 please follow the following instructions:
1117

1218
- This package now relies on Redis for locking and offset management. Please install Redis or use
@@ -36,9 +42,11 @@ When upgrading to version 1.0.0 or later from version 0.6.0 please follow the fo
3642
target:
3743
type: local
3844
local:
39-
# User ID to write data as
45+
# User ID to write data as. This only works when explicitly setting
46+
# the runtime user to root.
4047
userId: 123
41-
# Group ID to write data as
48+
# Group ID to write data as. This only works when explicitly setting
49+
# the runtime user to root.
4250
groupId: 123
4351
```
4452

@@ -60,12 +68,10 @@ When upgrading to version 0.6.0 from version 0.5.x or earlier, please follow the
6068
## Docker usage
6169

6270
This package is available as docker image [`radarbase/radar-output-restructure`](https://hub.docker.com/r/radarbase/radar-output-restructure). The entrypoint of the image is the current application. So in all the commands listed in usage, replace `radar-output-restructure` with for example:
71+
6372
```shell
64-
docker run --rm -t --network hadoop -v "$PWD/output:/output" radarbase/radar-output-restructure:1.1.5-hdfs -n hdfs-namenode -o /output /myTopic
73+
docker run --rm -t --network hadoop -v "$PWD/output:/output" radarbase/radar-output-restructure:1.1.6 -n hdfs-namenode -o /output /myTopic
6574
```
66-
if your docker cluster is running in the `hadoop` network and your output directory should be `./output`.
67-
68-
Docker image tags that are optimized for HDFS are suffixed with `-hdfs`. Otherwise, please use the image without that suffix.
6975

7076
## Command line usage
7177

@@ -171,7 +177,7 @@ This package requires at least Java JDK 8. Build the distribution with
171177
and install the package into `/usr/local` with for example
172178
```shell
173179
sudo mkdir -p /usr/local
174-
sudo tar -xzf build/distributions/radar-output-restructure-1.1.5.tar.gz -C /usr/local --strip-components=1
180+
sudo tar -xzf build/distributions/radar-output-restructure-1.1.6.tar.gz -C /usr/local --strip-components=1
175181
```
176182

177183
Now the `radar-output-restructure` command should be available.

build.gradle

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
plugins {
2-
id 'java'
3-
id 'java-library'
2+
id 'org.jetbrains.kotlin.jvm'
43
id 'application'
54
id 'com.jfrog.bintray' version '1.8.5'
65
id 'maven-publish'
7-
id 'org.jetbrains.kotlin.jvm'
8-
id 'com.avast.gradle.docker-compose' version "0.13.4"
6+
id "org.jetbrains.dokka"
7+
id 'com.avast.gradle.docker-compose' version "0.14.0"
98
}
109

1110
group 'org.radarbase'
12-
version '1.1.5'
11+
version '1.1.6'
1312
mainClassName = 'org.radarbase.output.Application'
1413

15-
sourceCompatibility = '1.8'
16-
targetCompatibility = '1.8'
17-
1814
ext {
1915
moduleDescription = 'RADAR-base output restructuring'
2016
website = 'https://radar-base.org'
2117
githubRepoName = 'RADAR-base/Restructure-HDFS-topic'
2218
githubUrl = "https://github.com/${githubRepoName}"
2319
issueUrl = "${githubUrl}/issues"
2420

25-
avroVersion = '1.10.0'
26-
jacksonVersion = '2.11.3'
21+
avroVersion = '1.10.1'
22+
jacksonVersion = '2.12.0'
2723
hadoopVersion = '3.3.0'
2824
jCommanderVersion = '1.78'
2925
almworksVersion = '1.1.2'
30-
junitVersion = '5.6.2'
31-
minioVersion = '7.1.4'
32-
jedisVersion = '3.3.0'
26+
junitVersion = '5.7.0'
27+
minioVersion = '8.0.3'
28+
jedisVersion = '3.4.0'
3329
slf4jVersion = '1.7.30'
34-
azureStorageVersion = '12.8.0'
30+
azureStorageVersion = '12.9.0'
3531
}
3632

3733
repositories {
@@ -80,21 +76,15 @@ dependencies {
8076
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
8177
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
8278
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
83-
}
8479

85-
compileKotlin {
86-
kotlinOptions {
87-
jvmTarget = "1.8"
88-
}
80+
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:$kotlinVersion")
8981
}
90-
compileTestKotlin {
91-
kotlinOptions {
92-
jvmTarget = "1.8"
93-
}
94-
}
95-
compileIntegrationTestKotlin {
82+
83+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
9684
kotlinOptions {
97-
jvmTarget = "1.8"
85+
jvmTarget = "11"
86+
apiVersion = "1.4"
87+
languageVersion = "1.4"
9888
}
9989
}
10090

@@ -152,6 +142,7 @@ task integrationTest(type: Test) {
152142
showStandardStreams = true
153143
setExceptionFormat("full")
154144
}
145+
outputs.upToDateWhen { false }
155146
shouldRunAfter test
156147
}
157148

@@ -186,18 +177,17 @@ task sourcesJar(type: Jar, dependsOn: classes) {
186177
manifest.from sharedManifest
187178
}
188179

189-
task javadocJar(type: Jar, dependsOn: javadoc) {
190-
archiveClassifier.set('javadoc')
191-
from javadoc.destinationDir
192-
manifest.from sharedManifest
180+
task dokkaJar(type: Jar, dependsOn: dokkaJavadoc) {
181+
archiveClassifier.set("javadoc")
182+
from("$buildDir/dokka/javadoc/")
193183
}
194184

195185
publishing {
196186
publications {
197187
mavenJar(MavenPublication) {
198188
from components.java
199189
artifact sourcesJar
200-
artifact javadocJar
190+
artifact dokkaJar
201191
pom {
202192
url = githubUrl as String
203193
description = moduleDescription
@@ -261,5 +251,5 @@ bintray {
261251
}
262252

263253
wrapper {
264-
gradleVersion '6.6.1'
254+
gradleVersion '6.7.1'
265255
}

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- /data
1111

1212
redis:
13-
image: bitnami/redis
13+
image: bitnami/redis:6.0
1414
ports:
1515
- "6379:6379"
1616
environment:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
kotlinVersion=1.4.0
1+
kotlinVersion=1.4.20
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

restructure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ target:
5858
container: MyTargetContainer
5959
# only actually needed if target type is local
6060
local:
61-
userId: 1000 # write as regular user, use -1 to use current user (default).
62-
groupId: 100 # write as regular group, use -1 to use current user (default).
61+
userId: 1000 # write as user ID 1000, use -1 to use current user (default).
62+
groupId: 100 # write as group ID 100, use -1 to use current user (default).
6363

6464
# Redis configuration
6565
# @since: 0.7.0

settings.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ pluginManagement {
22
resolutionStrategy {
33
eachPlugin {
44
if ( requested.id.id == 'org.jetbrains.kotlin.jvm' ) {
5-
useModule( "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" )
5+
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
6+
}
7+
if (requested.id.id == "org.jetbrains.dokka") {
8+
useModule("org.jetbrains.dokka:dokka-gradle-plugin:$kotlinVersion")
69
}
710
}
811
}

0 commit comments

Comments
 (0)