@ Override public List < String > getcurrentFsSnapshot ( State state ) { List < String > results = new ArrayList <> ( ) ; String folderId = state . getProp ( SOURCE_FILEBASED_DATA_DIRECTORY , "" ) ; try { LOG . info ( "Running ls with folderId: " + folderId ) ; List < String > fileIds = this . fsHelper . ls ( folderId ) ; for ( String fileId : fileIds ) { results . add ( fileId + splitPattern + this . fsHelper . getFileMTime ( fileId ) ) ; } } catch ( FileBasedHelperException e ) { throw new RuntimeException ( "Failed to retrieve list of file IDs for folderID: " + folderId , e ) ; } return results ; }
Provide list of files snapshot where snap shot is consist of list of file ID with modified time . Folder ID and file ID are all optional where missing folder id represent search from root folder where missing file ID represents all files will be included on current and subfolder .