use of models.TuningParameter in project dr-elephant by linkedin.
the class AutoTuningAPIHelper method insertExecutionParameter.
/**
* Inserts parameter of an execution in database
* @param jobExecution Job execution
* @param paramName Parameter name
* @param paramValue Parameter value
*/
private void insertExecutionParameter(JobExecution jobExecution, String paramName, Double paramValue) {
logger.debug("Starting insertExecutionParameter");
JobSuggestedParamValue jobSuggestedParamValue = new JobSuggestedParamValue();
jobSuggestedParamValue.jobExecution = jobExecution;
TuningParameter tuningParameter = TuningParameter.find.where().eq(TuningParameter.TABLE.paramName, paramName).findUnique();
if (tuningParameter != null) {
jobSuggestedParamValue.tuningParameter = tuningParameter;
jobSuggestedParamValue.paramValue = paramValue;
jobSuggestedParamValue.save();
logger.debug("Finishing insertDefaultJobExecution. Job Execution ID. Param ID " + jobSuggestedParamValue.tuningParameter.id + " Param Name: " + jobSuggestedParamValue.tuningParameter.paramName);
} else {
logger.warn("TuningAlgorithm param null " + paramName);
}
}
Aggregations