@InterfaceAudience.Private public final class RegionModeStrategy extends Object implements ModeStrategy
ModeStrategy
for Region Mode.Modifier and Type | Field and Description |
---|---|
private List<FieldInfo> |
fieldInfos |
private Map<String,RequestCountPerSecond> |
requestCountPerSecondMap |
Constructor and Description |
---|
RegionModeStrategy() |
Modifier and Type | Method and Description |
---|---|
private Record |
createRecord(ServerMetrics serverMetrics,
RegionMetrics regionMetrics,
long lastReportTimestamp) |
DrillDownInfo |
drillDown(Record selectedRecord) |
Field |
getDefaultSortField() |
List<FieldInfo> |
getFieldInfos() |
List<Record> |
getRecords(ClusterMetrics clusterMetrics,
List<RecordFilter> pushDownFilters) |
(package private) List<Record> |
selectModeFieldsAndAddCountField(List<FieldInfo> fieldInfos,
List<Record> records,
Field countField)
Form new record list with records formed by only fields provided through fieldInfo and add a
count field for each record with value 1 We are doing two operation of selecting and adding new
field because of saving some CPU cycles on rebuilding the record again
|
private final List<FieldInfo> fieldInfos
private final Map<String,RequestCountPerSecond> requestCountPerSecondMap
RegionModeStrategy()
public List<FieldInfo> getFieldInfos()
getFieldInfos
in interface ModeStrategy
public Field getDefaultSortField()
getDefaultSortField
in interface ModeStrategy
public List<Record> getRecords(ClusterMetrics clusterMetrics, List<RecordFilter> pushDownFilters)
getRecords
in interface ModeStrategy
private Record createRecord(ServerMetrics serverMetrics, RegionMetrics regionMetrics, long lastReportTimestamp)
List<Record> selectModeFieldsAndAddCountField(List<FieldInfo> fieldInfos, List<Record> records, Field countField)
fieldInfos
- List of FieldInfos required in the recordrecords
- List of records which needs to be processedcountField
- Field which needs to be added with value 1 for each record@Nullable public DrillDownInfo drillDown(Record selectedRecord)
drillDown
in interface ModeStrategy
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.