zxcware commented on a change in pull request #2856: [GOBBLIN-1011] adjust
compaction flow to work with virtual partition
URL: https://github.com/apache/incubator-gobblin/pull/2856#discussion_r360974481
##########
File path:
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/CompactionAuditCountVerifier.java
##########
@@ -118,17 +131,21 @@ private static AuditCountClientFactory getClientFactory
(State state) {
* @return If verification is succeeded
*/
public Result verify (FileSystemDataset dataset) {
+ if (!enabled) {
+ return new Result(true, "");
+ }
if (auditCountClient == null) {
log.debug("No audit count client specified, skipped");
return new Result(true, "");
}
- CompactionPathParser.CompactionParserResult result = new
CompactionPathParser(this.state).parse(dataset);
- DateTime startTime = result.getTime();
- DateTime endTime = startTime.plusHours(1);
+ CompactionPathParser.CompactionParserResult result = new
CompactionPathParser(state).parse(dataset);
+ ZonedDateTime startTime =
ZonedDateTime.ofInstant(Instant.ofEpochMilli(result.getTime().getMillis()),
zone);
Review comment:
Because `TimeIterator.inc` accepts `ZoneDateTime`. I implemented
`TimeIterator` using java.time as joda time is kind of deprecated by java 8+.
> The standard date and time classes prior to Java SE 8 are poor. By
tackling this problem head-on, Joda-Time became the de facto standard date and
time library for Java prior to Java SE 8. Note that from Java SE 8 onwards,
users are asked to migrate to java.time (JSR-310) - a core part of the JDK
which replaces this project.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services