ServerMetricsImpl(ServerName serverName, long requestCountPerSecond, long requestCount, Size usedHeapSize, Size maxHeapSize, int infoServerPort, List<ReplicationLoadSource> sources, ReplicationLoadSink sink, Map<byte[], RegionMetrics> regionStatus, Set<String> coprocessorNames, long reportTimestamp, long lastReportTimestamp) { this.serverName = Preconditions.checkNotNull(serverName); this.requestCountPerSecond = requestCountPerSecond; this.requestCount = requestCount; this.usedHeapSize = Preconditions.checkNotNull(usedHeapSize); this.maxHeapSize = Preconditions.checkNotNull(maxHeapSize); this.infoServerPort = infoServerPort; this.sources = Preconditions.checkNotNull(sources); this.sink = sink; this.regionStatus = Preconditions.checkNotNull(regionStatus); this.coprocessorNames =Preconditions.checkNotNull(coprocessorNames); this.reportTimestamp = reportTimestamp; this.lastReportTimestamp = lastReportTimestamp; }
public static List<ReplicationLoadSource> toReplicationLoadSourceList( List<ClusterStatusProtos.ReplicationLoadSource> clsList) { ArrayList<ReplicationLoadSource> rlsList = new ArrayList<ReplicationLoadSource>(); for (ClusterStatusProtos.ReplicationLoadSource cls : clsList) { rlsList.add(toReplicationLoadSource(cls)); } return rlsList; }
public static ClusterStatusProtos.ReplicationLoadSource toReplicationLoadSource( ReplicationLoadSource rls) { return ClusterStatusProtos.ReplicationLoadSource.newBuilder() .setPeerID(rls.getPeerID()) .setAgeOfLastShippedOp(rls.getAgeOfLastShippedOp()) .setSizeOfLogQueue((int) rls.getSizeOfLogQueue()) .setTimeStampOfLastShippedOp(rls.getTimeStampOfLastShippedOp()) .setReplicationLag(rls.getReplicationLag()) .build(); }
public static ReplicationLoadSource toReplicationLoadSource( ClusterStatusProtos.ReplicationLoadSource cls) { return new ReplicationLoadSource(cls.getPeerID(), cls.getAgeOfLastShippedOp(), cls.getSizeOfLogQueue(), cls.getTimeStampOfLastShippedOp(), cls.getReplicationLag()); }
/** * Call directly from client such as hbase shell * @return the list of ReplicationLoadSource */ @Override public List<ReplicationLoadSource> getReplicationLoadSourceList() { return metrics.getReplicationLoadSourceList(); }
public ServerMetricsBuilder setReplicationLoadSources(List<ReplicationLoadSource> value) { this.sources = value; return this; }
@Override public List<ReplicationLoadSource> getReplicationLoadSourceList() { return Collections.unmodifiableList(sources); }
public static ReplicationLoadSource toReplicationLoadSource( ClusterStatusProtos.ReplicationLoadSource rls) { return new ReplicationLoadSource(rls.getPeerID(), rls.getAgeOfLastShippedOp(), rls.getSizeOfLogQueue(), rls.getTimeStampOfLastShippedOp(), rls.getReplicationLag()); }
/** * Call directly from client such as hbase shell * @return the list of ReplicationLoadSource */ public List<ReplicationLoadSource> getReplicationLoadSourceList() { return ProtobufUtil.toReplicationLoadSourceList(serverLoad.getReplLoadSourceList()); }
/** * Call directly from client such as hbase shell * @return the list of ReplicationLoadSource */ List<ReplicationLoadSource> getReplicationLoadSourceList();