Add more columns for uppervalid alerts #785
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: Please create an issue first before opening a Pull Request.
Linked to issue(s): Closes #778
What changes were proposed in this pull request?
In this PR, we add necessary columns to reconstruct apparent magnitude for
uppervalid
alerts.We also optimise the way we push data to HBase by reducing the number of elements to push (require
fink-utils>=0.13.11
). Basically, we were pushing before all the history, no matter the history was unchanged from the point of view ofuppervalid
orupper
. This was leading to redundant write night after night, and it was putting a lot of load in the database when writing million of elements unnecessarily.Now the strategy is different. We first look in the history if the last element is
uppervalid
orupper
, and only in this case, we push the history in the database. We could further optimise by looking at the corresponding history, and selecting only latest elements (by opposition to all elements), but this would complexify too much the analysis for a very moderate gain.Here are some numbers for one night (
2024/01/04
, 237,104 alerts):uppervalid
upper
Conclusion
The number of elements to push for
uppervalid
is drastically smaller! This is why, we can afford more columns now. Forupper
, this number does not decrease much, because (1) the stream contains a lot of new objects each night (history full of upper limits), and (2) there are a lot of upper limits in between two valid measurements (this is probably where a more complex analysis would reduce the number of write -- but that's for later, maybe).How was this patch tested?
Cloud & CI