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

[FLINK-5074] [runtime] add a zookeeper based running job registry #2903

Closed
wants to merge 1 commit into from

Conversation

shuai-xu
Copy link
Contributor

This pr is for jira #5074.

Implement a zookeeper based running job registry for flip-6. It will write the running job info to zookeeper and support querying job status.

@shuai-xu shuai-xu changed the title [FLINK-5704] [runtime] add a zookeeper based running job registry [FLINK-5074] [runtime] add a zookeeper based running job registry Nov 30, 2016
@StephanEwen
Copy link
Contributor

Looks good to me!

I think it would be good to add a test to this, based on a Curator TestingServer.
This test here gives an example how to use the TestingServer:
https://github.com/apache/flink/blob/master/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionTest.java

Copy link
Contributor

@StephanEwen StephanEwen left a comment

Choose a reason for hiding this comment

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

One minor comment, otherwise looks good to me.

public void before() {
try {
testingServer = new TestingServer();
} catch (Exception e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just add throws Exception to the method signature here, rather than catching and wrapping the exception. Makes error stack traces easier to read.

As a general rule: I think one should never need to explicitly throw a RuntimeException.
(I know Flink has a few places where it does it, but these are in my opinion errors from the past, during the time when we were still learning)

@shuai-xu
Copy link
Contributor Author

@StephanEwen done

@shuai-xu shuai-xu closed this Jan 23, 2017
@shuai-xu shuai-xu reopened this Feb 13, 2017
@shuai-xu
Copy link
Contributor Author

@StephanEwen I have modified according to your comments. Can this pr be merged, I have a new jira need to based on this one. Thank you very much

@shuai-xu shuai-xu changed the base branch from flip-6 to master February 13, 2017 10:41
@StephanEwen
Copy link
Contributor

I think this looks good, thanks!
Merging this...

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.

4 participants