diff --git hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
index 6f5051b..a9c5254 100644
--- hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
+++ hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
@@ -178,6 +178,18 @@ public class ServerLoad {
return serverLoad.getInfoServerPort();
}
+ public String getReplicationLoadSourceString() {
+ if (serverLoad.hasReplicationLoadSourceString())
+ return serverLoad.getReplicationLoadSourceString();
+ else return "Replication disabled";
+ }
+
+ public String getReplicationLoadSinkString() {
+ if (serverLoad.hasReplicationLoadSinkString())
+ return serverLoad.getReplicationLoadSinkString();
+ else return "Replication disabled";
+ }
+
/**
* Originally, this method factored in the effect of requests going to the
* server as well. However, this does not interact very well with the current
@@ -301,4 +313,5 @@ public class ServerLoad {
public static final ServerLoad EMPTY_SERVERLOAD =
new ServerLoad(ClusterStatusProtos.ServerLoad.newBuilder().build());
+
}
diff --git hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java
index c558485..c26c7fd 100644
--- hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java
+++ hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java
@@ -4473,6 +4473,66 @@ public final class ClusterStatusProtos {
*
*/
int getInfoServerPort();
+
+ // optional string replicationLoadSourceString = 10;
+ /**
+ * optional string replicationLoadSourceString = 10;
+ *
+ *
+ ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + boolean hasReplicationLoadSourceString(); + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + java.lang.String getReplicationLoadSourceString(); + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + com.google.protobuf.ByteString + getReplicationLoadSourceStringBytes(); + + // optional string replicationLoadSinkString = 11; + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + boolean hasReplicationLoadSinkString(); + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + java.lang.String getReplicationLoadSinkString(); + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + com.google.protobuf.ByteString + getReplicationLoadSinkStringBytes(); } /** * Protobuf type {@code ServerLoad} @@ -4576,6 +4636,16 @@ public final class ClusterStatusProtos { infoServerPort_ = input.readUInt32(); break; } + case 82: { + bitField0_ |= 0x00000080; + replicationLoadSourceString_ = input.readBytes(); + break; + } + case 90: { + bitField0_ |= 0x00000100; + replicationLoadSinkString_ = input.readBytes(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -4931,6 +5001,122 @@ public final class ClusterStatusProtos { return infoServerPort_; } + // optional string replicationLoadSourceString = 10; + public static final int REPLICATIONLOADSOURCESTRING_FIELD_NUMBER = 10; + private java.lang.Object replicationLoadSourceString_; + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public boolean hasReplicationLoadSourceString() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public java.lang.String getReplicationLoadSourceString() { + java.lang.Object ref = replicationLoadSourceString_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + replicationLoadSourceString_ = s; + } + return s; + } + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public com.google.protobuf.ByteString + getReplicationLoadSourceStringBytes() { + java.lang.Object ref = replicationLoadSourceString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + replicationLoadSourceString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string replicationLoadSinkString = 11; + public static final int REPLICATIONLOADSINKSTRING_FIELD_NUMBER = 11; + private java.lang.Object replicationLoadSinkString_; + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public boolean hasReplicationLoadSinkString() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public java.lang.String getReplicationLoadSinkString() { + java.lang.Object ref = replicationLoadSinkString_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + replicationLoadSinkString_ = s; + } + return s; + } + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public com.google.protobuf.ByteString + getReplicationLoadSinkStringBytes() { + java.lang.Object ref = replicationLoadSinkString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + replicationLoadSinkString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private void initFields() { numberOfRequests_ = 0; totalNumberOfRequests_ = 0; @@ -4941,6 +5127,8 @@ public final class ClusterStatusProtos { reportStartTime_ = 0L; reportEndTime_ = 0L; infoServerPort_ = 0; + replicationLoadSourceString_ = ""; + replicationLoadSinkString_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4993,6 +5181,12 @@ public final class ClusterStatusProtos { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeUInt32(9, infoServerPort_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(10, getReplicationLoadSourceStringBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(11, getReplicationLoadSinkStringBytes()); + } getUnknownFields().writeTo(output); } @@ -5038,6 +5232,14 @@ public final class ClusterStatusProtos { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(9, infoServerPort_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, getReplicationLoadSourceStringBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getReplicationLoadSinkStringBytes()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -5100,6 +5302,16 @@ public final class ClusterStatusProtos { result = result && (getInfoServerPort() == other.getInfoServerPort()); } + result = result && (hasReplicationLoadSourceString() == other.hasReplicationLoadSourceString()); + if (hasReplicationLoadSourceString()) { + result = result && getReplicationLoadSourceString() + .equals(other.getReplicationLoadSourceString()); + } + result = result && (hasReplicationLoadSinkString() == other.hasReplicationLoadSinkString()); + if (hasReplicationLoadSinkString()) { + result = result && getReplicationLoadSinkString() + .equals(other.getReplicationLoadSinkString()); + } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; @@ -5149,6 +5361,14 @@ public final class ClusterStatusProtos { hash = (37 * hash) + INFO_SERVER_PORT_FIELD_NUMBER; hash = (53 * hash) + getInfoServerPort(); } + if (hasReplicationLoadSourceString()) { + hash = (37 * hash) + REPLICATIONLOADSOURCESTRING_FIELD_NUMBER; + hash = (53 * hash) + getReplicationLoadSourceString().hashCode(); + } + if (hasReplicationLoadSinkString()) { + hash = (37 * hash) + REPLICATIONLOADSINKSTRING_FIELD_NUMBER; + hash = (53 * hash) + getReplicationLoadSinkString().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -5286,6 +5506,10 @@ public final class ClusterStatusProtos { bitField0_ = (bitField0_ & ~0x00000080); infoServerPort_ = 0; bitField0_ = (bitField0_ & ~0x00000100); + replicationLoadSourceString_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + replicationLoadSinkString_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); return this; } @@ -5360,6 +5584,14 @@ public final class ClusterStatusProtos { to_bitField0_ |= 0x00000040; } result.infoServerPort_ = infoServerPort_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000080; + } + result.replicationLoadSourceString_ = replicationLoadSourceString_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000100; + } + result.replicationLoadSinkString_ = replicationLoadSinkString_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -5449,6 +5681,16 @@ public final class ClusterStatusProtos { if (other.hasInfoServerPort()) { setInfoServerPort(other.getInfoServerPort()); } + if (other.hasReplicationLoadSourceString()) { + bitField0_ |= 0x00000200; + replicationLoadSourceString_ = other.replicationLoadSourceString_; + onChanged(); + } + if (other.hasReplicationLoadSinkString()) { + bitField0_ |= 0x00000400; + replicationLoadSinkString_ = other.replicationLoadSinkString_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -6537,6 +6779,214 @@ public final class ClusterStatusProtos { return this; } + // optional string replicationLoadSourceString = 10; + private java.lang.Object replicationLoadSourceString_ = ""; + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public boolean hasReplicationLoadSourceString() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public java.lang.String getReplicationLoadSourceString() { + java.lang.Object ref = replicationLoadSourceString_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + replicationLoadSourceString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public com.google.protobuf.ByteString + getReplicationLoadSourceStringBytes() { + java.lang.Object ref = replicationLoadSourceString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + replicationLoadSourceString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public Builder setReplicationLoadSourceString( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + replicationLoadSourceString_ = value; + onChanged(); + return this; + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public Builder clearReplicationLoadSourceString() { + bitField0_ = (bitField0_ & ~0x00000200); + replicationLoadSourceString_ = getDefaultInstance().getReplicationLoadSourceString(); + onChanged(); + return this; + } + /** + *
optional string replicationLoadSourceString = 10;
+ *
+ * + ** + * The replicationLoadSourceString for the replication Source status of this region server . + *+ */ + public Builder setReplicationLoadSourceStringBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + replicationLoadSourceString_ = value; + onChanged(); + return this; + } + + // optional string replicationLoadSinkString = 11; + private java.lang.Object replicationLoadSinkString_ = ""; + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public boolean hasReplicationLoadSinkString() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public java.lang.String getReplicationLoadSinkString() { + java.lang.Object ref = replicationLoadSinkString_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + replicationLoadSinkString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public com.google.protobuf.ByteString + getReplicationLoadSinkStringBytes() { + java.lang.Object ref = replicationLoadSinkString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + replicationLoadSinkString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public Builder setReplicationLoadSinkString( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + replicationLoadSinkString_ = value; + onChanged(); + return this; + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public Builder clearReplicationLoadSinkString() { + bitField0_ = (bitField0_ & ~0x00000400); + replicationLoadSinkString_ = getDefaultInstance().getReplicationLoadSinkString(); + onChanged(); + return this; + } + /** + *
optional string replicationLoadSinkString = 11;
+ *
+ * + ** + * The replicationLoadSinkString for the replication Sink status of this region server . + *+ */ + public Builder setReplicationLoadSinkStringBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + replicationLoadSinkString_ = value; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:ServerLoad) } @@ -10361,27 +10811,28 @@ public final class ClusterStatusProtos { "ompacted_KVs\030\013 \001(\004\022\032\n\022root_index_size_KB" + "\030\014 \001(\r\022\"\n\032total_static_index_size_KB\030\r \001" + "(\r\022\"\n\032total_static_bloom_size_KB\030\016 \001(\r\022\034" + - "\n\024complete_sequence_id\030\017 \001(\004\"\212\002\n\nServerL" + + "\n\024complete_sequence_id\030\017 \001(\004\"\322\002\n\nServerL" + "oad\022\032\n\022number_of_requests\030\001 \001(\r\022 \n\030total" + "_number_of_requests\030\002 \001(\r\022\024\n\014used_heap_M" + "B\030\003 \001(\r\022\023\n\013max_heap_MB\030\004 \001(\r\022!\n\014region_l" + "oads\030\005 \003(\0132\013.RegionLoad\022\"\n\014coprocessors\030" + "\006 \003(\0132\014.Coprocessor\022\031\n\021report_start_time" + "\030\007 \001(\004\022\027\n\017report_end_time\030\010 \001(\004\022\030\n\020info_", - "server_port\030\t \001(\r\"O\n\016LiveServerInfo\022\033\n\006s" + - "erver\030\001 \002(\0132\013.ServerName\022 \n\013server_load\030" + - "\002 \002(\0132\013.ServerLoad\"\340\002\n\rClusterStatus\022/\n\r" + - "hbase_version\030\001 \001(\0132\030.HBaseVersionFileCo" + - "ntent\022%\n\014live_servers\030\002 \003(\0132\017.LiveServer" + - "Info\022!\n\014dead_servers\030\003 \003(\0132\013.ServerName\022" + - "2\n\025regions_in_transition\030\004 \003(\0132\023.RegionI" + - "nTransition\022\036\n\ncluster_id\030\005 \001(\0132\n.Cluste" + - "rId\022)\n\023master_coprocessors\030\006 \003(\0132\014.Copro" + - "cessor\022\033\n\006master\030\007 \001(\0132\013.ServerName\022#\n\016b", - "ackup_masters\030\010 \003(\0132\013.ServerName\022\023\n\013bala" + - "ncer_on\030\t \001(\010BF\n*org.apache.hadoop.hbase" + - ".protobuf.generatedB\023ClusterStatusProtos" + - "H\001\240\001\001" + "server_port\030\t \001(\r\022#\n\033replicationLoadSour" + + "ceString\030\n \001(\t\022!\n\031replicationLoadSinkStr" + + "ing\030\013 \001(\t\"O\n\016LiveServerInfo\022\033\n\006server\030\001 " + + "\002(\0132\013.ServerName\022 \n\013server_load\030\002 \002(\0132\013." + + "ServerLoad\"\340\002\n\rClusterStatus\022/\n\rhbase_ve" + + "rsion\030\001 \001(\0132\030.HBaseVersionFileContent\022%\n" + + "\014live_servers\030\002 \003(\0132\017.LiveServerInfo\022!\n\014" + + "dead_servers\030\003 \003(\0132\013.ServerName\0222\n\025regio" + + "ns_in_transition\030\004 \003(\0132\023.RegionInTransit" + + "ion\022\036\n\ncluster_id\030\005 \001(\0132\n.ClusterId\022)\n\023m", + "aster_coprocessors\030\006 \003(\0132\014.Coprocessor\022\033" + + "\n\006master\030\007 \001(\0132\013.ServerName\022#\n\016backup_ma" + + "sters\030\010 \003(\0132\013.ServerName\022\023\n\013balancer_on\030" + + "\t \001(\010BF\n*org.apache.hadoop.hbase.protobu" + + "f.generatedB\023ClusterStatusProtosH\001\240\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10411,7 +10862,7 @@ public final class ClusterStatusProtos { internal_static_ServerLoad_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ServerLoad_descriptor, - new java.lang.String[] { "NumberOfRequests", "TotalNumberOfRequests", "UsedHeapMB", "MaxHeapMB", "RegionLoads", "Coprocessors", "ReportStartTime", "ReportEndTime", "InfoServerPort", }); + new java.lang.String[] { "NumberOfRequests", "TotalNumberOfRequests", "UsedHeapMB", "MaxHeapMB", "RegionLoads", "Coprocessors", "ReportStartTime", "ReportEndTime", "InfoServerPort", "ReplicationLoadSourceString", "ReplicationLoadSinkString", }); internal_static_LiveServerInfo_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_LiveServerInfo_fieldAccessorTable = new diff --git hbase-protocol/src/main/protobuf/ClusterStatus.proto hbase-protocol/src/main/protobuf/ClusterStatus.proto index dbf00dc..dcde761 100644 --- hbase-protocol/src/main/protobuf/ClusterStatus.proto +++ hbase-protocol/src/main/protobuf/ClusterStatus.proto @@ -155,6 +155,16 @@ message ServerLoad { * The port number that this region server is hosing an info server on. */ optional uint32 info_server_port = 9; + + /** + * The replicationLoadSourceString for the replication Source status of this region server . + */ + optional string replicationLoadSourceString = 10; + + /** + * The replicationLoadSinkString for the replication Sink status of this region server . + */ + optional string replicationLoadSinkString = 11; } message LiveServerInfo { diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 84f986b..cfa1df3 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -153,6 +153,9 @@ import com.google.protobuf.BlockingRpcChannel; import com.google.protobuf.HBaseZeroCopyByteString; import com.google.protobuf.ServiceException; +import static org.apache.hadoop.hbase.replication.regionserver.ReplicationLoad.REPLICATIONLOADSOURCE; +import static org.apache.hadoop.hbase.replication.regionserver.ReplicationLoad.REPLICATIONLOADSINK; + /** * HRegionServer makes a set of HRegions available to clients. It checks in with * the HMaster. There are many HRegionServers in a single HBase deployment. @@ -963,6 +966,7 @@ public class HRegionServer extends HasThread implements } } + ClusterStatusProtos.ServerLoad buildServerLoad(long reportStartTime, long reportEndTime) { // We're getting the MetricsRegionServerWrapper here because the wrapper computes requests // per second, and other metrics As long as metrics are part of ServerLoad it's best to use @@ -976,16 +980,14 @@ public class HRegionServer extends HasThread implements MemoryUsage memory = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(); - ClusterStatusProtos.ServerLoad.Builder serverLoad = - ClusterStatusProtos.ServerLoad.newBuilder(); + ClusterStatusProtos.ServerLoad.Builder serverLoad = ClusterStatusProtos.ServerLoad.newBuilder(); serverLoad.setNumberOfRequests((int) regionServerWrapper.getRequestsPerSecond()); serverLoad.setTotalNumberOfRequests((int) regionServerWrapper.getTotalRequestCount()); - serverLoad.setUsedHeapMB((int)(memory.getUsed() / 1024 / 1024)); + serverLoad.setUsedHeapMB((int) (memory.getUsed() / 1024 / 1024)); serverLoad.setMaxHeapMB((int) (memory.getMax() / 1024 / 1024)); Set