crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzo...@apache.org
Subject [1/2] git commit: CRUNCH-185 - Make the MemPipeline#done return a PipelineResult with the Counters inside. Clear the clearCounters() and make the runAsynch() response consistent with run/done
Date Wed, 27 Mar 2013 09:15:46 GMT
Updated Branches:
  refs/heads/master b34c2f22f -> 4683a8d49


CRUNCH-185 - Make the MemPipeline#done return a PipelineResult with the Counters inside. Clear
the clearCounters() and make the runAsynch() response consistent with run/done

Signed-off-by: tzolov <tzolov@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/4683a8d4
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/4683a8d4
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/4683a8d4

Branch: refs/heads/master
Commit: 4683a8d4993ae13565de50273fec88edd759d9bf
Parents: 241b86d
Author: tzolov <tzolov@apache.org>
Authored: Wed Mar 27 01:42:26 2013 +0100
Committer: tzolov <tzolov@apache.org>
Committed: Wed Mar 27 09:26:44 2013 +0100

----------------------------------------------------------------------
 .../org/apache/crunch/impl/mem/MemPipeline.java    |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/4683a8d4/crunch/src/main/java/org/apache/crunch/impl/mem/MemPipeline.java
----------------------------------------------------------------------
diff --git a/crunch/src/main/java/org/apache/crunch/impl/mem/MemPipeline.java b/crunch/src/main/java/org/apache/crunch/impl/mem/MemPipeline.java
index af5f122..272b2af 100644
--- a/crunch/src/main/java/org/apache/crunch/impl/mem/MemPipeline.java
+++ b/crunch/src/main/java/org/apache/crunch/impl/mem/MemPipeline.java
@@ -51,8 +51,6 @@ import org.apache.hadoop.mapreduce.Counters;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
 
 public class MemPipeline implements Pipeline {
 
@@ -66,8 +64,8 @@ public class MemPipeline implements Pipeline {
     return COUNTERS;
   }
   
-  public static Counters clearCounters() {
-    return COUNTERS = new Counters();
+  public static void clearCounters() {
+    COUNTERS = new Counters();
   }
 
   public static Pipeline getInstance() {
@@ -222,7 +220,6 @@ public class MemPipeline implements Pipeline {
   @Override
   public PipelineExecution runAsync() {
     activeTargets.clear();
-    final ListenableFuture<PipelineResult> lf = Futures.immediateFuture(PipelineResult.EMPTY);
     return new PipelineExecution() {
       @Override
       public String getPlanDotFile() {
@@ -246,7 +243,7 @@ public class MemPipeline implements Pipeline {
 
       @Override
       public PipelineResult getResult() {
-        return PipelineResult.EMPTY;
+        return new PipelineResult(ImmutableList.of(new PipelineResult.StageResult("MemPipelineStage",
COUNTERS)));
       }
 
       @Override


Mime
View raw message