Skip to content

Commit 97f17ac

Browse files
committed
Cluster Raft module design
By using the Raft protocol, multiple Zeppelin-Server groups are built into a Zeppelin cluster, the cluster State Machine is maintained through the Raft protocol, and the services in the cluster are agreed upon. The Zeppelin-Server and Zeppelin-Interperter services and processes are stored in the Cluster MetaData. Metadata information; [Feature] * [x] add raft algorithm atomix jar * [x] add cluster state machine * [x] add state machine query command * [x] add state machine delete command * [x] add state machine put command * [x] Isolate the netty JAR package introduced by atomix * https://issues.apache.org/jira/browse/ZEPPELIN-3610 CI pass * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes
1 parent 92f244e commit 97f17ac

20 files changed

+2610
-8
lines changed

bin/interpreter.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if [[ -d "${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes" ]]; then
8181
ZEPPELIN_INTP_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes"
8282
fi
8383

84-
addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib"
84+
addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-interpreter-api/target"
8585
addJarInDirForIntp "${ZEPPELIN_HOME}/lib/interpreter"
8686
addJarInDirForIntp "${INTERPRETER_DIR}"
8787

livy/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@
5757
<version>${project.version}</version>
5858
</dependency>
5959

60-
<dependency>
61-
<groupId>${project.groupId}</groupId>
62-
<artifactId>zeppelin-interpreter</artifactId>
63-
<version>${project.version}</version>
64-
<scope>test</scope>
65-
</dependency>
66-
6760
<dependency>
6861
<groupId>org.apache.livy</groupId>
6962
<artifactId>livy-integration-test</artifactId>

zeppelin-interpreter/pom.xml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,137 @@
4444
<maven.aeither.provider.version>3.0.3</maven.aeither.provider.version>
4545
<wagon.version>1.0</wagon.version>
4646
<jline.version>2.12.1</jline.version>
47+
<atomix.version>3.0.0-rc4</atomix.version>
48+
<atomix.netty.version>4.1.11.Final</atomix.netty.version>
49+
<commons-math3.version>3.1.1</commons-math3.version>
50+
<guava.version>20.0</guava.version>
51+
<commons-lang3.version>3.4</commons-lang3.version>
4752

4853
<!--plugin versions-->
4954
<plugin.shade.version>2.3</plugin.shade.version>
5055
</properties>
5156

5257
<dependencies>
58+
<dependency>
59+
<groupId>io.atomix</groupId>
60+
<artifactId>atomix</artifactId>
61+
<version>${atomix.version}</version>
62+
<exclusions>
63+
<exclusion>
64+
<groupId>io.netty</groupId>
65+
<artifactId>netty-transport</artifactId>
66+
</exclusion>
67+
<exclusion>
68+
<groupId>io.netty</groupId>
69+
<artifactId>netty-codec</artifactId>
70+
</exclusion>
71+
<exclusion>
72+
<groupId>io.netty</groupId>
73+
<artifactId>netty-handler</artifactId>
74+
</exclusion>
75+
<exclusion>
76+
<groupId>io.netty</groupId>
77+
<artifactId>netty-common</artifactId>
78+
</exclusion>
79+
<exclusion>
80+
<groupId>io.netty</groupId>
81+
<artifactId>netty-buffer</artifactId>
82+
</exclusion>
83+
<exclusion>
84+
<groupId>io.netty</groupId>
85+
<artifactId>netty-transport-native-epoll</artifactId>
86+
</exclusion>
87+
<exclusion>
88+
<groupId>io.netty</groupId>
89+
<artifactId>netty-transport-native-unix-common</artifactId>
90+
</exclusion>
91+
<exclusion>
92+
<groupId>org.apache.commons</groupId>
93+
<artifactId>commons-math3</artifactId>
94+
</exclusion>
95+
<exclusion>
96+
<groupId>org.apache.commons</groupId>
97+
<artifactId>commons-lang3</artifactId>
98+
</exclusion>
99+
<exclusion>
100+
<groupId>com.google.guava</groupId>
101+
<artifactId>guava</artifactId>
102+
</exclusion>
103+
</exclusions>
104+
</dependency>
105+
106+
<dependency>
107+
<groupId>io.atomix</groupId>
108+
<artifactId>atomix-raft</artifactId>
109+
<version>${atomix.version}</version>
110+
</dependency>
111+
112+
<dependency>
113+
<groupId>io.atomix</groupId>
114+
<artifactId>atomix-primary-backup</artifactId>
115+
<version>${atomix.version}</version>
116+
</dependency>
117+
118+
<dependency>
119+
<groupId>io.netty</groupId>
120+
<artifactId>netty-transport</artifactId>
121+
<version>${atomix.netty.version}</version>
122+
</dependency>
123+
124+
<dependency>
125+
<groupId>io.netty</groupId>
126+
<artifactId>netty-codec</artifactId>
127+
<version>${atomix.netty.version}</version>
128+
</dependency>
129+
130+
<dependency>
131+
<groupId>io.netty</groupId>
132+
<artifactId>netty-handler</artifactId>
133+
<version>${atomix.netty.version}</version>
134+
</dependency>
135+
136+
<dependency>
137+
<groupId>io.netty</groupId>
138+
<artifactId>netty-common</artifactId>
139+
<version>${atomix.netty.version}</version>
140+
</dependency>
141+
142+
<dependency>
143+
<groupId>io.netty</groupId>
144+
<artifactId>netty-buffer</artifactId>
145+
<version>${atomix.netty.version}</version>
146+
</dependency>
147+
148+
<dependency>
149+
<groupId>io.netty</groupId>
150+
<artifactId>netty-transport-native-epoll</artifactId>
151+
<classifier>linux-x86_64</classifier>
152+
<version>${atomix.netty.version}</version>
153+
</dependency>
154+
155+
<dependency>
156+
<groupId>io.netty</groupId>
157+
<artifactId>netty-transport-native-unix-common</artifactId>
158+
<version>${atomix.netty.version}</version>
159+
</dependency>
160+
161+
<dependency>
162+
<groupId>org.apache.commons</groupId>
163+
<artifactId>commons-math3</artifactId>
164+
<version>${commons-math3.version}</version>
165+
</dependency>
166+
167+
<dependency>
168+
<groupId>org.apache.commons</groupId>
169+
<artifactId>commons-lang3</artifactId>
170+
<version>${commons-lang3.version}</version>
171+
</dependency>
172+
173+
<dependency>
174+
<groupId>com.google.guava</groupId>
175+
<artifactId>guava</artifactId>
176+
<version>${guava.version}</version>
177+
</dependency>
53178

54179
<dependency>
55180
<groupId>org.apache.thrift</groupId>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.zeppelin.cluster;
18+
19+
import io.atomix.cluster.messaging.BroadcastService;
20+
21+
import java.util.function.Consumer;
22+
23+
/**
24+
* Broadcast Service Adapter
25+
*/
26+
public class BroadcastServiceAdapter implements BroadcastService {
27+
@Override
28+
public void broadcast(String subject, byte[] message) {
29+
30+
}
31+
32+
@Override
33+
public void addListener(String subject, Consumer<byte[]> listener) {
34+
35+
}
36+
37+
@Override
38+
public void removeListener(String subject, Consumer<byte[]> listener) {
39+
40+
}
41+
}

0 commit comments

Comments
 (0)