You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/06/04 00:11:06 UTC

spark git commit: [HOTFIX] Fix Hadoop-1 build caused by #5792.

Repository: spark
Updated Branches:
  refs/heads/master f27134782 -> a8f1f1543


[HOTFIX] Fix Hadoop-1 build caused by #5792.

Replaced `fs.listFiles` with Hadoop-1 friendly `fs.listStatus` method.

Author: Hari Shreedharan <hs...@apache.org>

Closes #6619 from harishreedharan/evetlog-hadoop-1-fix and squashes the following commits:

6192078 [Hari Shreedharan] [HOTFIX] Fix Hadoop-1 build caused by #5972.


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

Branch: refs/heads/master
Commit: a8f1f1543e29fb2897e9ae6940581b9e4a3a13fb
Parents: f271347
Author: Hari Shreedharan <hs...@apache.org>
Authored: Wed Jun 3 15:11:02 2015 -0700
Committer: Andrew Or <an...@databricks.com>
Committed: Wed Jun 3 15:11:02 2015 -0700

----------------------------------------------------------------------
 .../org/apache/spark/deploy/history/FsHistoryProvider.scala  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a8f1f154/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
index 52b149b..5427a88 100644
--- a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
@@ -255,12 +255,12 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
             // If this is a legacy directory, then add the directory to the zipStream and add
             // each file to that directory.
             if (isLegacyLogDirectory(fs.getFileStatus(logPath))) {
-              val files = fs.listFiles(logPath, false)
+              val files = fs.listStatus(logPath)
               zipStream.putNextEntry(new ZipEntry(attempt.logPath + "/"))
               zipStream.closeEntry()
-              while (files.hasNext) {
-                val file = files.next().getPath
-                zipFileToStream(file, attempt.logPath + Path.SEPARATOR + file.getName, zipStream)
+              files.foreach { file =>
+                val path = file.getPath
+                zipFileToStream(path, attempt.logPath + Path.SEPARATOR + path.getName, zipStream)
               }
             } else {
               zipFileToStream(new Path(logDir, attempt.logPath), attempt.logPath, zipStream)


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