You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/07/02 14:30:36 UTC

[1/2] git commit: SLIDER-159 TestLongLivedProcess.testEcho failing

Repository: incubator-slider
Updated Branches:
  refs/heads/develop 5bb80a42b -> 0151b9f53


SLIDER-159 TestLongLivedProcess.testEcho failing


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e9ddcf0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e9ddcf0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e9ddcf0b

Branch: refs/heads/develop
Commit: e9ddcf0b13beb6aea3822ee0164f6f46f40676f2
Parents: 5bb80a4
Author: Steve Loughran <st...@apache.org>
Authored: Wed Jul 2 13:23:54 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Jul 2 13:23:54 2014 +0100

----------------------------------------------------------------------
 .../services/workflow/ForkedProcessService.java | 22 +-------------
 .../services/workflow/LongLivedProcess.java     | 31 ++++++++++++++++++++
 .../services/workflow/TestLongLivedProcess.java |  5 ++--
 3 files changed, 35 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
index ee68aa4..ccce6cb 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
@@ -279,27 +279,7 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem
     if (process == null) {
       return new LinkedList<String>();
     }
-    long start = System.currentTimeMillis();
-    while (System.currentTimeMillis() - start <= duration) {
-      boolean finished;
-      if (finalOutput) {
-        // final flag means block until all data is done
-        finished = process.isFinalOutputProcessed();
-      } else {
-        // there is some output
-        finished = !process.isRecentOutputEmpty();
-      }
-      if (finished) {
-        break;
-      }
-      try {
-        Thread.sleep(100);
-      } catch (InterruptedException ie) {
-        Thread.currentThread().interrupt();
-        break;
-      }
-    }
-    return process.getRecentOutput();
+    return process.getRecentOutput(finalOutput, duration);
   }
   
 }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
index d9ddecb..05a1c50 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
@@ -357,6 +357,37 @@ public class LongLivedProcess implements Runnable {
   }
 
   /**
+   * Get the recent output from the process, or [] if not defined
+   *
+   * @param finalOutput flag to indicate "wait for the final output of the process"
+   * @param duration the duration, in ms, 
+   * ro wait for recent output to become non-empty
+   * @return a possibly empty list
+   */
+  public List<String> getRecentOutput(boolean finalOutput, int duration) {
+    long start = System.currentTimeMillis();
+    while (System.currentTimeMillis() - start <= duration) {
+      boolean finishedOutput;
+      if (finalOutput) {
+        // final flag means block until all data is done
+        finishedOutput = isFinalOutputProcessed();
+      } else {
+        // there is some output
+        finishedOutput = !isRecentOutputEmpty();
+      }
+      if (finishedOutput) {
+        break;
+      }
+      try {
+        Thread.sleep(100);
+      } catch (InterruptedException ie) {
+        Thread.currentThread().interrupt();
+        break;
+      }
+    }
+    return getRecentOutput();
+  }
+  /**
    * add the recent line to the list of recent lines; deleting
    * an earlier on if the limit is reached.
    *

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java
----------------------------------------------------------------------
diff --git a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java
index c8a0719..668bcca 100644
--- a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java
+++ b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java
@@ -126,13 +126,14 @@ public class TestLongLivedProcess extends WorkflowServiceTestBase implements
   }
 
   /**
-   * Get the final output. includes a quick sleep for the tail output
+   * Get the final output. 
    * @return the last output
    */
   private List<String> getFinalOutput() {
-    return process.getRecentOutput();
+    return process.getRecentOutput(true, 4000);
   }
 
+
   private LongLivedProcess initProcess(List<String> commands) {
     process = new LongLivedProcess(name.getMethodName(), log, commands);
     process.setLifecycleCallback(this);


[2/2] git commit: SLIDER-200 double "mvn install" failing as rat rejects hbase/target/rat.txt

Posted by st...@apache.org.
SLIDER-200 double "mvn install" failing as rat rejects hbase/target/rat.txt


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0151b9f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0151b9f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0151b9f5

Branch: refs/heads/develop
Commit: 0151b9f53cdc46e39d80709c8090308f53bbfd3b
Parents: e9ddcf0
Author: Steve Loughran <st...@apache.org>
Authored: Wed Jul 2 13:30:26 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Jul 2 13:30:26 2014 +0100

----------------------------------------------------------------------
 pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0151b9f5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 460fb0d..0076561 100644
--- a/pom.xml
+++ b/pom.xml
@@ -300,6 +300,7 @@
             <exclude>**/httpfs-signature.secret</exclude>
             <exclude>**/dfs.exclude</exclude>
             <exclude>**/*.iml</exclude>
+            <exclude>**/rat.txt</exclude>
             <exclude>DISCLAIMER</exclude>
           </excludes>
         </configuration>