Blazer-007 commented on code in PR #4044: URL: https://github.com/apache/gobblin/pull/4044#discussion_r1874733767
########## gobblin-core/src/main/java/org/apache/gobblin/source/PartitionAwareFileRetrieverUtils.java: ########## @@ -52,4 +60,29 @@ public static Duration getLeadTimeDurationFromConfig(State state) { return new Duration(leadTime * leadTimeGranularity.getUnitMilliseconds()); } + + /** + * Calculates the lookback time duration based on the provided lookback time string. + * + * @param lookBackTime the lookback time string, which should include a numeric value followed by a time unit character. + * For example, "5d" for 5 days or "10h" for 10 hours. + * @return an {@link Optional} containing the {@link Duration} if the lookback time is valid, or + * an empty {@link Optional} if the lookback time is invalid or cannot be parsed. + */ + public static Optional<Duration> getLookbackTimeDuration(String lookBackTime) { Review Comment: Updated to throw IOException -- 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. To unsubscribe, e-mail: dev-unsubscr...@gobblin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org