Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Use native timestamps in default schema #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<outputDirectory>${project.basedir}/src/generated/java/</outputDirectory>
<createSetters>false</createSetters>
<enableDecimalLogicalType>true</enableDecimalLogicalType>
<dateTimeLogicalTypeImplementation>JSR310</dateTimeLogicalTypeImplementation>
<fieldVisibility>PRIVATE</fieldVisibility>
</configuration>
</execution>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/DefaultEventRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{ "name": "detectedDuplicate", "type": "boolean" },
{ "name": "detectedCorruption", "type": "boolean" },
{ "name": "firstInSession", "type": "boolean" },
{ "name": "timestamp", "type": "long" },
{ "name": "clientTimestamp", "type": "long" },
{ "name": "timestamp", "type": { "type": "long", "logicalType": "timestamp-millis" } },
{ "name": "clientTimestamp", "type": { "type": "long", "logicalType": "timestamp-millis" } },
{ "name": "remoteHost", "type": "string" },
{ "name": "referer", "type": ["null", "string"], "default": null },
{ "name": "location", "type": ["null", "string"], "default": null },
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/divolte/record/DefaultEventRecordTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ private static DefaultEventRecord createMinimalRecord() {
.setDetectedCorruption(false)
.setDetectedDuplicate(false)
.setFirstInSession(true)
.setTimestamp(timestamp.toEpochMilli())
.setClientTimestamp(timestamp.toEpochMilli())
.setTimestamp(timestamp)
.setClientTimestamp(timestamp)
.setRemoteHost("localhost")
.build();
}
Expand Down