-
Notifications
You must be signed in to change notification settings - Fork 589
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
NMS-17066: Fix Measurement TrendLine #7597
base: develop
Are you sure you want to change the base?
Conversation
TrendLine was nnot able to parse Long Term measument data because was not able to manage Double.NaN. Added unit test with real data fetched
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, just need to update copyright headers.
@@ -0,0 +1,95 @@ | |||
/******************************************************************************* | |||
* This file is part of OpenNMS(R). |
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.
copyright headers can be updated to new header that is independent of year.
see copyright header on TrendLine.java
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.
Minor formatting changes. Headers must also be altered.
for (long i = limits.firstRowWithValues; i < limits.lastRowWithValues; i++) { | ||
obs.add(table.get(i, TIMESTAMP_COLUMN_NAME), table.get(i, m_inputColumn)); | ||
for (long i = limits.firstRowWithValues; i <= limits.lastRowWithValues; i++) { | ||
Double value = table.get(i,m_inputColumn); |
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.
Double value = table.get(i,m_inputColumn); | |
Double value = table.get(i, m_inputColumn); |
@@ -124,5 +120,7 @@ public void filter(RowSortedTable<Long, String, Double> table) throws RScriptExc | |||
// Compute the value | |||
table.put(i, m_outputColumn, polynomialFunction.value(timestamp)); | |||
} | |||
LOG.debug("filter: values:\n{}", table.rowMap().values()); | |||
|
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.
TrendLine was nnot able to parse Long Term measument data because was not able to manage Double.NaN.
Added unit test with real data fetched