Changed operator start/finish messages to show name of operator
git-svn-id: https://hyracks.googlecode.com/svn/trunk@156 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java b/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
index d6c3ee2..3ffb39d 100644
--- a/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
+++ b/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
@@ -114,23 +114,18 @@
}
try {
LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
- + opIId.getPartition() + ": STARTING");
- } catch (Exception e) {
- e.printStackTrace();
- // notifyOperatorFailure(opIId);
- }
- try {
+ + opIId.getPartition() + "(" + hon + ")" + ": STARTING");
hon.run();
+ LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
+ + opIId.getPartition() + "(" + hon + ")" + ": TERMINATED");
notifyOperatorCompletion(opIId);
} catch (Exception e) {
e.printStackTrace();
- // notifyOperatorFailure(opIId);
- }
- try {
- LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
- + opIId.getPartition() + ": TERMINATED");
- } catch (Exception e) {
- e.printStackTrace();
+ // DO NOT UNCOMMENT THE FOLLOWING LINE.
+ // The failure of an operator triggers a re-attempt of the job at the CC. If the failure was non-transient,
+ // this will lead to an infinite number of attempts since there is no upper bount yet on how many times
+ // a job is retried.
+
// notifyOperatorFailure(opIId);
}
}
diff --git a/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java b/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
index 12670e7..520c7b5 100644
--- a/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
+++ b/hyracks/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
@@ -21,6 +21,7 @@
import edu.uci.ics.hyracks.api.context.IHyracksContext;
import edu.uci.ics.hyracks.api.dataflow.IOperatorNodePushable;
import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
public class OperatorRunnable implements Runnable {
private IOperatorNodePushable opNode;
@@ -53,7 +54,7 @@
IFrameWriter writer = opNode.getInputFrameWriter(0);
writer.open();
reader.open();
- while (reader.nextFrame(buffer)) {
+ while (readFrame()) {
if (abort) {
break;
}
@@ -69,4 +70,13 @@
throw new RuntimeException(e);
}
}
+
+ protected boolean readFrame() throws HyracksDataException {
+ return reader.nextFrame(buffer);
+ }
+
+ @Override
+ public String toString() {
+ return "OperatorRunnable[" + opNode.getClass().getName() + "]";
+ }
}
\ No newline at end of file