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

NMS-17066: Fix Measurement TrendLine #7597

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rssntn67
Copy link
Contributor

@rssntn67 rssntn67 commented Jan 17, 2025

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

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
@cgorantla cgorantla changed the title Fix Measurement TrendLine NMS-17066: Fix Measurement TrendLine Jan 22, 2025
Copy link
Contributor

@cgorantla cgorantla left a 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).
Copy link
Contributor

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

Copy link
Contributor

@christianpape christianpape left a 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);
Copy link
Contributor

@christianpape christianpape Jan 23, 2025

Choose a reason for hiding this comment

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

Suggested change
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());

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

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.

3 participants