[
https://issues.apache.org/jira/browse/BEAM-3934?focusedWorklogId=248295&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-248295
]
ASF GitHub Bot logged work on BEAM-3934:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/May/19 21:15
Start Date: 24/May/19 21:15
Worklog Time Spent: 10m
Work Description: angoenka commented on issue #8648: [BEAM-3934] Use try
with resources to close the reader on JavaReadViaImpulse
URL: https://github.com/apache/beam/pull/8648#issuecomment-495790100
However, on a side note. This highlights that the containers are shared
across tests in a machine.
Their is a race condition when multiple tests runs on on machine building
container and can be a cause of flakiness.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 248295)
Time Spent: 2h (was: 1h 50m)
> BoundedReader should be closed in JavaReadViaImpulse#ReadFromBoundedSourceFn
> ----------------------------------------------------------------------------
>
> Key: BEAM-3934
> URL: https://issues.apache.org/jira/browse/BEAM-3934
> Project: Beam
> Issue Type: Bug
> Components: runner-core
> Reporter: Ted Yu
> Assignee: Ismaël Mejía
> Priority: Minor
> Labels: usability
> Time Spent: 2h
> Remaining Estimate: 0h
>
> {code}
> public void readSoruce(ProcessContext ctxt) throws IOException {
> BoundedSource.BoundedReader<T> reader =
> ctxt.element().createReader(ctxt.getPipelineOptions());
> for (boolean more = reader.start(); more; more = reader.advance()) {
> ctxt.outputWithTimestamp(reader.getCurrent(),
> reader.getCurrentTimestamp());
> }
> }
> {code}
> The BoundedSource.BoundedReader instance should be closed before returning
> from the method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)