fix hyracks REST error printing
diff --git a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobRun.java b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobRun.java
index 16f36a6..9cd7886 100644
--- a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobRun.java
+++ b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobRun.java
@@ -14,6 +14,8 @@
*/
package edu.uci.ics.hyracks.control.cc.job;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
@@ -345,7 +347,11 @@
taskAttempt.put("end-time", ta.getEndTime());
List<Exception> exceptions = ta.getExceptions();
if (exceptions != null && !exceptions.isEmpty()) {
- taskAttempt.put("failure-details", exceptions);
+ for(Exception exception : exceptions){
+ StringWriter exceptionWriter = new StringWriter();
+ exception.printStackTrace(new PrintWriter(exceptionWriter));
+ taskAttempt.put("failure-details", exceptionWriter.toString());
+ }
}
taskAttempts.put(taskAttempt);
}