Skip to content

Commit

Permalink
Fixed HdfsUtils to handle append in local file system
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Apr 29, 2015
1 parent 1bc5bc3 commit 5f67a59
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private[streaming] object HdfsUtils {
// If the file exists and we have append support, append instead of creating a new file
val stream: FSDataOutputStream = {
if (dfs.isFile(dfsPath)) {
if (conf.getBoolean("hdfs.append.support", false)) {
if (conf.getBoolean("hdfs.append.support", false) || dfs.isInstanceOf[RawLocalFileSystem]) {
dfs.append(dfsPath)
} else {
throw new IllegalStateException("File exists and there is no append support!")
Expand Down

0 comments on commit 5f67a59

Please sign in to comment.