You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "zouxxyy (Jira)" <ji...@apache.org> on 2023/04/17 03:18:00 UTC
[jira] [Created] (FLINK-31817) Skip meaningless testForUnsplittable in FileInputFormat
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)