Repository: spark
Updated Branches:
  refs/heads/master a764960b3 -> c6a3c0d50


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 <so...@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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c6a3c0d5
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c6a3c0d5
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c6a3c0d5

Branch: refs/heads/master
Commit: c6a3c0d5052e5bf6f981e5f91e05cba38b707237
Parents: a764960
Author: Sean Owen <so...@cloudera.com>
Authored: Sun Dec 21 13:16:57 2014 -0800
Committer: Josh Rosen <joshro...@databricks.com>
Committed: Sun Dec 21 13:16:57 2014 -0800

----------------------------------------------------------------------
 .../org/apache/spark/scheduler/EventLoggingListenerSuite.scala   | 4 ++--
 .../scala/org/apache/spark/scheduler/ReplayListenerSuite.scala   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c6a3c0d5/core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
----------------------------------------------------------------------
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 5909811..1de7e13 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") {

http://git-wip-us.apache.org/repos/asf/spark/blob/c6a3c0d5/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala
----------------------------------------------------------------------
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 7e635cb..7e360cc 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)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to