Skip to content

Commit

Permalink
[HOTFIX] Fix Hadoop-1 build caused by #5972.
Browse files Browse the repository at this point in the history
  • Loading branch information
harishreedharan committed Jun 3, 2015
1 parent 708c63b commit 6192078
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6192078

Please sign in to comment.