Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5645#discussion_r29029244
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/rdd/WriteAheadLogBackedBlockRDD.scala
 ---
    @@ -96,9 +99,27 @@ class WriteAheadLogBackedBlockRDD[T: ClassTag](
             logDebug(s"Read partition data of $this from block manager, block 
$blockId")
             iterator
           case None => // Data not found in Block Manager, grab it from write 
ahead log file
    -        val reader = new WriteAheadLogRandomReader(partition.segment.path, 
hadoopConf)
    -        val dataRead = reader.read(partition.segment)
    -        reader.close()
    +        var dataRead: ByteBuffer = null
    +        var writeAheadLog: WriteAheadLog = null
    +        try {
    +          val dummyDirectory = FileUtils.getTempDirectoryPath()
    +          writeAheadLog = WriteAheadLogUtils.createLogForReceiver(
    +            SparkEnv.get.conf, dummyDirectory, hadoopConf)
    --- End diff --
    
    hadoopConf is always available through the SparkContext. Irrespective of 
whether Hadoop file system is used, a Hadoop conf is created by the 
SparkContext which is passed on to this location. If the WAL is not the default 
FileBasedWAL, then this parameter is just ignored (see the method 
`WriteAheadLogUtils.createLogForReceiver`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to