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
[FLINK-6521] Add per job cleanup methods to HighAvailabilityServices #4376
Conversation
try { | ||
this.submittedJobGraphStore = ZooKeeperUtils.createSubmittedJobGraphs(client, configuration, executor); | ||
} catch (Exception e) { | ||
throw new RuntimeException(e); |
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.
We should not throw RuntimeException
but instead a meaningful checked exception.
import org.junit.Assert; | ||
import org.junit.rules.ExpectedException; | ||
|
||
public class HighAvailabilityServiceTest { |
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.
If we let the test case extend from TestLogger
, then we get nice testing log statement on Travis.
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.
Thanks for your contribution @zjureel. The changes look good to me. I had some minor comments which we could address. Moreover, there are some test cases failing most likely due to your changes:
ZooKeeperRegistryTest.testZooKeeperRegistry
ZooKeeperLeaderRetrievalTest.before
|
||
SubmittedJobGraph recoverJobGraph2 = submittedJobGraphStore.recoverJobGraph(jobGraph2.getJobId()); | ||
Assert.assertEquals(recoverJobGraph2.getJobId(), jobGraph2.getJobId()); | ||
thrown.expectMessage("Could not retrieve the submitted job graph state handle for /" + |
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.
Could we rather check for the exception type? Matching exception messages is really brittle.
The test case |
I found the following kinda stuff from CI, and it seems not relevant to this issue, what do you think? @tillrohrmann
|
@tillrohrmann @zjureel I think the functionality is implemented occasionally by #6587 FLINK-10011 However, it is still a valid question that who is the proper actor to do the clean-up job. As for Under the topic "per job clean up", I'd like to raise a question that how flink considered the status of a job? If we said that "per job clean up" is |
Closed for inactivity. |
Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the How To Contribute guide.
In addition to going through the list, please provide a meaningful description of your changes.
General
Documentation
Tests & Build
mvn clean verify
has been executed successfully locally or a Travis build has passed