zouxxyy created FLINK-31817:
-------------------------------
Summary: Skip meaningless testForUnsplittable in FileInputFormat
Key: FLINK-31817
URL: https://issues.apache.org/jira/browse/FLINK-31817
Project: Flink
Issue Type: Improvement
Reporter: zouxxyy
In `FileInputFormat`
The function of `testForUnsplittable` is to detect whether the pathFile is
Unsplittable, and when pathFile is Unsplittable, assign true to the member
variable `unsplittable`
In fact, we can only execute it when `Unsplittable` is false. This can reduce
the calls to `testForUnsplittable`
{code:java}
protected boolean testForUnsplittable(FileStatus pathFile) {
if (getInflaterInputStreamFactory(pathFile.getPath()) != null) {
unsplittable = true;
return true;
}
return false;
}{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)