Skip to content

Commit

Permalink
Move CommitDeniedException to executors package; remove `@DeveloperAP…
Browse files Browse the repository at this point in the history
…I` annotation.
  • Loading branch information
JoshRosen committed Feb 3, 2015
1 parent c79df98 commit dd00b7c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions core/src/main/scala/org/apache/spark/SparkEnv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ package org.apache.spark
import java.io.File
import java.net.Socket

import org.apache.spark.scheduler.OutputCommitCoordinator.OutputCommitCoordinatorActor

import scala.collection.JavaConversions._
import scala.collection.mutable
import scala.util.Properties
Expand All @@ -37,6 +35,7 @@ import org.apache.spark.network.BlockTransferService
import org.apache.spark.network.netty.NettyBlockTransferService
import org.apache.spark.network.nio.NioBlockTransferService
import org.apache.spark.scheduler.{OutputCommitCoordinator, LiveListenerBus}
import org.apache.spark.scheduler.OutputCommitCoordinator.OutputCommitCoordinatorActor
import org.apache.spark.serializer.Serializer
import org.apache.spark.shuffle.{ShuffleMemoryManager, ShuffleManager}
import org.apache.spark.storage._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import org.apache.hadoop.mapred._
import org.apache.hadoop.fs.FileSystem
import org.apache.hadoop.fs.Path

import org.apache.spark.executor.CommitDeniedException
import org.apache.spark.mapred.SparkHadoopMapRedUtil
import org.apache.spark.rdd.HadoopRDD
import org.apache.spark.util.AkkaUtils

/**
* Internal helper class that saves an RDD using a Hadoop OutputFormat.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@
* limitations under the License.
*/

package org.apache.spark
package org.apache.spark.executor

import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.{TaskCommitDenied, TaskEndReason}

/**
* :: DeveloperApi ::
* Exception thrown when a task attempts to commit output to Hadoop, but
* is denied by the driver.
*/
@DeveloperApi
class CommitDeniedException(msg: String, jobID: Int, splitID: Int, attemptID: Int)
class CommitDeniedException(
msg: String,
jobID: Int,
splitID: Int,
attemptID: Int)
extends Exception(msg) {
def toTaskEndReason(): TaskEndReason = new TaskCommitDenied(jobID, splitID, attemptID)

def toTaskEndReason: TaskEndReason = new TaskCommitDenied(jobID, splitID, attemptID)

}

0 comments on commit dd00b7c

Please sign in to comment.