-
Notifications
You must be signed in to change notification settings - Fork 204
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
Adding DynamoDB high availability features #675
Changes from all commits
209e2c1
23ae2da
da0337f
8316eb7
fce8c04
c3e2453
8b05cb4
7380cb2
6ba4453
deb8636
b24b867
82e0b0b
c3ca083
5389d89
30909b6
d357c45
185156e
8ed304e
bb56961
e9b5549
fbad7ba
d2437ca
d365098
8744c4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,3 +206,5 @@ bin/ | |
build | ||
site | ||
|
||
# ignore asdf files for jdk manager | ||
.tool-versions |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
import io.mantisrx.server.core.CoreConfiguration; | ||
import io.mantisrx.server.core.master.MasterDescription; | ||
import io.mantisrx.server.core.master.MasterMonitor; | ||
import io.mantisrx.server.core.zookeeper.CuratorService; | ||
import io.mantisrx.server.core.master.ZookeeperLeaderMonitorFactory; | ||
import io.mantisrx.server.master.client.config.StaticPropertiesConfigurationFactory; | ||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
|
@@ -56,8 +56,7 @@ public static void main(String[] args) { | |
final CountDownLatch latch = new CountDownLatch(5); | ||
StaticPropertiesConfigurationFactory configurationFactory = new StaticPropertiesConfigurationFactory(properties); | ||
CoreConfiguration config = configurationFactory.getConfig(); | ||
final CuratorService curatorService = new CuratorService(config); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a change that might be controversial. The CuratorService and really the CuratorFramework from IMO is really Zookeeper. In order to make the abstraction around Zookeeper I chose to reduce the exposure and knowledge of the curator to inside the ZK leadership functions. |
||
MasterMonitor masterMonitor = curatorService.getMasterMonitor(); | ||
MasterMonitor masterMonitor = new ZookeeperLeaderMonitorFactory().createLeaderMonitor(config); | ||
masterMonitor.getMasterObservable() | ||
.filter(new Func1<MasterDescription, Boolean>() { | ||
@Override | ||
|
@@ -73,7 +72,7 @@ public void call(MasterDescription masterDescription) { | |
} | ||
}) | ||
.subscribe(); | ||
curatorService.start(); | ||
masterMonitor.start(); | ||
try { | ||
latch.await(); | ||
} catch (InterruptedException e) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,8 @@ public interface CoreConfiguration { | |
@Config("mantis.asyncHttpClient.readTimeoutMs") | ||
@Default("10000") | ||
int getAsyncHttpClientReadTimeoutMs(); | ||
|
||
@Config("mantis.leader.monitor.factory") | ||
@Default("io.mantisrx.server.core.master.LocalLeaderFactory") | ||
String getLeaderMonitorFactory(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: getLeaderMonitorFactoryName |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the file is a confusing unified diff, but this is moved not deleted. If you find changes here please flag them as the intent was no logic code change, just moving.