Skip to content

Commit

Permalink
Add the logWarn when catch the exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlyn committed Jan 6, 2015
1 parent fe4427a commit d4a5b9a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ import scala.reflect.ClassTag
import scala.collection.mutable.ListBuffer

import org.apache.hadoop.conf.{Configurable, Configuration}
import org.apache.hadoop.mapred._
import org.apache.hadoop.mapred.FileSplit
import org.apache.hadoop.mapred.InputFormat
import org.apache.hadoop.mapred.InputSplit
import org.apache.hadoop.mapred.JobConf
import org.apache.hadoop.mapred.RecordReader
import org.apache.hadoop.mapred.Reporter
import org.apache.hadoop.mapred.JobID
import org.apache.hadoop.mapred.TaskAttemptID
import org.apache.hadoop.mapred.TaskID
import org.apache.hadoop.mapred.InvalidInputException
import org.apache.hadoop.util.ReflectionUtils

import org.apache.spark._
Expand Down Expand Up @@ -200,6 +209,7 @@ class HadoopRDD[K, V](
array
} catch {
case e: InvalidInputException => {
logWarning("InvalidInput!", e)
new Array[Partition](0)
}
}
Expand Down

0 comments on commit d4a5b9a

Please sign in to comment.