.newBuilder() .setServer(ProtobufUtil.toServerName(s.getKey())) .setServerLoad(ServerMetricsBuilder.toServerLoad(s.getValue())) .build()) .collect(Collectors.toList()))
@InterfaceAudience.Private public ServerLoad(ServerMetrics metrics) { this.metrics = metrics; this.serverLoad = ServerMetricsBuilder.toServerLoad(metrics); for (RegionMetrics rl : metrics.getRegionMetrics().values()) { stores += rl.getStoreCount(); storefiles += rl.getStoreFileCount(); storeUncompressedSizeMB += rl.getUncompressedStoreFileSize().get(Size.Unit.MEGABYTE); storefileSizeMB += rl.getStoreFileSize().get(Size.Unit.MEGABYTE); memstoreSizeMB += rl.getMemStoreSize().get(Size.Unit.MEGABYTE); readRequestsCount += rl.getReadRequestCount(); cpRequestsCount += rl.getCpRequestCount(); filteredReadRequestsCount += rl.getFilteredReadRequestCount(); writeRequestsCount += rl.getWriteRequestCount(); storefileIndexSizeKB += rl.getStoreFileIndexSize().get(Size.Unit.KILOBYTE); rootIndexSizeKB += rl.getStoreFileRootLevelIndexSize().get(Size.Unit.KILOBYTE); totalStaticIndexSizeKB += rl.getStoreFileUncompressedDataIndexSize().get(Size.Unit.KILOBYTE); totalStaticBloomSizeKB += rl.getBloomFilterSize().get(Size.Unit.KILOBYTE); totalCompactingKVs += rl.getCompactingCellCount(); currentCompactedKVs += rl.getCompactedCellCount(); } }
ServerName sn = ServerName.parseVersionedServerName(sns[i].getVersionedBytes()); request.setServer(ProtobufUtil.toServerName(sn)); request.setLoad(ServerMetricsBuilder.toServerLoad(ServerMetricsBuilder.of(sn))); master.getMasterRpcServices().regionServerReport(null, request.build());
.newBuilder() .setServer(ProtobufUtil.toServerName(s.getKey())) .setServerLoad(ServerMetricsBuilder.toServerLoad(s.getValue())) .build()) .collect(Collectors.toList()))
@InterfaceAudience.Private public ServerLoad(ServerMetrics metrics) { this.metrics = metrics; this.serverLoad = ServerMetricsBuilder.toServerLoad(metrics); for (RegionMetrics rl : metrics.getRegionMetrics().values()) { stores += rl.getStoreCount(); storefiles += rl.getStoreFileCount(); storeUncompressedSizeMB += rl.getUncompressedStoreFileSize().get(Size.Unit.MEGABYTE); storefileSizeMB += rl.getStoreFileSize().get(Size.Unit.MEGABYTE); memstoreSizeMB += rl.getMemStoreSize().get(Size.Unit.MEGABYTE); readRequestsCount += rl.getReadRequestCount(); filteredReadRequestsCount += rl.getFilteredReadRequestCount(); writeRequestsCount += rl.getWriteRequestCount(); storefileIndexSizeKB += rl.getStoreFileIndexSize().get(Size.Unit.KILOBYTE); rootIndexSizeKB += rl.getStoreFileRootLevelIndexSize().get(Size.Unit.KILOBYTE); totalStaticIndexSizeKB += rl.getStoreFileUncompressedDataIndexSize().get(Size.Unit.KILOBYTE); totalStaticBloomSizeKB += rl.getBloomFilterSize().get(Size.Unit.KILOBYTE); totalCompactingKVs += rl.getCompactingCellCount(); currentCompactedKVs += rl.getCompactedCellCount(); } }
.newBuilder() .setServer(ProtobufUtil.toServerName(s.getKey())) .setServerLoad(ServerMetricsBuilder.toServerLoad(s.getValue())) .build()) .collect(Collectors.toList()))
@InterfaceAudience.Private public ServerLoad(ServerMetrics metrics) { this.metrics = metrics; this.serverLoad = ServerMetricsBuilder.toServerLoad(metrics); for (RegionMetrics rl : metrics.getRegionMetrics().values()) { stores += rl.getStoreCount(); storefiles += rl.getStoreFileCount(); storeUncompressedSizeMB += rl.getUncompressedStoreFileSize().get(Size.Unit.MEGABYTE); storefileSizeMB += rl.getStoreFileSize().get(Size.Unit.MEGABYTE); memstoreSizeMB += rl.getMemStoreSize().get(Size.Unit.MEGABYTE); readRequestsCount += rl.getReadRequestCount(); filteredReadRequestsCount += rl.getFilteredReadRequestCount(); writeRequestsCount += rl.getWriteRequestCount(); storefileIndexSizeKB += rl.getStoreFileIndexSize().get(Size.Unit.KILOBYTE); rootIndexSizeKB += rl.getStoreFileRootLevelIndexSize().get(Size.Unit.KILOBYTE); totalStaticIndexSizeKB += rl.getStoreFileUncompressedDataIndexSize().get(Size.Unit.KILOBYTE); totalStaticBloomSizeKB += rl.getBloomFilterSize().get(Size.Unit.KILOBYTE); totalCompactingKVs += rl.getCompactingCellCount(); currentCompactedKVs += rl.getCompactedCellCount(); } }
ServerName sn = ServerName.parseVersionedServerName(sns[i].getVersionedBytes()); request.setServer(ProtobufUtil.toServerName(sn)); request.setLoad(ServerMetricsBuilder.toServerLoad(ServerMetricsBuilder.of(sn))); master.getMasterRpcServices().regionServerReport(null, request.build());