Exemplo n.º 1
0
TEST_RESULT TestAllocateRequestMessage()
{
	std::stringstream messageToBeSent;

	AllocateRequest * req  = new AllocateRequest("super-puper-tag", 10);


	req->Write(messageToBeSent);

	std::cout << messageToBeSent.str() << std::endl;

	return PASSED;
}
AllocateResponse ApplicationMasterProtocol::allocate(AllocateRequest &request) {
    try {
        AllocateRequestProto requestProto = request.getProto();
        AllocateResponseProto responseProto;
        invoke(RpcCall(true, "allocate", &requestProto, &responseProto));
        return AllocateResponse(responseProto);
    } catch (const YarnRpcServerException & e) {
        UnWrapper<ApplicationMasterNotRegisteredException, YarnIOException> unwrapper(e);
        unwrapper.unwrap(__FILE__, __LINE__);
    }
}
Exemplo n.º 3
0
AllocateResponse ApplicationMaster::allocate(list<ResourceRequest> &asks,
        list<ContainerId> &releases, ResourceBlacklistRequest &blacklistRequest,
        int32_t responseId, float progress) {
    AllocateRequest request;
    request.setAsks(asks);
    request.setReleases(releases);
    request.setBlacklistRequest(blacklistRequest);
    request.setResponseId(responseId);
    request.setProgress(progress);

    return ((ApplicationMasterProtocol*) rmClient)->allocate(request);
}
AllocateResponse ApplicationMaster::allocate(list<ResourceRequest> &asks,
        list<ContainerId> &releases, ResourceBlacklistRequest &blacklistRequest,
        int32_t responseId, float progress) {
    AllocateRequest request;
    AllocateResponse response;
    request.setAsks(asks);
    request.setReleases(releases);
    request.setBlacklistRequest(blacklistRequest);
    request.setResponseId(responseId);
    request.setProgress(progress);

    RESOURCEMANAGER_SCHEDULER_HA_RETRY_BEGIN();
    response = appMasterProto->allocate(request);
    RESOURCEMANAGER_SCHEDULER_HA_RETRY_END();
    return response;
}