int getApplicationReport(LibYarnClient_t *client,char *jobId, LibYarnApplicationReport_t **applicationReport) { string jobIdStr(jobId); ApplicationReport applicationReportCpp; int result = client->getApplicationReport(jobIdStr,applicationReportCpp); if (result == FUNCTION_SUCCEEDED){ *applicationReport = (LibYarnApplicationReport_t *) malloc(sizeof (LibYarnApplicationReport_t)); (*applicationReport)->appId = applicationReportCpp.getApplicationId().getId(); (*applicationReport)->user = strdup(applicationReportCpp.getUser().c_str()); (*applicationReport)->queue = strdup(applicationReportCpp.getQueue().c_str()); (*applicationReport)->name = strdup(applicationReportCpp.getName().c_str()); (*applicationReport)->host = strdup(applicationReportCpp.getHost().c_str()); (*applicationReport)->port = applicationReportCpp.getRpcPort(); (*applicationReport)->url = strdup(applicationReportCpp.getTrackingUrl().c_str()); (*applicationReport)->status = applicationReportCpp.getYarnApplicationState(); (*applicationReport)->diagnostics = strdup(applicationReportCpp.getDiagnostics().c_str()); (*applicationReport)->startTime = applicationReportCpp.getStartTime(); (*applicationReport)->progress = applicationReportCpp.getProgress(); return FUNCTION_SUCCEEDED; } else{ setErrorMessage(client->getErrorMessage()); return FUNCTION_FAILED; } }