Skip to content

Throw away rows with timestamps beyond long bounds in kafka indexing#5215

Merged
himanshug merged 2 commits intoapache:masterfrom
jon-wei:kafka_ts_fix
Jan 8, 2018
Merged

Throw away rows with timestamps beyond long bounds in kafka indexing#5215
himanshug merged 2 commits intoapache:masterfrom
jon-wei:kafka_ts_fix

Conversation

@jon-wei
Copy link
Copy Markdown
Contributor

@jon-wei jon-wei commented Jan 4, 2018

Fixes #4485

&& ioConfig.getMaximumMessageTime().get().isBefore(row.getTimestamp());

if (!Intervals.ETERNITY.contains(row.getTimestamp())) {
log.error("Encountered row with timestamp that cannot be represented as a long: [%s]", row);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably emits too many logs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this to log.debug instead

if (!Intervals.ETERNITY.contains(row.getTimestamp())) {
log.error("Encountered row with timestamp that cannot be represented as a long: [%s]", row);
return false;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about reporting it as ParseException in case user has set reportParseExceptions to true ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this to throw a ParseException if reportParseExceptions is true

@himanshug himanshug merged commit cdd374a into apache:master Jan 8, 2018
jon-wei added a commit to jon-wei/druid that referenced this pull request Jan 8, 2018
…pache#5215)

* Throw away rows with timestamps beyond long bounds in kafka indexing

* PR comments
jon-wei added a commit that referenced this pull request Jan 9, 2018
…5215) (#5232)

* Throw away rows with timestamps beyond long bounds in kafka indexing

* PR comments
seoeun25 added a commit to seoeun25/incubator-druid that referenced this pull request Jan 10, 2020
* Kafka Index Task that supports Incremental handoffs apache#4815

* prevent NPE from supressing actual exception (apache#5146)

* prevent npe on mismatch between number of kafka partitions and task count (apache#5139)

* Throw away rows with timestamps beyond long bounds in kafka indexing (apache#5215) (apache#5232)

* Fix state check bug in Kafka Index Task (apache#5204) (apache#5248)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants