kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: improve JavaDocs for TimestampExtractor interface
Date Thu, 08 Jun 2017 04:00:25 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.11.0 e692a8455 -> 4f6895e80


MINOR: improve JavaDocs for TimestampExtractor interface

Author: Matthias J. Sax <matthias@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #3264 from mjsax/minor-javadocs-timestamp-extractor

(cherry picked from commit 3de2d296e9fec89631b6521ed488263dca5808a9)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/4f6895e8
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4f6895e8
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4f6895e8

Branch: refs/heads/0.11.0
Commit: 4f6895e80e1983aa9ea2d33436247ddcd1a89139
Parents: e692a84
Author: Matthias J. Sax <matthias@confluent.io>
Authored: Wed Jun 7 21:00:13 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Jun 7 21:00:22 2017 -0700

----------------------------------------------------------------------
 .../kafka/streams/processor/TimestampExtractor.java       | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/4f6895e8/streams/src/main/java/org/apache/kafka/streams/processor/TimestampExtractor.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/TimestampExtractor.java
b/streams/src/main/java/org/apache/kafka/streams/processor/TimestampExtractor.java
index bdd4403..0780dc0 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/TimestampExtractor.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/TimestampExtractor.java
@@ -30,12 +30,18 @@ public interface TimestampExtractor {
     /**
      * Extracts a timestamp from a record. The timestamp must be positive to be considered
a valid timestamp.
      * Returning a negative timestamp will cause the record not to be processed but rather
silently skipped.
+     * In case the record contains a negative timestamp and this is considered a fatal error
for the application,
+     * throwing a {@link RuntimeException} instead of returning the timestamp is a valid
option too.
+     * For this case, Streams will stop processing and shut down to allow you investigate
in the root cause of the
+     * negative timestamp.
+     * <p>
      * The timestamp extractor implementation must be stateless.
      * <p>
      * The extracted timestamp MUST represent the milliseconds since midnight, January 1,
1970 UTC.
      * <p>
-     * It is important to note that this timestamp may become the message timestamp for any
messages sent to changelogs updated by {@link KTable}s
-     * and joins. The message timestamp is used for log retention and log rolling, so using
nonsensical values may result in
+     * It is important to note that this timestamp may become the message timestamp for any
messages sent to changelogs
+     * updated by {@link KTable}s and joins.
+     * The message timestamp is used for log retention and log rolling, so using nonsensical
values may result in
      * excessive log rolling and therefore broker performance degradation.
      *
      *


Mime
View raw message