Skip to content

Commit

Permalink
Merge pull request #364 from hammerlab/default-parallelism
Browse files Browse the repository at this point in the history
Default to spark parallelism setting
  • Loading branch information
arahuja committed Nov 3, 2015
2 parents 3b6dfde + 6582a18 commit 5704d77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/org/hammerlab/guacamole/DistributedUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ object DistributedUtil extends Logging {
def partitionLociAccordingToArgs[M <: HasReferenceRegion: ClassTag](args: Arguments,
loci: LociSet,
regionRDDs: RDD[M]*): LociMap[Long] = {
val tasks = if (args.parallelism > 0) args.parallelism else regionRDDs(0).partitions.length
val sc = regionRDDs.head.sparkContext
val tasks = if (args.parallelism > 0) args.parallelism else sc.defaultParallelism
if (args.partitioningAccuracy == 0) {
partitionLociUniformly(tasks, loci)
} else {
Expand Down

0 comments on commit 5704d77

Please sign in to comment.