You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Kenneth Knowles (JIRA)" <ji...@apache.org> on 2018/04/25 02:24:00 UTC

[jira] [Assigned] (BEAM-3935) FileChannel instance should be closed in ArtifactServiceStager#StagingCallable#get

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

Kenneth Knowles reassigned BEAM-3935:
-------------------------------------

    Assignee: Ben Sidhom  (was: Kenneth Knowles)

> FileChannel instance should be closed in ArtifactServiceStager#StagingCallable#get
> ----------------------------------------------------------------------------------
>
>                 Key: BEAM-3935
>                 URL: https://issues.apache.org/jira/browse/BEAM-3935
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-core
>            Reporter: Ted Yu
>            Assignee: Ben Sidhom
>            Priority: Minor
>
> {code}
>       FileChannel channel = new FileInputStream(file).getChannel();
>       ByteBuffer readBuffer = ByteBuffer.allocate(bufferSize);
>       while (!responseObserver.isTerminal() && channel.position() < channel.size()) {
>         readBuffer.clear();
>         channel.read(readBuffer);
> {code}
> The channel should be closed before returning from get()



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