vinothchandar commented on a change in pull request #623: Hudi Test Suite
URL: https://github.com/apache/incubator-hudi/pull/623#discussion_r276877731
 
 

 ##########
 File path: 
hoodie-bench/src/main/java/com/uber/hoodie/integrationsuite/helpers/DFSTestSuitePathSelector.java
 ##########
 @@ -0,0 +1,74 @@
+package com.uber.hoodie.integrationsuite.helpers;
+
+import com.uber.hoodie.common.util.TypedProperties;
+import com.uber.hoodie.common.util.collection.ImmutablePair;
+import com.uber.hoodie.common.util.collection.Pair;
+import com.uber.hoodie.exception.HoodieIOException;
+import com.uber.hoodie.utilities.sources.helpers.DFSPathSelector;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.LocatedFileStatus;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.RemoteIterator;
+
+/**
+ * A custom dfs path selector used only for the hudi test suite. To be used 
only if workload is not run inline.
+ */
+public class DFSTestSuitePathSelector extends DFSPathSelector {
+
+  public DFSTestSuitePathSelector(TypedProperties props, Configuration 
hadoopConf) {
+    super(props, hadoopConf);
+  }
+
+  @Override
+  public Pair<Optional<String>, String> getNextFilePathsAndMaxModificationTime(
+      Optional<String> lastCheckpointStr, long sourceLimit) {
+
+    Integer lastBatchId;
+    Integer nextBatchId;
+    try {
+      if (lastCheckpointStr.isPresent()) {
+        lastBatchId = Integer.parseInt(lastCheckpointStr.get());
 
 Review comment:
   main customization seems to be the reading of input, batch by batch? Won't 
tailing the dfs by modification time as support by deltastreamer not already 
achieve this? 

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