Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/5645#discussion_r29374751
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/rdd/WriteAheadLogBackedBlockRDD.scala
---
@@ -111,14 +140,20 @@ class WriteAheadLogBackedBlockRDD[T: ClassTag](
/**
* Get the preferred location of the partition. This returns the
locations of the block
- * if it is present in the block manager, else it returns the location
of the
- * corresponding segment in HDFS.
+ * if it is present in the block manager, else if
FileBasedWriteAheadLogSegment is used,
+ * it returns the location of the corresponding file segment in HDFS .
*/
override def getPreferredLocations(split: Partition): Seq[String] = {
val partition =
split.asInstanceOf[WriteAheadLogBackedBlockRDDPartition]
val blockLocations = getBlockIdLocations().get(partition.blockId)
- blockLocations.getOrElse(
- HdfsUtils.getFileSegmentLocations(
- partition.segment.path, partition.segment.offset,
partition.segment.length, hadoopConfig))
+ blockLocations.getOrElse {
--- End diff --
That's a good point. I wasnt super sure of whether it is a good idea to
have it in the interface in this version. We can add it later and maintain
binary compatibility as the RecordHandle is an abstract class. Also It is still
a developer API s. For now, I am going to merge this in to unblock #5732 .
---
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]