Permalink
Browse files

move clearning shutdown hook out of flow shutdown hook.

  • Loading branch information...
1 parent bebde82 commit 13d9ebded975228ae403c08a4116572492ec5efa @cwensel committed Apr 8, 2009
Showing with 6 additions and 17 deletions.
  1. +6 −17 src/core/cascading/flow/Flow.java
@@ -21,21 +21,6 @@
package cascading.flow;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
import cascading.CascadingException;
import cascading.cascade.Cascade;
import cascading.pipe.Pipe;
@@ -52,6 +37,10 @@
import org.jgrapht.Graphs;
import org.jgrapht.traverse.TopologicalOrderIterator;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.*;
+
/**
* A {@link Pipe} assembly is connected to the necessary number of {@link Tap} sinks and
* sources into a Flow. A Flow is then executed to push the incoming source data through
@@ -1020,13 +1009,13 @@ private void registerShutdownHook()
if( !isStopJobsOnExit() )
return;
+ getHdfsShutdownHook();
+
shutdownHook = new Thread()
{
@Override
public void run()
{
- getHdfsShutdownHook();
-
Flow.this.stop();
callHdfsShutdownHook();

0 comments on commit 13d9ebd

Please sign in to comment.