-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 EIGHT_HOUR into possible list of Granularities. #12717
Conversation
I think you do not need this change to achieve what you are trying to do. Have you tried using period granularities - https://druid.apache.org/docs/latest/querying/granularities.html#period-granularities
|
@suneet-s But isn’t it only available during query time? |
@didip , you can use it for segment granularity too during ingestion. |
Created issue to improve these docs: #12726 |
Thanks for providing screenshots @kfaraz! I got to those docs about segmentGranularity by navigating from https://druid.apache.org/docs/latest/ingestion/compaction.html#compaction-granularity-spec so I think the compaction docs on their own are pretty informative. |
There is one reason we do need to add new explicit granularities. Currently, allocation logic (for streaming ingest tasks, and batch tasks in append mode) can only work properly with segments that are predefined granularities. The reason is they use Anyone got some time to look into the allocation thing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, after CI passes and if we don't end up adjusting allocation logic to make this unnecessary. (If we do adjust the logic, then as others have pointed out, this could be done by using a Period-based granularity for segmentGranularity
.)
@gianm looks like the Travis error is unrelated. |
Description
We have a situation where our upstream mixed up PST vs UTC, but luckily the difference is always 8 hours (not taking into account Daylight Savings Time). And in a heterogeneous environment, sometimes you don't have control over the upstream setup.
Because of this, one of our ingestion always spans 2 days: today+8hours - tomorrow+8hours.
In this situation, we cannot use the following
segmentGranularities
:DAY
orSIX_HOUR
.Without this patch, we are forced to use
segmentGranularities: HOUR
, which is un-optimal.EIGHT_HOUR
is the next best thing we can have.Key changed/added classes in this PR
Granularities
GranularityType
This PR has: