yukuai518 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_r360965192
 
 

 ##########
 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:
   I'm not quite sure if we really need to convert to ZoneDateTime first. Seems 
like current joda DateTime already supports plusMinutes,  plusHours, plusDays, 
plusMonths.

----------------------------------------------------------------
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

Reply via email to