Skip to content

Conversation

@ibzib
Copy link

@ibzib ibzib commented Jul 18, 2019

Now the Spark runner can reuse SDK harnesses, and multiple SDK harness can be used.

The latter will hopefully enable multicore processing on TFX, for example.


Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Python Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@ibzib ibzib force-pushed the spark-multiworker branch from 1a3fb00 to e6703f7 Compare July 18, 2019 16:39
@ibzib
Copy link
Author

ibzib commented Jul 18, 2019

R: @angoenka

@ibzib ibzib force-pushed the spark-multiworker branch 2 times, most recently from bf0314b to 084e384 Compare July 18, 2019 17:09
@ibzib
Copy link
Author

ibzib commented Jul 18, 2019

Run Java PreCommit

@ibzib ibzib force-pushed the spark-multiworker branch 2 times, most recently from 5bc6e2c to 40700bf Compare July 19, 2019 01:33
@ibzib
Copy link
Author

ibzib commented Jul 19, 2019

Run Java Spark PortableValidatesRunner Batch

@tvalentyn
Copy link
Contributor

Is this change ready for review? If so, gentle reminder @angoenka.

@ibzib ibzib force-pushed the spark-multiworker branch 2 times, most recently from 404ff8f to 3b8af43 Compare August 21, 2019 21:40
@ibzib
Copy link
Author

ibzib commented Aug 21, 2019

Run Java Spark PortableValidatesRunner Batch

@ibzib ibzib force-pushed the spark-multiworker branch from 3b8af43 to 5fa467e Compare August 23, 2019 21:22
@ibzib
Copy link
Author

ibzib commented Aug 23, 2019

Alright, I've finally ironed out the problems with this one. However, we should merge #9410 first for best results.

@ibzib
Copy link
Author

ibzib commented Aug 27, 2019

Run Portable_Python PreCommit

@ibzib ibzib force-pushed the spark-multiworker branch 2 times, most recently from 17d6477 to e2173d2 Compare August 27, 2019 23:31
@ibzib
Copy link
Author

ibzib commented Aug 27, 2019

@angoenka PTAL

@ibzib ibzib force-pushed the spark-multiworker branch from e2173d2 to 7ef47e3 Compare August 28, 2019 00:18
Copy link
Contributor

@angoenka angoenka left a comment

Choose a reason for hiding this comment

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

Thanks for the change.

@Override
public FlinkExecutableStageContext get(JobInfo jobInfo) {
public ExecutableStageContext get(
JobInfo jobInfo, SerializableFunction<Object, Boolean> isReleaseSynchronous) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isReleaseSynchronous is not used

Copy link
Author

Choose a reason for hiding this comment

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

Refactored to avoid this.

});

return state.getFactory().get(jobInfo);
return state.getFactory(isReleaseSynchronous).get(jobInfo, isReleaseSynchronous);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same, I think we should pass isReleaseSynchronous only at 1 place to avoid confusion.

Copy link
Author

Choose a reason for hiding this comment

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

Refactored to avoid this.

@ibzib ibzib force-pushed the spark-multiworker branch 2 times, most recently from 852b238 to bce9c9e Compare September 5, 2019 17:18
@Override
public FlinkExecutableStageContext get(JobInfo jobInfo) {
public ExecutableStageContext get(
JobInfo jobInfo, SerializableFunction<Object, Boolean> isReleaseSynchronous) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I still feel that we should not have isReleaseSynchronous in get method as the usage can be unpredictable in case where we call get method at 2 locations for the same jobInfo but with different isReleaseSynchronous method. As we are using caching, the 1st isReleaseSynchronous will be applied and can lead to concurrency bug.

Copy link
Author

Choose a reason for hiding this comment

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

As discussed offline, I made separate contexts for Flink and Spark.

@ibzib ibzib force-pushed the spark-multiworker branch from 9dcbd6a to 7c8a637 Compare September 6, 2019 22:40
@ibzib
Copy link
Author

ibzib commented Sep 6, 2019

@angoenka I have refactored this quite a bit. Unfortunately I only managed to eliminate a small amount of the complexity as most of it seems necessary. PTAL

@ibzib ibzib force-pushed the spark-multiworker branch from 7c8a637 to 2954ee3 Compare September 6, 2019 23:11
@ibzib
Copy link
Author

ibzib commented Sep 9, 2019

Run Java PreCommit

@ibzib
Copy link
Author

ibzib commented Sep 9, 2019

Run Portable_Python PreCommit

@ibzib
Copy link
Author

ibzib commented Sep 9, 2019

Run Python Spark ValidatesRunner

@ibzib
Copy link
Author

ibzib commented Sep 9, 2019

Run Java Spark PortableValidatesRunner Batch

Copy link
Contributor

@angoenka angoenka left a comment

Choose a reason for hiding this comment

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

Some nits but looks good.


@Override
public ExecutableStageContext get(JobInfo jobInfo) {
MultiInstanceFactory state =
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we call this jobFactory

Copy link
Author

Choose a reason for hiding this comment

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

done


@Override
public ExecutableStageContext get(JobInfo jobInfo) {
MultiInstanceFactory state =
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Copy link
Author

Choose a reason for hiding this comment

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

done

@ibzib ibzib merged commit 932bd80 into apache:master Sep 10, 2019
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.

3 participants