2013-07-16 20:21:33 -04:00
|
|
|
/*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership.
|
|
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
* (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2011-05-20 03:19:53 -04:00
|
|
|
package spark
|
|
|
|
|
2013-04-24 17:52:49 -04:00
|
|
|
import spark.executor.TaskMetrics
|
|
|
|
import spark.serializer.Serializer
|
|
|
|
|
2013-02-05 13:14:00 -05:00
|
|
|
|
2012-10-02 22:00:19 -04:00
|
|
|
private[spark] abstract class ShuffleFetcher {
|
2012-10-08 20:29:33 -04:00
|
|
|
/**
|
|
|
|
* Fetch the shuffle outputs for a given ShuffleDependency.
|
|
|
|
* @return An iterator over the elements of the fetched shuffle outputs.
|
|
|
|
*/
|
2013-04-24 17:52:49 -04:00
|
|
|
def fetch[K, V](shuffleId: Int, reduceId: Int, metrics: TaskMetrics,
|
2013-05-03 04:02:16 -04:00
|
|
|
serializer: Serializer = SparkEnv.get.serializerManager.default): Iterator[(K,V)]
|
2011-05-20 03:19:53 -04:00
|
|
|
|
2012-10-08 20:29:33 -04:00
|
|
|
/** Stop the fetcher */
|
2011-07-09 17:25:56 -04:00
|
|
|
def stop() {}
|
2011-05-20 03:19:53 -04:00
|
|
|
}
|