[ https://issues.apache.org/jira/browse/FLINK-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751383#comment-15751383 ]
ASF GitHub Bot commented on FLINK-5074: --------------------------------------- Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/2903#discussion_r92608715 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/ZooKeeperRegistryTest.java --- @@ -0,0 +1,87 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.runtime.highavailability; + +import org.apache.curator.test.TestingServer; +import org.apache.flink.api.common.JobID; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.configuration.HighAvailabilityOptions; +import org.apache.flink.util.TestLogger; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.junit.Assert.*; + +public class ZooKeeperRegistryTest extends TestLogger { + private TestingServer testingServer; + + private static Logger LOG = LoggerFactory.getLogger(ZooKeeperRegistryTest.class); + + @Before + public void before() { + try { + testingServer = new TestingServer(); + } catch (Exception e) { --- End diff -- 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) > Implement a RunningJobRegistry based on Zookeeper > -------------------------------------------------- > > Key: FLINK-5074 > URL: https://issues.apache.org/jira/browse/FLINK-5074 > Project: Flink > Issue Type: Task > Components: Cluster Management > Reporter: shuai.xu > Assignee: shuai.xu > Labels: flip-6 > > For flip-6, it has implemented the ZookeeperHaServices, but > ZookeeperHaServices does not support getRunningJobsRegistry. So need to > implement a ZK based running job registry. -- This message was sent by Atlassian JIRA (v6.3.4#6332)