You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/15 02:30:00 UTC

[jira] [Commented] (FLINK-9675) Avoid FileInputStream/FileOutputStream

    [ https://issues.apache.org/jira/browse/FLINK-9675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16544391#comment-16544391 ] 

ASF GitHub Bot commented on FLINK-9675:
---------------------------------------

GitHub user zhangminglei opened a pull request:

    https://github.com/apache/flink/pull/6335

    [FLINK-9675] [fs] Avoid FileInputStream/FileOutputStream

    ## What is the purpose of the change
    
    Avoid using FileInputStream/FileOutputStream because they rely on finalizers (before Java 11), which create unnecessary GC load. The alternatives, Files.newInputStream, are as easy to use and don't have this issue.
    
    ## Brief change log
    On the code path, the ```FileInputStream``` used by the test classes has not been modified to maintain the original appearance.
    
    This is the first commit of this PR.
    
    ## Verifying this change
    
    This change is already covered by existing tests.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (yes)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (don't know)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not documented)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zhangminglei/flink flink-9675-fisfos

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6335.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6335
    
----
commit fe7c90bc3165722ef4e1289ac809fa92c8e3a08d
Author: zhangminglei <zm...@...>
Date:   2018-07-15T02:21:45Z

    [FLINK-9675] [fs] Avoid FileInputStream/FileOutputStream

----


> Avoid FileInputStream/FileOutputStream
> --------------------------------------
>
>                 Key: FLINK-9675
>                 URL: https://issues.apache.org/jira/browse/FLINK-9675
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: zhangminglei
>            Priority: Minor
>              Labels: filesystem, pull-request-available
>
> They rely on finalizers (before Java 11), which create unnecessary GC load.
> The alternatives, Files.newInputStream, are as easy to use and don't have this issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)