Skip to content

Commit 6f34131

Browse files
sryzapwendell
authored andcommitted
SPARK-5492. Thread statistics can break with older Hadoop versions
Author: Sandy Ryza <sandy@cloudera.com> Closes #4305 from sryza/sandy-spark-5492 and squashes the following commits: b7d4497 [Sandy Ryza] SPARK-5492. Thread statistics can break with older Hadoop versions
1 parent 63dfe21 commit 6f34131

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class SparkHadoopUtil extends Logging {
141141
val baselineBytesRead = f()
142142
Some(() => f() - baselineBytesRead)
143143
} catch {
144-
case e: NoSuchMethodException => {
144+
case e @ (_: NoSuchMethodException | _: ClassNotFoundException) => {
145145
logDebug("Couldn't find method for retrieving thread-level FileSystem input data", e)
146146
None
147147
}
@@ -163,7 +163,7 @@ class SparkHadoopUtil extends Logging {
163163
val baselineBytesWritten = f()
164164
Some(() => f() - baselineBytesWritten)
165165
} catch {
166-
case e: NoSuchMethodException => {
166+
case e @ (_: NoSuchMethodException | _: ClassNotFoundException) => {
167167
logDebug("Couldn't find method for retrieving thread-level FileSystem output data", e)
168168
None
169169
}

0 commit comments

Comments
 (0)