Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/895#discussion_r13468161
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -862,6 +862,52 @@ private[spark] object Utils extends Logging {
Source.fromBytes(buff).mkString
}
+ def offsetBytes(files: Seq[File], startIndex: Long, endIndex: Long):
String = {
--- End diff --
It might be good to sanitize the inputs first. I.e. to check that the
endindex is less than the total number of files. Also, one sort of weird thing
now is that if a file gets rolled, I could have something where I reload the
exact same page (e.g. with the offset) and I actually get a new file segment. I
suppose that's unavoidable though.
---
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.
---