[ 
https://issues.apache.org/jira/browse/FLINK-31817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zouxxyy updated FLINK-31817:
----------------------------
    Description: 
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`

Currently this function will always be executed, 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}
 

I am new to flink and have written a patch to solve this, can someone assign 
this ticket to me?

  was:
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}
 

I am new to flink and have written a patch to solve this, can someone assign 
this ticket to me?


> Skip meaningless testForUnsplittable in FileInputFormat
> -------------------------------------------------------
>
>                 Key: FLINK-31817
>                 URL: https://issues.apache.org/jira/browse/FLINK-31817
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: zouxxyy
>            Priority: Minor
>
> 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`
> Currently this function will always be executed, 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}
>  
> I am new to flink and have written a patch to solve this, can someone assign 
> this ticket to me?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to