-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Do not merge: scratch work 2 #3646
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
Changes from all commits
3383c26
038f3f3
fc661f6
053c7ae
c2b3f32
8854c53
8be01a9
bf38fe7
ae0d80d
97de556
341fa92
1e83d5e
256309f
25ce9f1
7be85c6
1df07a5
e52ba42
e5bb716
91873cc
e05778f
12a9517
b90a2e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,7 +161,7 @@ def run(self, test_runner_api=True): | |
| """Runs the pipeline. Returns whatever our runner returns after running.""" | ||
|
|
||
| # When possible, invoke a round trip through the runner API. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done. |
||
| if test_runner_api and self._verify_runner_api_compatible(): | ||
| if test_runner_api and self._verify_runner_api_compatible() and False: | ||
| return Pipeline.from_runner_api( | ||
| self.to_runner_api(), self.runner, self._options).run(False) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,10 @@ def __init__(self, stacked): | |
| self._stacked = stacked | ||
|
|
||
| def create_bundle(self, output_pcollection): | ||
| return _Bundle(output_pcollection, self._stacked) | ||
| return _Bundle(output_pcollection, None, stacked=self._stacked) | ||
|
|
||
| def create_keyed_bundle(self, output_pcollection, key): | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix create_keyed_bundle.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done. |
||
| return _Bundle(output_pcollection, key, stacked=self._stacked) | ||
|
|
||
| def create_empty_committed_bundle(self, output_pcollection): | ||
| bundle = self.create_bundle(output_pcollection) | ||
|
|
@@ -107,14 +110,18 @@ def windowed_values(self): | |
| yield WindowedValue(v, self._initial_windowed_value.timestamp, | ||
| self._initial_windowed_value.windows) | ||
|
|
||
| def __init__(self, pcollection, stacked=True): | ||
| assert isinstance(pcollection, pvalue.PCollection) | ||
| def __init__(self, pcollection, key, stacked=True): | ||
| assert isinstance(pcollection, (pvalue.PBegin, pvalue.PCollection)) | ||
| self._pcollection = pcollection | ||
| self.key = key | ||
| self._elements = [] | ||
| self._stacked = stacked | ||
| self._committed = False | ||
| self._tag = None # optional tag information for this bundle | ||
|
|
||
| def __repr__(self): | ||
| return '<Bundle %s %s>' % (self._pcollection, self._elements) | ||
|
|
||
| def get_elements_iterable(self, make_copy=False): | ||
| """Returns iterable elements. | ||
|
|
||
|
|
@@ -183,6 +190,7 @@ def add(self, element): | |
| self._elements.append(element) | ||
|
|
||
| def output(self, element): | ||
| assert isinstance(element, WindowedValue) | ||
| self.add(element) | ||
|
|
||
| def commit(self, synchronized_processing_time): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix