Refactored ServersView class into several classes#6344
Open
dlmarion wants to merge 2 commits intoapache:mainfrom
Open
Refactored ServersView class into several classes#6344dlmarion wants to merge 2 commits intoapache:mainfrom
dlmarion wants to merge 2 commits intoapache:mainfrom
Conversation
This change refactors the ServersView class into several classes to make it easier to read and understand. The ColumnFactory interface and implementations, and the Status class, were moved into their own files. The ServersView object was renamed to TableData as it represents a generic DTO object that is comprised of a list of columns and the corresponding metric data for those columns. The logic for creating the TableData objects was moved into the new TableDataFactory class. Closes apache#6341
keith-turner
approved these changes
Apr 28, 2026
| boolean hasMetricData = hasMetricData(metricResponse); | ||
| Map<String,List<FMetric>> serverMetrics = | ||
| hasMetricData ? metricValuesByName(metricResponse) : Map.of(); | ||
| hasMetricData ? TableDataFactory.metricValuesByName(metricResponse) : Map.of(); |
Contributor
There was a problem hiding this comment.
Seems like TableDataFactory. could be dropped.
Contributor
Author
There was a problem hiding this comment.
Good catch, that was left over from some refactoring. Removed in 8326bf1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change refactors the ServersView class into
several classes to make it easier to read and
understand. The ColumnFactory interface and
implementations, and the Status class, were moved
into their own files. The ServersView object
was renamed to TableData as it represents a
generic DTO object that is comprised of a
list of columns and the corresponding metric
data for those columns. The logic for creating
the TableData objects was moved into the new
TableDataFactory class.
Closes #6341