Skip to content

Commit

Permalink
Removed synchronized, Path.getFileSystem is threadsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Oct 24, 2014
1 parent 55514e2 commit e4bee20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private[streaming] object HdfsUtils {
blockLocs.map(_.flatMap(_.getHosts))
}

def getFileSystemForPath(path: Path, conf: Configuration): FileSystem = synchronized {
def getFileSystemForPath(path: Path, conf: Configuration): FileSystem = {
// For local file systems, return the raw loca file system, such calls to flush()
// actually flushes the stream.
val fs = path.getFileSystem(conf)
Expand Down

0 comments on commit e4bee20

Please sign in to comment.