void StatsInterface::HandleStmgrsRegistrationSummaryRequest(IncomingHTTPRequest* _request) { LOG(INFO) << "Request for stream managers registration summary " << _request->GetQuery(); unsigned char* request_data = _request->ExtractFromPostData(0, _request->GetPayloadSize()); heron::proto::tmaster::StmgrsRegistrationSummaryRequest stmgrs_reg_request; if (!stmgrs_reg_request.ParseFromArray(request_data, _request->GetPayloadSize())) { LOG(ERROR) << "Unable to deserialize post data specified in" << "StmgrsRegistrationSummaryRequest" << std::endl; http_server_->SendErrorReply(_request, 400); delete _request; return; } auto stmgrs_reg_summary_response = tmaster_->GetStmgrsRegSummary(); sp_string response_string; CHECK(stmgrs_reg_summary_response->SerializeToString(&response_string)); auto http_response = new OutgoingHTTPResponse(_request); http_response->AddHeader("Content-Type", "application/octet-stream"); http_response->AddHeader("Content-Length", std::to_string(response_string.size())); http_response->AddResponse(response_string); http_server_->SendReply(_request, 200, http_response); delete _request; LOG(INFO) << "Returned stream managers registration summary response"; }
String Color::SerializeToCodeString() const { return "Color(" + SerializeToString() + ")"; }
std::string Quat::SerializeToCodeString() const { return "Quat(" + SerializeToString() + ")"; }