Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-22] Clean up InProcess Read Evaluators #106

Closed
wants to merge 2 commits into from

Conversation

tgroh
Copy link
Member

@tgroh tgroh commented Mar 31, 2016

These are a couple of minor improvements to BoundedReadEvaluator
and UnboundedReadEvaluator that enables splitting a source at
evaluation time, as well as minor code cleanup.

@tgroh
Copy link
Member Author

tgroh commented Mar 31, 2016

R: @bjchambers

UnboundedReadEvaluator<OutputT> evaluator =
new UnboundedReadEvaluator<OutputT>(transform, evaluationContext, evaluatorQueue);
new UnboundedReadEvaluator<OutputT>(
transform, evaluationContext, evaluatorQueue, source);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argument order should be the same between these methods (eg., transform, source, context, ...).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bjchambers
Copy link
Contributor

LGTM. Will wait for green CI before commit.

@tgroh tgroh force-pushed the ippr_cleaner_read_evaluators branch from b6ba797 to 71e95b7 Compare April 1, 2016 01:21
@@ -117,12 +117,19 @@
private final AppliedPTransform<?, PCollection<OutputT>, Bounded<OutputT>> transform;
private final InProcessEvaluationContext evaluationContext;
private boolean contentsRemaining;
/**
* The source being read from by this {@link BoundedReadEvaluator}. This may not be the same
* source as returned by {@link Bounded#getSource()} within {@link #transform} due to splitting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe shorten:

The source being read from by this {@link BoundedReadEvaluator}.
This may differ from the initial source derived from the {@link #tranfsorm} due to splitting.

(Documenting the path by which it is derived seems brittle to future changes)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This permits use of sources that are not the initial source used in the
transform. BoundedSource#splitIntoBundles and
UnboundedSource#generateInitialSplits generate multiple source objects
for the same transform in order to permit parallelism.
Use BoundedReader instead of Reader.

contentsRemaining should be method-scoped not instance-scoped.
@tgroh tgroh force-pushed the ippr_cleaner_read_evaluators branch from 71e95b7 to a8f862d Compare April 1, 2016 15:49
@asfgit asfgit closed this in dad60f6 Apr 1, 2016
iemejia referenced this pull request in iemejia/beam Jan 12, 2018
guanjun1 pushed a commit to guanjun1/beam that referenced this pull request Aug 28, 2023
LISAMZA-31528: Add top level module for improving Beam auto ELR stability and productivity
pl04351820 pushed a commit to pl04351820/beam that referenced this pull request Dec 20, 2023
* refactor: drop six package use

* fix conflicts

* fix conflicts

* fix conflicts

* fix conflicts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants