Skip to content
Snippets Groups Projects
Commit 94f05683 authored by Ismael Juma's avatar Ismael Juma
Browse files

Replace deprecated `first` with `head`.

parent 26000af4
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ class CoGroupAggregator extends Aggregator[Any, Any, ArrayBuffer[Any]] ( ...@@ -26,7 +26,7 @@ class CoGroupAggregator extends Aggregator[Any, Any, ArrayBuffer[Any]] (
) )
class CoGroupedRDD[K](rdds: Seq[RDD[(_, _)]], part: Partitioner) class CoGroupedRDD[K](rdds: Seq[RDD[(_, _)]], part: Partitioner)
extends RDD[(K, Seq[Seq[_]])](rdds.first.context) with Logging { extends RDD[(K, Seq[Seq[_]])](rdds.head.context) with Logging {
val aggr = new CoGroupAggregator val aggr = new CoGroupAggregator
override val dependencies = { override val dependencies = {
...@@ -45,7 +45,7 @@ extends RDD[(K, Seq[Seq[_]])](rdds.first.context) with Logging { ...@@ -45,7 +45,7 @@ extends RDD[(K, Seq[Seq[_]])](rdds.first.context) with Logging {
} }
@transient val splits_ : Array[Split] = { @transient val splits_ : Array[Split] = {
val firstRdd = rdds.first val firstRdd = rdds.head
val array = new Array[Split](part.numPartitions) val array = new Array[Split](part.numPartitions)
for (i <- 0 until array.size) { for (i <- 0 until array.size) {
array(i) = new CoGroupSplit(i, rdds.zipWithIndex.map { case (r, j) => array(i) = new CoGroupSplit(i, rdds.zipWithIndex.map { case (r, j) =>
......
...@@ -237,7 +237,7 @@ private trait DAGScheduler extends Scheduler with Logging { ...@@ -237,7 +237,7 @@ private trait DAGScheduler extends Scheduler with Logging {
if (stage.shuffleDep != None) { if (stage.shuffleDep != None) {
mapOutputTracker.registerMapOutputs( mapOutputTracker.registerMapOutputs(
stage.shuffleDep.get.shuffleId, stage.shuffleDep.get.shuffleId,
stage.outputLocs.map(_.first).toArray) stage.outputLocs.map(_.head).toArray)
} }
updateCacheLocs() updateCacheLocs()
val newlyRunnable = new ArrayBuffer[Stage] val newlyRunnable = new ArrayBuffer[Stage]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment