[
https://issues.apache.org/jira/browse/FLINK-5508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833950#comment-15833950
]
ASF GitHub Bot commented on FLINK-5508:
---------------------------------------
Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/3157#discussion_r97257309
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperUtilityFactory.java
---
@@ -0,0 +1,120 @@
+/*
+ * 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.zookeeper;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.shared.SharedCount;
+import org.apache.curator.framework.recipes.shared.SharedValue;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.runtime.util.ZooKeeperUtils;
+
+import java.io.Serializable;
+import java.util.concurrent.Executor;
+
+/**
+ * Creates ZooKeeper utility classes without exposing the {@link
CuratorFramework} dependency. The
+ * curator framework is cached in this instance and shared among all
created ZooKeeper utility
+ * instances. This requires that the utility classes DO NOT close the
provided curator framework.
+ *
+ * <p>The curator framework is closed by calling the {@link
#close(boolean)} method.
+ */
+public class ZooKeeperUtilityFactory {
+
+ private final CuratorFramework root;
+
+ // Facade bound to the provided path
+ private final CuratorFramework facade;
+
+ public ZooKeeperUtilityFactory(Configuration configuration, String
path) throws Exception {
--- End diff --
Should perform precondition checks for arguments.
> Remove Mesos dynamic class loading
> ----------------------------------
>
> Key: FLINK-5508
> URL: https://issues.apache.org/jira/browse/FLINK-5508
> Project: Flink
> Issue Type: Improvement
> Components: Mesos
> Affects Versions: 1.2.0, 1.3.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Priority: Minor
> Fix For: 1.2.0, 1.3.0
>
>
> Mesos uses dynamic class loading in order to load the
> {{ZooKeeperStateHandleStore}} and the {{CuratorFramework}} class. This can be
> replaced by a compile time dependency.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)