You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/03/26 21:07:01 UTC
[jira] [Created] (BEAM-3935) FileChannel instance should be closed
in ArtifactServiceStager#StagingCallable#get
Ted Yu created BEAM-3935:
----------------------------
Summary: 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: Kenneth Knowles
{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)