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

Add support for a configurable default segment history period for segmentMetadata queries and GET /datasources/<datasourceName> lookups #1732

Merged
merged 1 commit into from
Sep 16, 2015

Conversation

jon-wei
Copy link
Contributor

@jon-wei jon-wei commented Sep 15, 2015

This is a re-opening of older pull request #1726, addressing the latest comments from @gianm

…mentMetadata queries and GET /datasources/<datasourceName> lookups
@fjy
Copy link
Contributor

fjy commented Sep 15, 2015

👍

this.usingDefaultInterval = true;
} else {
this.usingDefaultInterval = useDefaultInterval == null ? false : useDefaultInterval;
}
Copy link
Member

Choose a reason for hiding this comment

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

I wonder what is the expected behaviour when a user sets both the intervals and userDefaultInterval to true ?
should it throw exception or give priority to useDefaultInterval flag ?

I looks with the current implementation if both are set, it will return results for the interval that spans the configured defaultPeriod period before the end time of the specified interval interval instead of the default interval ?
Is that what is the expected behaviour ?

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO we should not document usingDefaultInterval, its only purpose is to help "remember" that a user did not specify intervals. Without something like that it's hard to remember, since the querySegmentSpec needs to be filled in with DEFAULT_INTERVAL to allow the later filtering to work.

So I think if a user specifies "usingDefaultInterval" directly that is their own problem and we don't need to provide any particular behavior :)

@gianm
Copy link
Contributor

gianm commented Sep 16, 2015

lgtm with the additional changes

gianm added a commit that referenced this pull request Sep 16, 2015
Add support for a configurable default segment history period for segmentMetadata queries and GET /datasources/<datasourceName> lookups
@gianm gianm merged commit 9705c51 into apache:master Sep 16, 2015
@jon-wei jon-wei deleted the segmentmeta branch September 22, 2015 23:54
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.

4 participants