Fixed task cluster build issue. Fixed closing of Task context
git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_scheduling@390 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/scheduler/DefaultJobRunStateMachine.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/scheduler/DefaultJobRunStateMachine.java
index b20c467..2ea10d6 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/scheduler/DefaultJobRunStateMachine.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/scheduler/DefaultJobRunStateMachine.java
@@ -393,8 +393,11 @@
while (!done) {
done = true;
Set<TaskId> set = new HashSet<TaskId>();
+ Set<TaskId> oldSet = null;
for (Map.Entry<TaskId, Set<TaskId>> e : taskClusterMap.entrySet()) {
set.clear();
+ oldSet = e.getValue();
+ set.addAll(e.getValue());
for (TaskId tid : e.getValue()) {
set.addAll(taskClusterMap.get(tid));
}
@@ -409,7 +412,7 @@
break;
}
}
- for (TaskId tid : set) {
+ for (TaskId tid : oldSet) {
taskClusterMap.put(tid, set);
}
}
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
index d05db7d..2f28b92 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
@@ -418,7 +418,6 @@
Task task = taskMap.get(taId);
if (task != null) {
task.abort();
- task.close();
}
}
ji.close();
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Task.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Task.java
index 8f30e39..ac517cf 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Task.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Task.java
@@ -199,6 +199,7 @@
joblet.notifyTaskFailed(this, e);
} finally {
ct.setName(threadName);
+ close();
}
}
}
\ No newline at end of file
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
index a2f366b..6f46932 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
@@ -110,7 +110,6 @@
@Override
public void close() throws HyracksDataException {
- System.err.println("close%%%%%%%%%%%%%%%%%%%%%%%%%" + joiner + " " + env);
env.set(JOINER, joiner);
}
@@ -139,7 +138,6 @@
@Override
public void open() throws HyracksDataException {
joiner = (InMemoryHashJoin) env.get(JOINER);
- System.err.println("%%%%%%%%%%%%%%%%%%%%%%%%%" + joiner + " " + env);
writer.open();
}
@@ -150,7 +148,6 @@
@Override
public void close() throws HyracksDataException {
- System.err.println("^^^^^^^^^^^^^^^^^^^^^^^^" + joiner);
joiner.closeJoin(writer);
writer.close();
env.set(JOINER, null);
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
index a84d793..39ca448 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
@@ -75,7 +75,7 @@
protected void runTest(JobSpecification spec) throws Exception {
UUID jobId = hcc.createJob("test", spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
- System.err.println(spec.toJSON());
+ System.err.println(spec.toJSON().toString(2));
hcc.start(jobId);
System.err.print(jobId);
cc.waitForCompletion(jobId);