Skip to content

Commit

Permalink
SPARK-5492. Thread statistics can break with older Hadoop versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza committed Feb 2, 2015
1 parent e643de4 commit b7d4497
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class SparkHadoopUtil extends Logging {
val baselineBytesRead = f()
Some(() => f() - baselineBytesRead)
} catch {
case e: NoSuchMethodException => {
case e @ (_: NoSuchMethodException | _: ClassNotFoundException) => {
logDebug("Couldn't find method for retrieving thread-level FileSystem input data", e)
None
}
Expand All @@ -163,7 +163,7 @@ class SparkHadoopUtil extends Logging {
val baselineBytesWritten = f()
Some(() => f() - baselineBytesWritten)
} catch {
case e: NoSuchMethodException => {
case e @ (_: NoSuchMethodException | _: ClassNotFoundException) => {
logDebug("Couldn't find method for retrieving thread-level FileSystem output data", e)
None
}
Expand Down

0 comments on commit b7d4497

Please sign in to comment.