Skip to content

Commit 5f67a59

Browse files
committed
Fixed HdfsUtils to handle append in local file system
1 parent 1bc5bc3 commit 5f67a59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

streaming/src/main/scala/org/apache/spark/streaming/util/HdfsUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private[streaming] object HdfsUtils {
2727
// If the file exists and we have append support, append instead of creating a new file
2828
val stream: FSDataOutputStream = {
2929
if (dfs.isFile(dfsPath)) {
30-
if (conf.getBoolean("hdfs.append.support", false)) {
30+
if (conf.getBoolean("hdfs.append.support", false) || dfs.isInstanceOf[RawLocalFileSystem]) {
3131
dfs.append(dfsPath)
3232
} else {
3333
throw new IllegalStateException("File exists and there is no append support!")

0 commit comments

Comments
 (0)