Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ private[spark] class FileAppender(inputStream: InputStream, file: File, bufferSi
extends Logging {
@volatile private var outputStream: FileOutputStream = null
@volatile private var markedForStop = false // has the appender been asked to stopped
@volatile private var stopped = false // has the appender stopped

// Thread that reads the input stream and writes to file
private val writingThread = new Thread("File appending thread for " + file) {
Expand All @@ -47,11 +46,7 @@ private[spark] class FileAppender(inputStream: InputStream, file: File, bufferSi
* or because of any error in appending
*/
def awaitTermination() {
synchronized {
if (!stopped) {
wait()
}
}
writingThread.join()
}

/** Stop the appender */
Expand All @@ -77,10 +72,6 @@ private[spark] class FileAppender(inputStream: InputStream, file: File, bufferSi
logError(s"Error writing stream to file $file", e)
} finally {
closeFile()
synchronized {
stopped = true
notifyAll()
}
}
}

Expand Down