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

test commit #34148

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

test commit #34148

wants to merge 2 commits into from

Conversation

parveensania
Copy link

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: 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, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

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)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@@ -17,152 +17,18 @@
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this needs a rebase since theres merge conflicts now

Copy link
Contributor

Choose a reason for hiding this comment

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

would recommend

  • creating a dev branch
  • moving these changes into it
  • keeping parveensania/master clean and up to date w/ apache/master so that you can rebase dev branch onto master changes

@@ -46,6 +48,7 @@ public abstract class WindmillEndpoints {
.setVersion(Long.MAX_VALUE)
.setWindmillEndpoints(ImmutableSet.of())
.setGlobalDataEndpoints(ImmutableMap.of())
.setEndpointType(EndpointType.UNKNOWN)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we default to cloud path? unless the code knows how to deal with UNKNOWN?

@@ -155,6 +163,15 @@ private static Optional<HostAndPort> tryParseDirectEndpointIntoIpV6Address(
*/
public abstract ImmutableSet<Endpoint> windmillEndpoints();

public abstract EndpointType endpointType();

public enum EndpointType {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use the EndpointType enum in the proto?

this.heartbeatSender),
getWorkStreamLatencies);
});
this.getWorkStream =
Copy link
Contributor

Choose a reason for hiding this comment

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

we need something like

that manages the GetWorkStream so we get clean stream closure from the client.


@Override
public synchronized void close() {
if (started) {
Copy link
Contributor

Choose a reason for hiding this comment

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

StreamPool will need to be modified to clean up any dangling streams.

right now we only clean up the stream on getStream()/releaseStream().

@Internal
@ThreadSafe
final class WindmillStreamPoolSender implements WindmillStreamSender, StreamSender {
// private static final java.util.logging.Logger LOG =
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the commented out LOG

this.getWorkBudget = getWorkBudget;
this.streamingEngineThrottleTimers = StreamingEngineThrottleTimers.create();
/** Superclass for stream senders used to communicate with Windmill */
public interface WindmillStreamSender extends GetWorkBudgetSpender {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can move all of this to StreamSender or just have WindmillStreamSender have the 1 method in the StreamSender interface. don't think we need both interfaces.

@@ -127,7 +141,13 @@ private FanOutStreamingEngineWorkerHarness(
GrpcDispatcherClient dispatcherClient,
Function<WindmillStream.CommitWorkStream, WorkCommitter> workCommitterFactory,
ThrottlingGetDataMetricTracker getDataMetricTracker,
ExecutorService workerMetadataConsumer) {
ExecutorService workerMetadataConsumer,
Copy link
Contributor

@m-trieu m-trieu Mar 23, 2025

Choose a reason for hiding this comment

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

instead of passing all of these in can the constructor take in a
Function<WindmillConnection, WindmillStreamSender> windmillStreamPoolSenderFactory

or create a WindmillStreamPoolSenderFactory.java interface

@FunctionalInterface
interface WindmillStreamPoolSenderFactory {
  WindmillStreamSender create(WindmillConnection connection);
}

then in StreamingDataflowWorker.java you can pass in

connection -> WindmillStreamPoolSender.create(
                connection,
                GetWorkRequest.newBuilder()
                    .setClientId(jobHeader.getClientId())
                    .setJobId(jobHeader.getJobId())
                    .setProjectId(jobHeader.getProjectId())
                    .setWorkerId(jobHeader.getWorkerId())
                    .setMaxItems(totalGetWorkBudget.items())
                    .setMaxBytes(totalGetWorkBudget.bytes())
                    .build(),
                GetWorkBudget.noBudget(),
                streamFactory,
                streamPoolWorkCommitter,
                streamPoolGetDataClient,
                streamPoolHeartbeatSender,
                streamingWorkScheduler,
                waitForResources,
                computationStateFetcher)

and in createAndStartWindmillStreamSender

you can call windmillStreamPoolSenderFactory.create() / windmillStreamPoolSenderFactory.apply(connection)

since it seems like all of those params are just added to create the WindmillStreamPoolSender

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

Successfully merging this pull request may close these issues.

2 participants