-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Integrate direct path with StreamingDataflowWorker code path #32778
Conversation
Assigning reviewers. If you would like to opt out of this review, comment R: @johnjcasey added as fallback since no labels match configuration Available commands:
The PR bot will only process comments in the main thread (not review comments). |
...va/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
Show resolved
Hide resolved
45fdb16
to
da13655
Compare
Reminder, please take a look at this pr: @johnjcasey |
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @johnjcasey added as fallback since no labels match configuration Available commands:
|
Reminder, please take a look at this pr: @johnjcasey |
036e3a1
to
395abf1
Compare
: streamingStatusPages; | ||
} | ||
|
||
private static ChannelzServlet createChannelZServlet( |
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.
nit: don't capitalize the Z
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.
done
@@ -118,6 +130,8 @@ public final class StreamingDataflowWorker { | |||
*/ | |||
public static final int MAX_SINK_BYTES = 10_000_000; | |||
|
|||
public static final String STREAMING_ENGINE_USE_JOB_SETTINGS_FOR_HEARTBEAT_POOL = |
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.
move back where it was and make private?
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.
done
@@ -441,6 +520,8 @@ public static StreamingDataflowWorker fromOptions(DataflowWorkerHarnessOptions o | |||
WindmillServerStub windmillServer; | |||
ComputationStateCache computationStateCache; | |||
GrpcWindmillStreamFactory windmillStreamFactory; | |||
ConfigFetcherComputationStateCacheAndWindmillClient.Builder builder = |
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.
seems inconsistent to set dispatcher on builder but have the separate variables for the rest.
How about removing the varialbes and setting on the builder? It seems you can remove some nesting and return the build() result early in some cases like SE
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.
done
...va/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
Show resolved
Hide resolved
} | ||
LOG.warn( | ||
"DirectPath is currently only supported with IPv6 networking stack. Defaulting to" | ||
+ " CloudPath."); |
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.
How about mentioning the service option to use or link to docs if some
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.
done
StreamingDataflowWorker.class.getSimpleName()); | ||
} | ||
|
||
private static ChannelCachingStubFactory createStubFactory( |
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.
name createFanoutStubFactory since just used there and we don't want unconditional isolation (yet) in other case?
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.
done
(threadName) -> Executors.newSingleThreadScheduledExecutor(), | ||
DEFAULT_HARNESS_REPORTING_PERIOD, | ||
DEFAULT_PER_WORKER_METRICS_PERIOD); | ||
StreamingWorkerStatusReporter.builder() |
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.
can you make a testReporterBuilder() in this test that sets all these defaults?
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.
done
back to you @scwhittle thanks! |
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @johnjcasey added as fallback since no labels match configuration Available commands:
|
.setWindmillStreamFactory(windmillStreamFactory) | ||
.setWindmillServer( | ||
GrpcWindmillServer.create(options, windmillStreamFactory, dispatcherClient)) | ||
.build(); | ||
} else { |
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.
can remove else to reduce nesting since above always returns
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.
done
@@ -74,7 +75,8 @@ public final class SingleSourceWorkerHarness implements StreamingWorkerHarness { | |||
StreamingWorkScheduler streamingWorkScheduler, | |||
Runnable waitForResources, | |||
Function<String, Optional<ComputationState>> computationStateFetcher, | |||
GetWorkSender getWorkSender) { | |||
GetWorkSender getWorkSender, | |||
Supplier<Long> throttleTimeSupplier) { |
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.
can we make a functional interface instead of a supplier? It's not clear that the supplier should get+reset, generally Supplier seems like it would just get.
Seems like this could then take supplier to vend but also could implement the same interface
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.
done
@@ -25,4 +25,6 @@ public interface StreamingWorkerHarness { | |||
void start(); | |||
|
|||
void shutdown(); | |||
|
|||
long getAndResetThrottleTime(); |
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.
ditto could make StreamingWorkerHarness implement the ThrottlingTimerInterface (or whatever you name it).
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.
done
d17e6a6
to
a93bae5
Compare
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.beam.runners.dataflow.worker.streaming.harness; |
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.
put in same throttling package as ThrottleTimer.java
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.
Done
*/ | ||
@Internal | ||
@FunctionalInterface | ||
public interface ThrottledTimeTracker { |
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.
this has a 'd' in Throttled but all the instances are just throttleTimeTracker. Make consistent
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.
Done
Add direct path code branch
R: @scwhittle @arunpandianp
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.