Github user djKooks commented on a diff in the pull request:
https://github.com/apache/incubator-griffin/pull/366#discussion_r204282850
--- Diff: service/src/main/java/org/apache/griffin/core/util/FSUtil.java ---
@@ -177,4 +177,23 @@ private static void checkHDFSConf() {
}
}
+ public static String getFirstMissRecordPath(String hdfsDir) throws
Exception{
+ List<FileStatus> fileList = listFileStatus(hdfsDir);
+ for(int i=0; i<fileList.size();i++){
+
if(fileList.get(i).getPath().toUri().toString().toLowerCase().contains("missrecord")){
+ return fileList.get(i).getPath().toUri().toString();
+ }
+ }
+ return null;
--- End diff --
Is it okay to return `null`? Because it seems it can be used in
`isFileExists` method, and there is no null checking.
Please let me know if I'm thinking wrong. Thanks.
---