Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.10.0.0
-
None
-
None
Description
When file is corrupted, the FileInputStream can return 0, causing the while loop in FileStreamSourceTask.poll() become infinite.
public List<SourceRecord> poll() throws InterruptedException { ... stream = new FileInputStream(filename); long skipLeft = (Long) lastRecordedOffset; while (skipLeft > 0) { try { long skipped = stream.skip(skipLeft); skipLeft -= skipped; } catch (IOException e) { log.error("Error while trying to seek to previous offset in file: ", e); throw new ConnectException(e); } } }
Similar bugs are like Cassandra-7330, Hadoop-8614, Mapreduce-6990, Yarn-163, Yarn-2905 etc.