Skip to content

Commit 1cd1350

Browse files
authored
Merge pull request #9 from RADAR-CNS/v0.2.1_release
V0.2.1 release
2 parents b252b09 + ee07e00 commit 1cd1350

17 files changed

+365
-178
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,8 @@ fabric.properties
9292
### Intellij+iml Patch ###
9393
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
9494

95+
.idea/
9596
*.iml
96-
modules.xml
97-
.idea/misc.xml
98-
*.ipr
99-
.idea/runConfigurations.xml
10097

10198
## Pebble 2
10299
.lock*

.idea/compiler.xml

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

.idea/copyright/Apache_2_0_TheHyve.xml

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

.idea/copyright/profiles_settings.xml

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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ Build jar from source with
1515
```shell
1616
./gradlew build
1717
```
18-
and find the output JAR file as `build/libs/restructurehdfs-all-0.2.jar`. Then run with:
18+
and find the output JAR file as `build/libs/restructurehdfs-0.2.1-all.jar`. Then run with:
1919

2020
```shell
21-
java -jar restructurehdfs-all-0.2.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
21+
java -jar restructurehdfs-0.2.1-all.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
2222
```
2323

2424
By default, this will output the data in CSV format. If JSON format is preferred, use the following instead:
2525
```
26-
java -Dorg.radarcns.format=json -jar restructurehdfs-all-0.2.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
26+
java -Dorg.radarcns.format=json -jar restructurehdfs-0.2.1-all.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
2727
```
2828

2929
Another option is to output the data in compressed form. All files will get the `gz` suffix, and can be decompressed with a GZIP decoder. Note that for a very small number of records, this may actually increase the file size.
3030
```
31-
java -Dorg.radarcns.compress=gzip -jar restructurehdfs-all-0.2.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
31+
java -Dorg.radarcns.compress=gzip -jar restructurehdfs-0.2.1-all.jar <webhdfs_url> <hdfs_topic_path> <output_folder>
3232
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'java'
22
apply plugin: 'application'
33

44
group 'org.radarcns.restructurehdfs'
5-
version '0.2'
5+
version '0.2.1'
66
mainClassName = 'org.radarcns.RestructureAvroRecords'
77

88
run {
@@ -56,6 +56,6 @@ artifacts {
5656
}
5757

5858
task wrapper(type: Wrapper) {
59-
gradleVersion = '3.5'
59+
gradleVersion = '4.1'
6060
distributionType 'all'
6161
}

gradle/wrapper/gradle-wrapper.jar

-75 Bytes
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Mon Jul 03 09:50:31 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
155155
fi
156156

157157
# Escape application args
158-
save ( ) {
158+
save () {
159159
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160160
echo " "
161161
}

src/main/java/org/radarcns/Frequency.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.radarcns;
1818

1919
import java.nio.file.Files;
20+
import java.util.Date;
2021
import java.util.List;
2122
import java.util.Objects;
2223
import javax.annotation.Nonnull;
@@ -63,8 +64,8 @@ public static Frequency read(File file) {
6364
return new Frequency(file, map);
6465
}
6566

66-
public void add(String topicName, String id, GenericRecord valueField, Field timeField) {
67-
String timestamp = RestructureAvroRecords.createHourTimestamp(valueField, timeField);
67+
public void add(String topicName, String id, Date date) {
68+
String timestamp = RestructureAvroRecords.createHourTimestamp(date);
6869

6970
Integer count = (Integer) bins.get(topicName, id, timestamp);
7071
if (count == null) {

0 commit comments

Comments
 (0)