use of com.facebook.buck.slb.ThriftException in project buck by facebook.
the class ThriftCoordinatorServer method start.
public ThriftCoordinatorServer start() throws IOException {
synchronized (lock) {
try {
transport = new TNonblockingServerSocket(this.port);
} catch (TTransportException e) {
throw new ThriftException(e);
}
TThreadedSelectorServer.Args serverArgs = new TThreadedSelectorServer.Args(transport);
serverArgs.processor(processor);
server = new TThreadedSelectorServer(serverArgs);
serverThread = new Thread(() -> Preconditions.checkNotNull(server).serve());
serverThread.start();
}
return this;
}
use of com.facebook.buck.slb.ThriftException in project buck by facebook.
the class ThriftCoordinatorClient method finishedBuilding.
public FinishedBuildingResponse finishedBuilding(String minionId, int minionExitCode) throws IOException {
LOG.debug(String.format("Minion [%s] is reporting that it finished building.", minionId));
Preconditions.checkNotNull(client, "Client was not started.");
FinishedBuildingRequest request = new FinishedBuildingRequest().setStampedeId(stampedeId).setMinionId(minionId).setBuildExitCode(minionExitCode);
try {
FinishedBuildingResponse response = client.finishedBuilding(request);
return response;
} catch (TException e) {
throw new ThriftException(e);
}
}
use of com.facebook.buck.slb.ThriftException in project buck by facebook.
the class ThriftCoordinatorClient method getTargetsToBuild.
public GetTargetsToBuildResponse getTargetsToBuild(String minionId) throws IOException {
LOG.debug(String.format("Minion [%s] is requesting targets to build.", minionId));
Preconditions.checkNotNull(client, "Client was not started.");
GetTargetsToBuildRequest request = new GetTargetsToBuildRequest().setMinionId(minionId).setStampedeId(stampedeId);
try {
GetTargetsToBuildResponse response = client.getTargetsToBuild(request);
return response;
} catch (TException e) {
throw new ThriftException(e);
}
}
Aggregations