spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsxwing <...@git.apache.org>
Subject [GitHub] spark pull request #14553: [SPARK-16963] [STREAMING] [SQL] Changes to Source...
Date Tue, 13 Sep 2016 21:01:13 GMT
Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14553#discussion_r78643399
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Source.scala
---
    @@ -30,16 +30,37 @@ trait Source  {
       /** Returns the schema of the data from this source */
       def schema: StructType
     
    -  /** Returns the maximum available offset for this source. */
    +  /**
    +   * Returns the highest offset that this source has <b>removed</b> from
its internal buffer
    +   * in response to a call to `commit`.
    +   * Returns `None` if this source has not removed any data.
    +   */
    +  def lastCommittedOffset: Option[Offset] = (None)
    +
    +  /**
    +   * Returns the maximum available offset for this source.
    +   * Returns `None` if this source has never received any data.
    +   */
       def getOffset: Option[Offset]
     
       /**
    -   * Returns the data that is between the offsets (`start`, `end`]. When `start` is `None`
then
    -   * the batch should begin with the first available record. This method must always
return the
    -   * same data for a particular `start` and `end` pair.
    +   * Returns the data that is between the offsets (`start`, `end`]. When `start` is `None`,
    +   * then the batch should begin with the first record. This method must always return
the
    +   * same data for a particular `start` and `end` pair; even after the Source has been
restarted
    +   * on a different node.
    +   * <p>
    --- End diff --
    
    nit: not need `<p>` in scaladoc


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message