@InterfaceAudience.Private public final class ServerMetricsBuilder extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
ServerMetricsBuilder.ServerMetricsImpl |
Modifier and Type | Field and Description |
---|---|
private Set<String> |
coprocessorNames |
private int |
infoServerPort |
private long |
lastReportTimestamp |
private Size |
maxHeapSize |
private Map<byte[],RegionMetrics> |
regionStatus |
private long |
reportTimestamp |
private long |
requestCount |
private long |
requestCountPerSecond |
private ServerName |
serverName |
private ReplicationLoadSink |
sink |
private List<ReplicationLoadSource> |
sources |
private List<ServerTask> |
tasks |
private Size |
usedHeapSize |
private Map<byte[],UserMetrics> |
userMetrics |
private String |
version |
private int |
versionNumber |
Modifier | Constructor and Description |
---|---|
private |
ServerMetricsBuilder(ServerName serverName) |
private final ServerName serverName
private int versionNumber
private long requestCountPerSecond
private long requestCount
private Size usedHeapSize
private Size maxHeapSize
private int infoServerPort
private List<ReplicationLoadSource> sources
@Nullable private ReplicationLoadSink sink
private final Map<byte[],RegionMetrics> regionStatus
private final Map<byte[],UserMetrics> userMetrics
private final Set<String> coprocessorNames
private long reportTimestamp
private long lastReportTimestamp
private final List<ServerTask> tasks
private ServerMetricsBuilder(ServerName serverName)
public static ServerMetrics of(ServerName sn)
public static ServerMetrics of(ServerName sn, int versionNumber, String version)
public static ServerMetrics toServerMetrics(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.LiveServerInfo serverInfo)
public static ServerMetrics toServerMetrics(ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ServerLoad serverLoadPB)
public static ServerMetrics toServerMetrics(ServerName serverName, int versionNumber, String version, org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ServerLoad serverLoadPB)
public static List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.Coprocessor> toCoprocessor(Collection<String> names)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ServerLoad toServerLoad(ServerMetrics metrics)
public static ServerMetricsBuilder newBuilder(ServerName sn)
public ServerMetricsBuilder setVersionNumber(int versionNumber)
public ServerMetricsBuilder setVersion(String version)
public ServerMetricsBuilder setRequestCountPerSecond(long value)
public ServerMetricsBuilder setRequestCount(long value)
public ServerMetricsBuilder setUsedHeapSize(Size value)
public ServerMetricsBuilder setMaxHeapSize(Size value)
public ServerMetricsBuilder setInfoServerPort(int value)
public ServerMetricsBuilder setReplicationLoadSources(List<ReplicationLoadSource> value)
public ServerMetricsBuilder setReplicationLoadSink(ReplicationLoadSink value)
public ServerMetricsBuilder setRegionMetrics(List<RegionMetrics> value)
public ServerMetricsBuilder setUserMetrics(List<UserMetrics> value)
public ServerMetricsBuilder setCoprocessorNames(List<String> value)
public ServerMetricsBuilder setReportTimestamp(long value)
public ServerMetricsBuilder setLastReportTimestamp(long value)
public ServerMetricsBuilder setTasks(List<ServerTask> tasks)
public ServerMetrics build()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.