aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSean Owen <sowen@cloudera.com>2014-12-21 13:16:57 -0800
committerJosh Rosen <joshrosen@databricks.com>2014-12-21 13:16:57 -0800
commitc6a3c0d5052e5bf6f981e5f91e05cba38b707237 (patch)
tree077eacd1cca080325c82ef9f3dbcaee394d9b3d1 /core
parenta764960b3b6d842eef7fa4777c8fa99d3f60fa1e (diff)
downloadspark-c6a3c0d5052e5bf6f981e5f91e05cba38b707237.tar.gz
spark-c6a3c0d5052e5bf6f981e5f91e05cba38b707237.tar.bz2
spark-c6a3c0d5052e5bf6f981e5f91e05cba38b707237.zip
SPARK-4910 [CORE] build failed (use of FileStatus.isFile in Hadoop 1.x)
Fix small Hadoop 1 compile error from SPARK-2261. In Hadoop 1.x, all we have is FileStatus.isDir, so these "is file" assertions are changed to "is not a dir". This is how similar checks are done so far in the code base. Author: Sean Owen <sowen@cloudera.com> Closes #3754 from srowen/SPARK-4910 and squashes the following commits: 52c5e4e [Sean Owen] Fix small Hadoop 1 compile error from SPARK-2261
Diffstat (limited to 'core')
-rw-r--r--core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala4
-rw-r--r--core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
index 5909811c20..1de7e13003 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
@@ -65,11 +65,11 @@ class EventLoggingListenerSuite extends FunSuite with BeforeAndAfter with Loggin
val logPath = new Path(eventLogger.logPath + EventLoggingListener.IN_PROGRESS)
assert(fileSystem.exists(logPath))
val logStatus = fileSystem.getFileStatus(logPath)
- assert(logStatus.isFile)
+ assert(!logStatus.isDir)
// Verify log is renamed after stop()
eventLogger.stop()
- assert(fileSystem.getFileStatus(new Path(eventLogger.logPath)).isFile())
+ assert(!fileSystem.getFileStatus(new Path(eventLogger.logPath)).isDir)
}
test("Basic event logging") {
diff --git a/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala
index 7e635cb061..7e360cc608 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala
@@ -112,7 +112,7 @@ class ReplayListenerSuite extends FunSuite with BeforeAndAfter {
val applications = fileSystem.listStatus(logDirPath)
assert(applications != null && applications.size > 0)
val eventLog = applications.sortBy(_.getModificationTime).last
- assert(eventLog.isFile)
+ assert(!eventLog.isDir)
// Replay events
val (logData, version) = EventLoggingListener.openEventLog(eventLog.getPath(), fileSystem)