Skip to content

Commit a1a2d13

Browse files
authored
Wrap fate thrift service with highly available service (#6152)
1 parent 383c802 commit a1a2d13

File tree

1 file changed

+9
-12
lines changed
  • server/manager/src/main/java/org/apache/accumulo/manager

1 file changed

+9
-12
lines changed

server/manager/src/main/java/org/apache/accumulo/manager/Manager.java

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
import org.apache.accumulo.core.manager.balancer.TServerStatusImpl;
8282
import org.apache.accumulo.core.manager.balancer.TabletServerIdImpl;
8383
import org.apache.accumulo.core.manager.state.tables.TableState;
84+
import org.apache.accumulo.core.manager.thrift.FateService;
8485
import org.apache.accumulo.core.manager.thrift.ManagerClientService;
8586
import org.apache.accumulo.core.manager.thrift.ManagerGoalState;
8687
import org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo;
@@ -326,9 +327,6 @@ synchronized void setManagerState(final ManagerState newState) {
326327

327328
private Future<Void> upgradeMetadataFuture;
328329

329-
private FateServiceHandler fateServiceHandler;
330-
private ManagerClientServiceHandler managerClientHandler;
331-
332330
private int assignedOrHosted(TableId tableId) {
333331
int result = 0;
334332
for (TabletGroupWatcher watcher : watchers) {
@@ -1241,17 +1239,16 @@ public void run() {
12411239
// ACCUMULO-4424 Put up the Thrift servers before getting the lock as a sign of process health
12421240
// when a hot-standby
12431241
//
1244-
// Start the Manager's Fate Service
1245-
fateServiceHandler = new FateServiceHandler(this);
1246-
managerClientHandler = new ManagerClientServiceHandler(this);
1247-
// Start the Manager's Client service
1248-
// Ensure that calls before the manager gets the lock fail
1249-
ManagerClientService.Iface haProxy =
1250-
HighlyAvailableServiceWrapper.service(managerClientHandler, this);
1242+
// Start the Manager's Fate Service. Ensure that calls before the manager gets the lock fail
1243+
FateService.Iface fateServiceHandler =
1244+
HighlyAvailableServiceWrapper.service(new FateServiceHandler(this), this);
1245+
// Start the Manager's Client service. Ensure that calls before the manager gets the lock fail
1246+
ManagerClientService.Iface managerClientHandler =
1247+
HighlyAvailableServiceWrapper.service(new ManagerClientServiceHandler(this), this);
12511248

12521249
ServerAddress sa;
1253-
var processor =
1254-
ThriftProcessorTypes.getManagerTProcessor(this, fateServiceHandler, haProxy, getContext());
1250+
var processor = ThriftProcessorTypes.getManagerTProcessor(this, fateServiceHandler,
1251+
managerClientHandler, getContext());
12551252

12561253
try {
12571254
@SuppressWarnings("deprecation")

0 commit comments

Comments
 (0)