diff --git a/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java index b98b30928..0c6560e31 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java @@ -65,7 +65,7 @@ public class HierarchicalMicroScheduler extends MicroScheduler implements Reduce throw new UnsupportedOperationException("Traversal engine supports only traverse loci by reference at this time."); } - public void execute( Walker walker, List intervals ) { + public Object execute( Walker walker, List intervals ) { // Fast fail for walkers not supporting TreeReducible interface. if( !(walker instanceof TreeReducible) ) throw new IllegalArgumentException("Hierarchical microscheduler only works with TreeReducible walkers"); @@ -110,6 +110,8 @@ public class HierarchicalMicroScheduler extends MicroScheduler implements Reduce traversalEngine.printOnTraversalDone(result); walker.onTraversalDone(result); + + return result; } /** diff --git a/java/src/org/broadinstitute/sting/gatk/executive/LinearMicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/LinearMicroScheduler.java index 3c12d2b57..8da7618c0 100644 --- a/java/src/org/broadinstitute/sting/gatk/executive/LinearMicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/LinearMicroScheduler.java @@ -30,7 +30,7 @@ public class LinearMicroScheduler extends MicroScheduler { * @param walker Computation to perform over dataset. * @param locations Subset of the dataset over which to walk. */ - public void execute(Walker walker, List locations) { + public Object execute(Walker walker, List locations) { ShardStrategy shardStrategy = getShardStrategy(reference, locations); walker.initialize(); @@ -45,6 +45,8 @@ public class LinearMicroScheduler extends MicroScheduler { traversalEngine.printOnTraversalDone(accumulator); walker.onTraversalDone(accumulator); + + return accumulator; } diff --git a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java index f76f6d859..55b9b540b 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java @@ -91,8 +91,9 @@ public abstract class MicroScheduler { * Walks a walker over the given list of intervals. * @param walker Computation to perform over dataset. * @param intervals A list of intervals over which to walk. Null for whole dataset. + * @return the return type of the walker */ - public abstract void execute( Walker walker, List intervals); + public abstract Object execute( Walker walker, List intervals); /** * Get the sharding strategy given a driving data source.