Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
39ef9593
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39ef9593
编写于
2月 19, 2020
作者:
C
Chesnay Schepler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-16163][build] Migrate to flink-shaded-zookeeper
上级
ee7fb5e4
变更
37
隐藏空白更改
内联
并排
Showing
37 changed file
with
137 addition
and
254 deletion
+137
-254
flink-runtime/pom.xml
flink-runtime/pom.xml
+5
-35
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultLastStateConnectionStateListener.java
...e/checkpoint/DefaultLastStateConnectionStateListener.java
+2
-2
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/LastStateConnectionStateListener.java
.../runtime/checkpoint/LastStateConnectionStateListener.java
+2
-2
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
...link/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
+5
-4
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointRecoveryFactory.java
...untime/checkpoint/ZooKeeperCheckpointRecoveryFactory.java
+1
-1
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/HighAvailabilityServicesUtils.java
...ntime/highavailability/HighAvailabilityServicesUtils.java
+1
-1
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperClientHAServices.java
...highavailability/zookeeper/ZooKeeperClientHAServices.java
+1
-1
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperHaServices.java
...ntime/highavailability/zookeeper/ZooKeeperHaServices.java
+4
-3
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperRunningJobsRegistry.java
...havailability/zookeeper/ZooKeeperRunningJobsRegistry.java
+3
-2
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphStore.java
...ache/flink/runtime/jobmanager/ZooKeeperJobGraphStore.java
+7
-6
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
...untime/leaderelection/ZooKeeperLeaderElectionService.java
+13
-12
flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java
...time/leaderretrieval/ZooKeeperLeaderRetrievalService.java
+8
-7
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
...in/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
+9
-8
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/FlinkZooKeeperQuorumPeer.java
...che/flink/runtime/zookeeper/FlinkZooKeeperQuorumPeer.java
+6
-6
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperSharedCount.java
.../apache/flink/runtime/zookeeper/ZooKeeperSharedCount.java
+2
-1
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperSharedValue.java
.../apache/flink/runtime/zookeeper/ZooKeeperSharedValue.java
+2
-1
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
...he/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
+6
-5
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperUtilityFactory.java
...ache/flink/runtime/zookeeper/ZooKeeperUtilityFactory.java
+3
-3
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperVersionedValue.java
...ache/flink/runtime/zookeeper/ZooKeeperVersionedValue.java
+2
-1
flink-runtime/src/main/resources/META-INF/NOTICE
flink-runtime/src/main/resources/META-INF/NOTICE
+0
-1
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointIDCounterTest.java
...che/flink/runtime/checkpoint/CheckpointIDCounterTest.java
+2
-1
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZKCheckpointIDCounterMultiServersTest.java
...ime/checkpoint/ZKCheckpointIDCounterMultiServersTest.java
+3
-2
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
...e/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
+3
-2
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreMockitoTest.java
...ckpoint/ZooKeeperCompletedCheckpointStoreMockitoTest.java
+7
-6
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreTest.java
...ime/checkpoint/ZooKeeperCompletedCheckpointStoreTest.java
+2
-1
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/runner/ZooKeeperDefaultDispatcherRunnerTest.java
...spatcher/runner/ZooKeeperDefaultDispatcherRunnerTest.java
+2
-1
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperHaServicesTest.java
...e/highavailability/zookeeper/ZooKeeperHaServicesTest.java
+4
-3
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphStoreTest.java
.../flink/runtime/jobmanager/ZooKeeperJobGraphStoreTest.java
+3
-2
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphsStoreITCase.java
...ink/runtime/jobmanager/ZooKeeperJobGraphsStoreITCase.java
+3
-2
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/LeaderElectionTest.java
...ache/flink/runtime/leaderelection/LeaderElectionTest.java
+2
-1
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionTest.java
...k/runtime/leaderelection/ZooKeeperLeaderElectionTest.java
+9
-24
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderRetrievalTest.java
.../runtime/leaderelection/ZooKeeperLeaderRetrievalTest.java
+2
-1
flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStoreTest.java
...link/runtime/zookeeper/ZooKeeperStateHandleStoreTest.java
+3
-2
flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
...che/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
+4
-3
flink-shaded-curator/pom.xml
flink-shaded-curator/pom.xml
+0
-88
flink-shaded-curator/src/main/resources/META-INF/NOTICE
flink-shaded-curator/src/main/resources/META-INF/NOTICE
+0
-12
pom.xml
pom.xml
+6
-1
未找到文件。
flink-runtime/pom.xml
浏览文件 @
39ef9593
...
...
@@ -92,6 +92,11 @@ under the License.
<artifactId>
flink-shaded-jackson
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-shaded-zookeeper-3
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
...
...
@@ -234,20 +239,6 @@ under the License.
</exclusions>
</dependency>
<!-- Curator and ZooKeeper - we explicitly add ZooKeeper here as
well to make sure our managed version is used -->
<dependency>
<groupId>
org.apache.zookeeper
</groupId>
<artifactId>
zookeeper
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-shaded-curator
</artifactId>
<version>
${project.version}
</version>
</dependency>
<!-- Lz4 compression library -->
<dependency>
<groupId>
org.lz4
</groupId>
...
...
@@ -522,14 +513,12 @@ under the License.
<configuration>
<artifactSet>
<includes
combine.children=
"append"
>
<include>
org.apache.flink:flink-shaded-curator
</include>
<!-- add akka, akka's netty, akka uncommon math -->
<!-- we can do this only because our own netty dependency is
already externally shaded (flink-shaded-netty) -->
<include>
com.typesafe.akka:akka-remote_*
</include>
<include>
io.netty:netty
</include>
<include>
org.uncommons.maths:uncommons-maths
</include>
<include>
org.apache.zookeeper:*
</include>
</includes>
</artifactSet>
<relocations
combine.children=
"append"
>
...
...
@@ -541,25 +530,6 @@ under the License.
<pattern>
org.uncommons.math
</pattern>
<shadedPattern>
org.apache.flink.shaded.akka.org.uncommons.math
</shadedPattern>
</relocation>
<relocation>
<pattern>
org.apache.curator
</pattern>
<shadedPattern>
org.apache.flink.shaded.curator.org.apache.curator
</shadedPattern>
<excludes>
<!-- Do not relocate curator-test. This leads to problems for downstream
users of runtime test classes that make use of it as the relocated
dependency is not included in the test-jar.-->
<exclude>
org.apache.curator.test.*
</exclude>
</excludes>
</relocation>
<relocation>
<pattern>
org.apache.zookeeper
</pattern>
<shadedPattern>
org.apache.flink.shaded.zookeeper.org.apache.zookeeper
</shadedPattern>
</relocation>
<!-- jute is already shaded into the ZooKeeper jar -->
<relocation>
<pattern>
org.apache.jute
</pattern>
<shadedPattern>
org.apache.flink.shaded.zookeeper.org.apache.zookeeper.jute
</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultLastStateConnectionStateListener.java
浏览文件 @
39ef9593
...
...
@@ -18,8 +18,8 @@
package
org.apache.flink.runtime.checkpoint
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.CuratorFramework
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.state.ConnectionState
;
import
javax.annotation.Nullable
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/LastStateConnectionStateListener.java
浏览文件 @
39ef9593
...
...
@@ -18,8 +18,8 @@
package
org.apache.flink.runtime.checkpoint
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.curator.framework.state.ConnectionStateListener
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.state.ConnectionState
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.state.ConnectionStateListener
;
import
java.util.Optional
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
浏览文件 @
39ef9593
...
...
@@ -21,10 +21,11 @@ package org.apache.flink.runtime.checkpoint;
import
org.apache.flink.api.common.JobStatus
;
import
org.apache.flink.runtime.jobmanager.HighAvailabilityMode
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.recipes.shared.SharedCount
;
import
org.apache.curator.framework.recipes.shared.VersionedValue
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.shared.SharedCount
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.shared.VersionedValue
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionState
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointRecoveryFactory.java
浏览文件 @
39ef9593
...
...
@@ -23,7 +23,7 @@ import org.apache.flink.configuration.Configuration;
import
org.apache.flink.runtime.jobmanager.HighAvailabilityMode
;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.CuratorFramework
;
import
java.util.concurrent.Executor
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/HighAvailabilityServicesUtils.java
浏览文件 @
39ef9593
...
...
@@ -43,7 +43,7 @@ import org.apache.flink.util.ConfigurationException;
import
org.apache.flink.util.FlinkException
;
import
org.apache.flink.util.InstantiationUtil
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.CuratorFramework
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperClientHAServices.java
浏览文件 @
39ef9593
...
...
@@ -23,7 +23,7 @@ import org.apache.flink.runtime.highavailability.ClientHighAvailabilityServices;
import
org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService
;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.CuratorFramework
;
import
javax.annotation.Nonnull
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperHaServices.java
浏览文件 @
39ef9593
...
...
@@ -33,9 +33,10 @@ import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.flink.util.ExceptionUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.utils.ZKPaths
;
import
org.apache.zookeeper.KeeperException
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.utils.ZKPaths
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperRunningJobsRegistry.java
浏览文件 @
39ef9593
...
...
@@ -23,8 +23,9 @@ import org.apache.flink.configuration.Configuration;
import
org.apache.flink.configuration.HighAvailabilityOptions
;
import
org.apache.flink.runtime.highavailability.RunningJobsRegistry
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.zookeeper.data.Stat
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.Stat
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphStore.java
浏览文件 @
39ef9593
...
...
@@ -25,12 +25,13 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore;
import
org.apache.flink.util.ExceptionUtils
;
import
org.apache.flink.util.FlinkException
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCacheListener
;
import
org.apache.curator.utils.ZKPaths
;
import
org.apache.zookeeper.KeeperException
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCacheListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.utils.ZKPaths
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
浏览文件 @
39ef9593
...
...
@@ -22,18 +22,19 @@ import org.apache.flink.util.ExceptionUtils;
import
org.apache.flink.util.FlinkException
;
import
org.apache.flink.util.Preconditions
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.api.UnhandledErrorListener
;
import
org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.curator.framework.recipes.leader.LeaderLatch
;
import
org.apache.curator.framework.recipes.leader.LeaderLatchListener
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.curator.framework.state.ConnectionStateListener
;
import
org.apache.zookeeper.CreateMode
;
import
org.apache.zookeeper.KeeperException
;
import
org.apache.zookeeper.data.Stat
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.UnhandledErrorListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.leader.LeaderLatch
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.leader.LeaderLatchListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionState
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionStateListener
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.CreateMode
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.Stat
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java
浏览文件 @
39ef9593
...
...
@@ -21,13 +21,14 @@ package org.apache.flink.runtime.leaderretrieval;
import
org.apache.flink.util.FlinkException
;
import
org.apache.flink.util.Preconditions
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.api.UnhandledErrorListener
;
import
org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.curator.framework.state.ConnectionStateListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.UnhandledErrorListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionState
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionStateListener
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
浏览文件 @
39ef9593
...
...
@@ -39,15 +39,16 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore;
import
org.apache.flink.runtime.zookeeper.filesystem.FileSystemStateStorageHelper
;
import
org.apache.flink.util.Preconditions
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFrameworkFactory
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.ACLProvider
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.imps.DefaultACLProvider
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.retry.ExponentialBackoffRetry
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ZooDefs
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.ACL
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.CuratorFrameworkFactory
;
import
org.apache.curator.framework.api.ACLProvider
;
import
org.apache.curator.framework.imps.DefaultACLProvider
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.curator.retry.ExponentialBackoffRetry
;
import
org.apache.zookeeper.ZooDefs
;
import
org.apache.zookeeper.data.ACL
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/FlinkZooKeeperQuorumPeer.java
浏览文件 @
39ef9593
...
...
@@ -22,12 +22,12 @@ import org.apache.flink.api.java.utils.ParameterTool;
import
org.apache.flink.configuration.IllegalConfigurationException
;
import
org.apache.flink.runtime.util.EnvironmentInformation
;
import
org.apache.zookeeper.server.ServerConfig
;
import
org.apache.zookeeper.server.ZooKeeperServer
;
import
org.apache.zookeeper.server.ZooKeeperServerMain
;
import
org.apache.zookeeper.server.quorum.QuorumPeer
;
import
org.apache.zookeeper.server.quorum.QuorumPeerConfig
;
import
org.apache.zookeeper.server.quorum.QuorumPeerMain
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.ServerConfig
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.ZooKeeperServer
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.ZooKeeperServerMain
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.quorum.QuorumPeer
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.quorum.QuorumPeerConfig
;
import
org.apache.
flink.shaded.zookeeper3.org.apache.
zookeeper.server.quorum.QuorumPeerMain
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperSharedCount.java
浏览文件 @
39ef9593
...
...
@@ -18,7 +18,8 @@
package
org.apache.flink.runtime.zookeeper
;
import
org.apache.curator.framework.recipes.shared.SharedCount
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.shared.SharedCount
;
import
org.apache.flink.util.Preconditions
;
import
java.io.IOException
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperSharedValue.java
浏览文件 @
39ef9593
...
...
@@ -18,7 +18,8 @@
package
org.apache.flink.runtime.zookeeper
;
import
org.apache.curator.framework.recipes.shared.SharedValue
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.shared.SharedValue
;
import
org.apache.flink.util.Preconditions
;
import
java.io.IOException
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
浏览文件 @
39ef9593
...
...
@@ -23,11 +23,12 @@ import org.apache.flink.runtime.state.RetrievableStateHandle;
import
org.apache.flink.util.ExceptionUtils
;
import
org.apache.flink.util.InstantiationUtil
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.utils.ZKPaths
;
import
org.apache.zookeeper.CreateMode
;
import
org.apache.zookeeper.KeeperException
;
import
org.apache.zookeeper.data.Stat
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.utils.ZKPaths
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.CreateMode
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.Stat
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperUtilityFactory.java
浏览文件 @
39ef9593
...
...
@@ -22,9 +22,9 @@ import org.apache.flink.configuration.Configuration;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.flink.util.Preconditions
;
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.shaded.curator4.org.apache.
curator.framework.CuratorFramework
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.recipes.shared.SharedCount
;
import
org.apache.
flink.shaded.curator4.org.apache.
curator.framework.recipes.shared.SharedValue
;
import
java.io.Serializable
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperVersionedValue.java
浏览文件 @
39ef9593
...
...
@@ -18,7 +18,8 @@
package
org.apache.flink.runtime.zookeeper
;
import
org.apache.curator.framework.recipes.shared.VersionedValue
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.shared.VersionedValue
;
import
org.apache.flink.util.Preconditions
;
/**
...
...
flink-runtime/src/main/resources/META-INF/NOTICE
浏览文件 @
39ef9593
...
...
@@ -8,7 +8,6 @@ This project bundles the following dependencies under the Apache Software Licens
- com.typesafe.akka:akka-remote_2.11:2.5.21
- io.netty:netty:3.10.6.Final
- org.apache.zookeeper:zookeeper:3.4.10
- org.uncommons.maths:uncommons-maths:1.2.2a
This project bundles io.netty:netty:3.10.6.Final from which it inherits the following notices:
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointIDCounterTest.java
浏览文件 @
39ef9593
...
...
@@ -22,7 +22,8 @@ import org.apache.flink.api.common.JobStatus;
import
org.apache.flink.runtime.zookeeper.ZooKeeperTestEnvironment
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZKCheckpointIDCounterMultiServersTest.java
浏览文件 @
39ef9593
...
...
@@ -25,8 +25,9 @@ import org.apache.flink.runtime.util.ZooKeeperUtils;
import
org.apache.flink.runtime.zookeeper.ZooKeeperResource
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.state.ConnectionState
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.state.ConnectionState
;
import
org.junit.Rule
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
浏览文件 @
39ef9593
...
...
@@ -27,8 +27,9 @@ import org.apache.flink.runtime.zookeeper.RetrievableStateStorageHelper;
import
org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore
;
import
org.apache.flink.runtime.zookeeper.ZooKeeperTestEnvironment
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.zookeeper.data.Stat
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.Stat
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreMockitoTest.java
浏览文件 @
39ef9593
...
...
@@ -27,12 +27,13 @@ import org.apache.flink.runtime.zookeeper.RetrievableStateStorageHelper;
import
org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.api.BackgroundCallback
;
import
org.apache.curator.framework.api.CuratorEvent
;
import
org.apache.curator.framework.api.CuratorEventType
;
import
org.apache.curator.framework.api.ErrorListenerPathable
;
import
org.apache.curator.utils.EnsurePath
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.BackgroundCallback
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.CuratorEvent
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.CuratorEventType
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.ErrorListenerPathable
;
import
org.apache.flink.shaded.curator4.org.apache.curator.utils.EnsurePath
;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
org.mockito.invocation.InvocationOnMock
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreTest.java
浏览文件 @
39ef9593
...
...
@@ -28,7 +28,8 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperResource;
import
org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.hamcrest.Matchers
;
import
org.junit.ClassRule
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/runner/ZooKeeperDefaultDispatcherRunnerTest.java
浏览文件 @
39ef9593
...
...
@@ -56,7 +56,8 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperResource;
import
org.apache.flink.util.ExceptionUtils
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.ClassRule
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperHaServicesTest.java
浏览文件 @
39ef9593
...
...
@@ -34,9 +34,10 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperResource;
import
org.apache.flink.util.TestLogger
;
import
org.apache.flink.util.function.ThrowingConsumer
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.CuratorFrameworkFactory
;
import
org.apache.curator.retry.RetryNTimes
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFrameworkFactory
;
import
org.apache.flink.shaded.curator4.org.apache.curator.retry.RetryNTimes
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphStoreTest.java
浏览文件 @
39ef9593
...
...
@@ -27,8 +27,9 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperResource;
import
org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphsStoreITCase.java
浏览文件 @
39ef9593
...
...
@@ -30,8 +30,9 @@ import org.apache.flink.runtime.zookeeper.ZooKeeperTestEnvironment;
import
org.apache.flink.util.InstantiationUtil
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.PathChildrenCache
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/LeaderElectionTest.java
浏览文件 @
39ef9593
...
...
@@ -25,7 +25,8 @@ import org.apache.flink.runtime.testingUtils.TestingUtils;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.test.TestingServer
;
import
org.junit.After
;
import
org.junit.Before
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionTest.java
浏览文件 @
39ef9593
...
...
@@ -25,14 +25,15 @@ import org.apache.flink.runtime.leaderretrieval.ZooKeeperLeaderRetrievalService;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.api.CreateBuilder
;
import
org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.api.CreateBuilder
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.ChildData
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCache
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.recipes.cache.NodeCacheListener
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.CreateMode
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.apache.curator.test.TestingServer
;
import
org.apache.zookeeper.CreateMode
;
import
org.apache.zookeeper.KeeperException
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
@@ -409,23 +410,7 @@ public class ZooKeeperLeaderElectionTest extends TestLogger {
try
{
client
=
spy
(
ZooKeeperUtils
.
startCuratorFramework
(
configuration
));
Answer
<
CreateBuilder
>
answer
=
new
Answer
<
CreateBuilder
>()
{
private
int
counter
=
0
;
@Override
public
CreateBuilder
answer
(
InvocationOnMock
invocation
)
throws
Throwable
{
counter
++;
// at first we have to create the leader latch, there it mustn't fail yet
if
(
counter
<
2
)
{
return
(
CreateBuilder
)
invocation
.
callRealMethod
();
}
else
{
return
mockCreateBuilder
;
}
}
};
doAnswer
(
answer
).
when
(
client
).
create
();
doAnswer
(
invocation
->
mockCreateBuilder
).
when
(
client
).
create
();
when
(
mockCreateBuilder
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderRetrievalTest.java
浏览文件 @
39ef9593
...
...
@@ -32,7 +32,8 @@ import org.apache.flink.runtime.util.LeaderRetrievalUtils;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.test.TestingServer
;
import
org.junit.After
;
import
org.junit.Before
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStoreTest.java
浏览文件 @
39ef9593
...
...
@@ -26,8 +26,9 @@ import org.apache.flink.runtime.util.ZooKeeperUtils;
import
org.apache.flink.util.InstantiationUtil
;
import
org.apache.flink.util.TestLogger
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.zookeeper.data.Stat
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.data.Stat
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
浏览文件 @
39ef9593
...
...
@@ -22,11 +22,12 @@ import org.apache.flink.configuration.Configuration;
import
org.apache.flink.configuration.HighAvailabilityOptions
;
import
org.apache.flink.runtime.util.ZooKeeperUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework
;
import
org.apache.flink.shaded.curator4.org.apache.curator.utils.ZKPaths
;
import
org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.KeeperException
;
import
org.apache.curator.test.TestingCluster
;
import
org.apache.curator.test.TestingServer
;
import
org.apache.curator.utils.ZKPaths
;
import
org.apache.zookeeper.KeeperException
;
import
javax.annotation.Nullable
;
...
...
flink-shaded-curator/pom.xml
已删除
100644 → 0
浏览文件 @
ee7fb5e4
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-parent
</artifactId>
<version>
1.11-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
flink-shaded-curator
</artifactId>
<name>
flink-shaded-curator
</name>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-recipes
</artifactId>
<version>
${curator.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-shade-plugin
</artifactId>
<executions>
<execution>
<id>
shade-flink
</id>
<phase>
package
</phase>
<goals>
<goal>
shade
</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>
com.google.guava:guava
</include>
<include>
org.apache.curator:*
</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>
com.google.guava:guava
</artifact>
<!-- Shade guava classes that are not included by curator -->
<includes>
<include>
com/google/common/base/Function.class
</include>
<include>
com/google/common/base/Predicate.class
</include>
<include>
com/google/common/reflect/TypeToken.class
</include>
</includes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>
com.google.common
</pattern>
<shadedPattern>
org.apache.flink.curator.shaded.com.google.common
</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
flink-shaded-curator/src/main/resources/META-INF/NOTICE
已删除
100644 → 0
浏览文件 @
ee7fb5e4
flink-shaded-curator
Copyright 2014-2019 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This project bundles the following dependencies under the Apache Software License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- com.google.guava:guava:16.0.1
- org.apache.curator:curator-client:2.12.0
- org.apache.curator:curator-framework:2.12.0
- org.apache.curator:curator-recipes:2.12.0
pom.xml
浏览文件 @
39ef9593
...
...
@@ -53,7 +53,6 @@ under the License.
<!-- Dummy module to force execution of the Maven Shade plugin (see Shade plugin below) -->
<module>
tools/force-shading
</module>
<module>
flink-annotations
</module>
<module>
flink-shaded-curator
</module>
<module>
flink-core
</module>
<module>
flink-java
</module>
<module>
flink-scala
</module>
...
...
@@ -338,6 +337,12 @@ under the License.
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-shaded-zookeeper-3
</artifactId>
<version>
${zookeeper.version}-${flink.shaded.version}
</version>
</dependency>
<!-- This manages the 'javax.annotation' annotations (JSR305) -->
<dependency>
<groupId>
com.google.code.findbugs
</groupId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录