Search in sources :

Example 16 with FrontendRequest

use of com.facebook.buck.distributed.thrift.FrontendRequest in project buck by facebook.

the class DistBuildService method createFetchSourceFileRequest.

public static FrontendRequest createFetchSourceFileRequest(String fileHash) {
    FetchSourceFilesRequest fetchSourceFileRequest = new FetchSourceFilesRequest();
    fetchSourceFileRequest.setContentHashesIsSet(true);
    fetchSourceFileRequest.addToContentHashes(fileHash);
    FrontendRequest frontendRequest = new FrontendRequest();
    frontendRequest.setType(FrontendRequestType.FETCH_SRC_FILES);
    frontendRequest.setFetchSourceFilesRequest(fetchSourceFileRequest);
    return frontendRequest;
}
Also used : FrontendRequest(com.facebook.buck.distributed.thrift.FrontendRequest) FetchSourceFilesRequest(com.facebook.buck.distributed.thrift.FetchSourceFilesRequest)

Example 17 with FrontendRequest

use of com.facebook.buck.distributed.thrift.FrontendRequest in project buck by facebook.

the class DistBuildService method fetchBuildSlaveLogDir.

public MultiGetBuildSlaveLogDirResponse fetchBuildSlaveLogDir(final StampedeId stampedeId, final List<RunId> runIds) throws IOException {
    MultiGetBuildSlaveLogDirRequest getBuildSlaveLogDirRequest = new MultiGetBuildSlaveLogDirRequest();
    getBuildSlaveLogDirRequest.setStampedeId(stampedeId);
    getBuildSlaveLogDirRequest.setRunIds(runIds);
    FrontendRequest request = new FrontendRequest();
    request.setType(FrontendRequestType.GET_BUILD_SLAVE_LOG_DIR);
    request.setMultiGetBuildSlaveLogDirRequest(getBuildSlaveLogDirRequest);
    FrontendResponse response = makeRequestChecked(request);
    return response.getMultiGetBuildSlaveLogDirResponse();
}
Also used : FrontendResponse(com.facebook.buck.distributed.thrift.FrontendResponse) FrontendRequest(com.facebook.buck.distributed.thrift.FrontendRequest) MultiGetBuildSlaveLogDirRequest(com.facebook.buck.distributed.thrift.MultiGetBuildSlaveLogDirRequest)

Example 18 with FrontendRequest

use of com.facebook.buck.distributed.thrift.FrontendRequest in project buck by facebook.

the class DistBuildService method getCurrentBuildJobState.

public BuildJob getCurrentBuildJobState(StampedeId id) throws IOException {
    BuildStatusRequest statusRequest = new BuildStatusRequest();
    statusRequest.setStampedeId(id);
    FrontendRequest request = new FrontendRequest();
    request.setType(FrontendRequestType.BUILD_STATUS);
    request.setBuildStatusRequest(statusRequest);
    FrontendResponse response = makeRequestChecked(request);
    BuildJob job = response.getBuildStatusResponse().getBuildJob();
    Preconditions.checkState(job.getStampedeId().equals(id));
    return job;
}
Also used : FrontendResponse(com.facebook.buck.distributed.thrift.FrontendResponse) FrontendRequest(com.facebook.buck.distributed.thrift.FrontendRequest) BuildStatusRequest(com.facebook.buck.distributed.thrift.BuildStatusRequest) BuildJob(com.facebook.buck.distributed.thrift.BuildJob)

Example 19 with FrontendRequest

use of com.facebook.buck.distributed.thrift.FrontendRequest in project buck by facebook.

the class DistBuildService method setBuckVersion.

public void setBuckVersion(StampedeId id, BuckVersion buckVersion) throws IOException {
    SetBuckVersionRequest setBuckVersionRequest = new SetBuckVersionRequest();
    setBuckVersionRequest.setStampedeId(id);
    setBuckVersionRequest.setBuckVersion(buckVersion);
    FrontendRequest request = new FrontendRequest();
    request.setType(FrontendRequestType.SET_BUCK_VERSION);
    request.setSetBuckVersionRequest(setBuckVersionRequest);
    makeRequestChecked(request);
}
Also used : SetBuckVersionRequest(com.facebook.buck.distributed.thrift.SetBuckVersionRequest) FrontendRequest(com.facebook.buck.distributed.thrift.FrontendRequest)

Example 20 with FrontendRequest

use of com.facebook.buck.distributed.thrift.FrontendRequest in project buck by facebook.

the class DistBuildService method createFetchBuildGraphRequest.

public static FrontendRequest createFetchBuildGraphRequest(StampedeId stampedeId) {
    FetchBuildGraphRequest fetchBuildGraphRequest = new FetchBuildGraphRequest();
    fetchBuildGraphRequest.setStampedeId(stampedeId);
    FrontendRequest frontendRequest = new FrontendRequest();
    frontendRequest.setType(FrontendRequestType.FETCH_BUILD_GRAPH);
    frontendRequest.setFetchBuildGraphRequest(fetchBuildGraphRequest);
    return frontendRequest;
}
Also used : FetchBuildGraphRequest(com.facebook.buck.distributed.thrift.FetchBuildGraphRequest) FrontendRequest(com.facebook.buck.distributed.thrift.FrontendRequest)

Aggregations

FrontendRequest (com.facebook.buck.distributed.thrift.FrontendRequest)25 FrontendResponse (com.facebook.buck.distributed.thrift.FrontendResponse)18 Test (org.junit.Test)9 BuildJob (com.facebook.buck.distributed.thrift.BuildJob)5 StampedeId (com.facebook.buck.distributed.thrift.StampedeId)5 IOException (java.io.IOException)4 BuildJobStateFileHashes (com.facebook.buck.distributed.thrift.BuildJobStateFileHashes)3 Announcement (com.facebook.buck.distributed.thrift.Announcement)2 BuildJobState (com.facebook.buck.distributed.thrift.BuildJobState)2 BuildJobStateFileHashEntry (com.facebook.buck.distributed.thrift.BuildJobStateFileHashEntry)2 BuildStatusRequest (com.facebook.buck.distributed.thrift.BuildStatusRequest)2 FileInfo (com.facebook.buck.distributed.thrift.FileInfo)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ArrayList (java.util.ArrayList)2 BuckConfig (com.facebook.buck.cli.BuckConfig)1 FakeBuckConfig (com.facebook.buck.cli.FakeBuckConfig)1 FrontendService (com.facebook.buck.distributed.FrontendService)1 AnnouncementRequest (com.facebook.buck.distributed.thrift.AnnouncementRequest)1 AnnouncementResponse (com.facebook.buck.distributed.thrift.AnnouncementResponse)1 BuildJobStateTargetGraph (com.facebook.buck.distributed.thrift.BuildJobStateTargetGraph)1