diff --git a/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java b/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java index b6b7536848d68e886beac297a841c221035cb6e7..91775a51ad55e56c623f48cc6ab82a763f8cd92b 100644 --- a/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java +++ b/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java @@ -16,6 +16,8 @@ package eu.stratosphere.compiler.contextcheck; import java.util.HashSet; import java.util.Set; +import com.google.common.base.Preconditions; + import eu.stratosphere.api.common.InvalidProgramException; import eu.stratosphere.api.common.Plan; import eu.stratosphere.api.common.operators.BulkIteration; @@ -52,9 +54,10 @@ public class ContextChecker implements Visitor { * thrown. * * @param plan - * The PACT plan to check. + * The plan to check. */ public void check(Plan plan) { + Preconditions.checkNotNull(plan, "The passed plan is null."); this.visitedNodes.clear(); plan.accept(this); } diff --git a/stratosphere-examples/stratosphere-scala-examples/src/main/scala/eu/stratosphere/examples/scala/wordcount/WordCount.scala b/stratosphere-examples/stratosphere-scala-examples/src/main/scala/eu/stratosphere/examples/scala/wordcount/WordCount.scala index d77507d3607345e619f436eddc28ed658ef923b8..e3083aa3030aa25f932d60fe416ff7ff0bf3d5f3 100644 --- a/stratosphere-examples/stratosphere-scala-examples/src/main/scala/eu/stratosphere/examples/scala/wordcount/WordCount.scala +++ b/stratosphere-examples/stratosphere-scala-examples/src/main/scala/eu/stratosphere/examples/scala/wordcount/WordCount.scala @@ -44,6 +44,10 @@ class WordCount extends Program with ProgramDescription with Serializable { "Parameters: " } override def getPlan(args: String*) = { + if (args.size < 3) { + println(getDescription) + System.exit(1); + } getScalaPlan(args(0).toInt, args(1), args(2)) } } diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java index d256d5176be04b7918c2f185007d6e8faab6e459..f8cbbe1e161f57aa4917590b9602b655e52dba6c 100644 --- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java +++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java @@ -359,9 +359,12 @@ public class JobManager implements DeploymentManager, ExtendedManagementProtocol // Clean up is triggered through a shutdown hook // freeze this thread to keep the JVM alive (the job manager threads are daemon threads) - try { - new Object().wait(); - } catch (InterruptedException e) {} + Object w = new Object(); + synchronized (w) { + try { + w.wait(); + } catch (InterruptedException e) {} + } } @SuppressWarnings("static-access") diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java index 4b832638063c7e2e7015330cc420d4fc7e052871..1ea5b1be626c47fe2b83ed0a2cec57e4b7ce7a23 100644 --- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java +++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java @@ -556,8 +556,9 @@ public class TaskManager implements TaskOperationProtocol { socket.bind(bindP); socket.connect(toSocket, timeout); } catch (Exception ex) { + LOG.info("Failed to determine own IP address from '" + fromAddress + "': " + ex.getMessage()); if (LOG.isDebugEnabled()) { - LOG.debug("Failed on this address: " + ex.getMessage()); + LOG.debug("Failed with exception", ex); } connectable = false; } finally {