Commit 03c18c9f authored by cdelbe's avatar cdelbe
Browse files

PICKED FROM TRUNK 15155

SCHEDULING-529 : fix merge with master

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/proactive/scheduling/branches/Scheduling_2.0.x@15160 28e8926c-6b08-0410-baaa-805c5e19b8d6
parent 0a144df2
......@@ -1068,7 +1068,7 @@ public class SchedulerCore implements UserSchedulerInterface_, AdminMethodsInter
boolean noResult = (jobStatus == JobStatus.CANCELED && taskResult == null);
if (jobStatus == JobStatus.FAILED || noResult) {
taskResult = new TaskResultImpl(task.getId(), new Exception(errorMsg), new SimpleTaskLogs("",
errorMsg), -1);
errorMsg), -1, null);
((JobResultImpl) job.getJobResult()).addTaskResult(task.getName(), taskResult, task
.isPreciousResult());
} else if (jobStatus == JobStatus.CANCELED) {
......
......@@ -184,11 +184,14 @@ public class TaskResultImpl implements TaskResult {
* @param value the result of the task.
* @param output the output of the task.
* @param execDuration the execution duration of the task itself
* @param exportedProperties the map of all properties that has been exported through Exporter.exportProperty
*/
public TaskResultImpl(TaskId id, Serializable value, TaskLogs output, long execDuration) {
public TaskResultImpl(TaskId id, Serializable value, TaskLogs output, long execDuration,
Map<String, BigString> exportedProperties) {
this(id, output);
this.taskDuration = execDuration;
this.value = value;
this.exportedProperties = exportedProperties;
try {
this.serializedValue = ObjectToByteConverter.ObjectStream.convert(value);
} catch (IOException e) {
......@@ -203,11 +206,14 @@ public class TaskResultImpl implements TaskResult {
* @param exception the exception that occurred in the task.
* @param output the output of the task.
* @param execDuration the execution duration of the task itself
* @param exportedProperties the map of all properties that has been exported through Exporter.exportProperty
*/
public TaskResultImpl(TaskId id, Throwable exception, TaskLogs output, long execDuration) {
public TaskResultImpl(TaskId id, Throwable exception, TaskLogs output, long execDuration,
Map<String, BigString> exportedProperties) {
this(id, output);
this.taskDuration = execDuration;
this.exception = exception;
this.exportedProperties = exportedProperties;
try {
this.serializedException = ObjectToByteConverter.ObjectStream.convert(exception);
} catch (IOException e) {
......
......@@ -124,7 +124,7 @@ public class TestDatabaseCRUD {
//add a taskResult
itfJob.setJobResult(new JobResultImpl(itfJob.getId()));
((JobResultImpl) itfJob.getJobResult()).addTaskResult("task2", new TaskResultImpl(TaskIdImpl
.nextId(itfJob.getJobInfo().getJobId()), "salut", null, 1), true);
.nextId(itfJob.getJobInfo().getJobId()), "salut", null, 1, null), true);
//register the job
DatabaseManager.getInstance().register(itfJob);
//list of internal job to recover
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment