Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overlapping segments in IngestSegmentFirehose, DatasourceInputFormat #1681

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Aug 28, 2015

Fixes #1678. IngestSegmentFirehose (and its users) need to remember which
windows of which segments should actually be read, based on a timeline.

private List<DataSegment> segments;
private Interval INTERVAL_FULL = new Interval("2014-10-22T00:00:00Z/P1D");
private Interval INTERVAL_PARTIAL = new Interval("2014-10-22T00:00:00Z/PT2H");
private DataSegment SEGMENT;
Copy link
Contributor

Choose a reason for hiding this comment

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

since they are non-static, can we call them intervalFull, intervalPartial and segment ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I was thinking they were static; should they just be static?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, they don't change, we can make everything static as well if you want.. I am fine both ways as it doesn't matter in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, updated them to statics

@fjy
Copy link
Contributor

fjy commented Aug 28, 2015

👍

@gianm gianm force-pushed the ingest-segment-overlapping branch 2 times, most recently from a6148dc to 4094df8 Compare August 28, 2015 04:08
@himanshug himanshug added this to the 0.8.1 milestone Aug 28, 2015
@gianm gianm force-pushed the ingest-segment-overlapping branch from 4094df8 to d8f7c82 Compare August 28, 2015 14:15
…mat.

Fixes apache#1678. IngestSegmentFirehose (and its users) need to remember which
windows of which segments should actually be read, based on a timeline.
@gianm gianm force-pushed the ingest-segment-overlapping branch from d8f7c82 to 414a6fb Compare August 28, 2015 14:32
@himanshug himanshug closed this Aug 28, 2015
@himanshug himanshug reopened this Aug 28, 2015
himanshug added a commit that referenced this pull request Aug 28, 2015
Fix overlapping segments in IngestSegmentFirehose, DatasourceInputFormat
@himanshug himanshug merged commit ceaa49e into apache:master Aug 28, 2015
@gianm
Copy link
Contributor Author

gianm commented Aug 28, 2015

should we backport this for 0.8.1-rc3? (and if so who does that?)

@himanshug
Copy link
Contributor

@gianm yes
@xvrl for backporting into 0.8.1 , is there a automated way that you use to create those backport PRs or authors are individually supposed to just create a new PR with necessary commits?

@drcrallen
Copy link
Contributor

@gianm Backport failed >.< #1690

drcrallen added a commit to metamx/druid that referenced this pull request Aug 31, 2015
fjy added a commit that referenced this pull request Aug 31, 2015
(Backport #1681) Fix overlapping segments in IngestSegmentFirehose, DatasourceInputFormat.
List<DataSegment> segmentsList = segmentLister.getUsedSegmentsForInterval(
ingestionSpecObj.getDataSource(),
ingestionSpecObj.getInterval()
);
datasourcePathSpec.put(segments, segmentsList);
VersionedIntervalTimeline<String, DataSegment> timeline = new VersionedIntervalTimeline<>(Ordering.natural());
Copy link
Contributor

Choose a reason for hiding this comment

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

@gianm , I was wondering why we need to scan the timeline here since the returned segments from segmentLister.getUsedSegmentsForInterval already did that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@guobingkun We also need to know which sections of those segments we should scan. Some segments may only be partially valid due to overshadowing. (you might have a newer hourly granularity segment partially overshadowing an older day granularity segment)

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks!

@gianm gianm deleted the ingest-segment-overlapping branch September 23, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants