Skip to content

Commit e4bee20

Browse files
committed
Removed synchronized, Path.getFileSystem is threadsafe
1 parent 55514e2 commit e4bee20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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
@@ -60,7 +60,7 @@ private[streaming] object HdfsUtils {
6060
blockLocs.map(_.flatMap(_.getHosts))
6161
}
6262

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

0 commit comments

Comments
 (0)