HBASE-12986 Compaction pressure based client pushback
Signed-off-by: Andrew Purtell <apurtell@apache.org> Conflicts: hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
This commit is contained in:
parent
759252027d
commit
fa2d0859f7
@ -70,6 +70,9 @@ public class ExponentialClientBackoffPolicy implements ClientBackoffPolicy {
|
|||||||
|
|
||||||
// Factor in heap occupancy
|
// Factor in heap occupancy
|
||||||
float heapOccupancy = regionStats.getHeapOccupancyPercent() / 100.0f;
|
float heapOccupancy = regionStats.getHeapOccupancyPercent() / 100.0f;
|
||||||
|
|
||||||
|
// Factor in compaction pressure, 1.0 means heavy compaction pressure
|
||||||
|
float compactionPressure = regionStats.getCompactionPressure() / 100.0f;
|
||||||
if (heapOccupancy >= heapOccupancyLowWatermark) {
|
if (heapOccupancy >= heapOccupancyLowWatermark) {
|
||||||
// If we are higher than the high watermark, we are already applying max
|
// If we are higher than the high watermark, we are already applying max
|
||||||
// backoff and cannot scale more (see scale() below)
|
// backoff and cannot scale more (see scale() below)
|
||||||
@ -80,7 +83,7 @@ public class ExponentialClientBackoffPolicy implements ClientBackoffPolicy {
|
|||||||
scale(heapOccupancy, heapOccupancyLowWatermark, heapOccupancyHighWatermark,
|
scale(heapOccupancy, heapOccupancyLowWatermark, heapOccupancyHighWatermark,
|
||||||
0.1, 1.0));
|
0.1, 1.0));
|
||||||
}
|
}
|
||||||
|
percent = Math.max(percent, compactionPressure);
|
||||||
// square the percent as a value less than 1. Closer we move to 100 percent,
|
// square the percent as a value less than 1. Closer we move to 100 percent,
|
||||||
// the percent moves to 1, but squaring causes the exponential curve
|
// the percent moves to 1, but squaring causes the exponential curve
|
||||||
double multiplier = Math.pow(percent, 4.0);
|
double multiplier = Math.pow(percent, 4.0);
|
||||||
|
@ -57,10 +57,12 @@ public class ServerStatistics {
|
|||||||
public static class RegionStatistics {
|
public static class RegionStatistics {
|
||||||
private int memstoreLoad = 0;
|
private int memstoreLoad = 0;
|
||||||
private int heapOccupancy = 0;
|
private int heapOccupancy = 0;
|
||||||
|
private int compactionPressure = 0;
|
||||||
|
|
||||||
public void update(ClientProtos.RegionLoadStats currentStats) {
|
public void update(ClientProtos.RegionLoadStats currentStats) {
|
||||||
this.memstoreLoad = currentStats.getMemstoreLoad();
|
this.memstoreLoad = currentStats.getMemstoreLoad();
|
||||||
this.heapOccupancy = currentStats.getHeapOccupancy();
|
this.heapOccupancy = currentStats.getHeapOccupancy();
|
||||||
|
this.compactionPressure = currentStats.getCompactionPressure();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMemstoreLoadPercent(){
|
public int getMemstoreLoadPercent(){
|
||||||
@ -70,5 +72,10 @@ public class ServerStatistics {
|
|||||||
public int getHeapOccupancyPercent(){
|
public int getHeapOccupancyPercent(){
|
||||||
return this.heapOccupancy;
|
return this.heapOccupancy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCompactionPressure() {
|
||||||
|
return compactionPressure;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,22 +113,46 @@ public class TestClientExponentialBackoff {
|
|||||||
ServerStatistics stats = new ServerStatistics();
|
ServerStatistics stats = new ServerStatistics();
|
||||||
long backoffTime;
|
long backoffTime;
|
||||||
|
|
||||||
update(stats, 0, 95);
|
update(stats, 0, 95, 0);
|
||||||
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
assertTrue("Heap occupancy at low watermark had no effect", backoffTime > 0);
|
assertTrue("Heap occupancy at low watermark had no effect", backoffTime > 0);
|
||||||
|
|
||||||
long previous = backoffTime;
|
long previous = backoffTime;
|
||||||
update(stats, 0, 96);
|
update(stats, 0, 96, 0);
|
||||||
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
assertTrue("Increase above low watermark should have increased backoff",
|
assertTrue("Increase above low watermark should have increased backoff",
|
||||||
backoffTime > previous);
|
backoffTime > previous);
|
||||||
|
|
||||||
update(stats, 0, 98);
|
update(stats, 0, 98, 0);
|
||||||
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
assertEquals("We should be using max backoff when at high watermark", backoffTime,
|
assertEquals("We should be using max backoff when at high watermark", backoffTime,
|
||||||
ExponentialClientBackoffPolicy.DEFAULT_MAX_BACKOFF);
|
ExponentialClientBackoffPolicy.DEFAULT_MAX_BACKOFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCompactionPressurePolicy() {
|
||||||
|
Configuration conf = new Configuration(false);
|
||||||
|
ExponentialClientBackoffPolicy backoff = new ExponentialClientBackoffPolicy(conf);
|
||||||
|
|
||||||
|
ServerStatistics stats = new ServerStatistics();
|
||||||
|
long backoffTime;
|
||||||
|
|
||||||
|
update(stats, 0, 0, 0);
|
||||||
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
|
assertTrue("Compaction pressure has no effect", backoffTime == 0);
|
||||||
|
|
||||||
|
long previous = backoffTime;
|
||||||
|
update(stats, 0, 0, 50);
|
||||||
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
|
assertTrue("Compaction pressure should be bigger",
|
||||||
|
backoffTime > previous);
|
||||||
|
|
||||||
|
update(stats, 0, 0, 100);
|
||||||
|
backoffTime = backoff.getBackoffTime(server, regionname, stats);
|
||||||
|
assertEquals("under heavy compaction pressure", backoffTime,
|
||||||
|
ExponentialClientBackoffPolicy.DEFAULT_MAX_BACKOFF);
|
||||||
|
}
|
||||||
|
|
||||||
private void update(ServerStatistics stats, int load) {
|
private void update(ServerStatistics stats, int load) {
|
||||||
ClientProtos.RegionLoadStats stat = ClientProtos.RegionLoadStats.newBuilder()
|
ClientProtos.RegionLoadStats stat = ClientProtos.RegionLoadStats.newBuilder()
|
||||||
.setMemstoreLoad
|
.setMemstoreLoad
|
||||||
@ -136,10 +160,12 @@ public class TestClientExponentialBackoff {
|
|||||||
stats.update(regionname, stat);
|
stats.update(regionname, stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update(ServerStatistics stats, int memstoreLoad, int heapOccupancy) {
|
private void update(ServerStatistics stats, int memstoreLoad, int heapOccupancy,
|
||||||
|
int compactionPressure) {
|
||||||
ClientProtos.RegionLoadStats stat = ClientProtos.RegionLoadStats.newBuilder()
|
ClientProtos.RegionLoadStats stat = ClientProtos.RegionLoadStats.newBuilder()
|
||||||
.setMemstoreLoad(memstoreLoad)
|
.setMemstoreLoad(memstoreLoad)
|
||||||
.setHeapOccupancy(heapOccupancy)
|
.setHeapOccupancy(heapOccupancy)
|
||||||
|
.setCompactionPressure(compactionPressure)
|
||||||
.build();
|
.build();
|
||||||
stats.update(regionname, stat);
|
stats.update(regionname, stat);
|
||||||
}
|
}
|
||||||
|
@ -27621,6 +27621,24 @@ public final class ClientProtos {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
int getHeapOccupancy();
|
int getHeapOccupancy();
|
||||||
|
|
||||||
|
// optional int32 compactionPressure = 3 [default = 0];
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
boolean hasCompactionPressure();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
int getCompactionPressure();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code hbase.pb.RegionLoadStats}
|
* Protobuf type {@code hbase.pb.RegionLoadStats}
|
||||||
@ -27688,6 +27706,11 @@ public final class ClientProtos {
|
|||||||
heapOccupancy_ = input.readInt32();
|
heapOccupancy_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
compactionPressure_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@ -27778,9 +27801,34 @@ public final class ClientProtos {
|
|||||||
return heapOccupancy_;
|
return heapOccupancy_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional int32 compactionPressure = 3 [default = 0];
|
||||||
|
public static final int COMPACTIONPRESSURE_FIELD_NUMBER = 3;
|
||||||
|
private int compactionPressure_;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasCompactionPressure() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public int getCompactionPressure() {
|
||||||
|
return compactionPressure_;
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
memstoreLoad_ = 0;
|
memstoreLoad_ = 0;
|
||||||
heapOccupancy_ = 0;
|
heapOccupancy_ = 0;
|
||||||
|
compactionPressure_ = 0;
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@ -27800,6 +27848,9 @@ public final class ClientProtos {
|
|||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, heapOccupancy_);
|
output.writeInt32(2, heapOccupancy_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
output.writeInt32(3, compactionPressure_);
|
||||||
|
}
|
||||||
getUnknownFields().writeTo(output);
|
getUnknownFields().writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27817,6 +27868,10 @@ public final class ClientProtos {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, heapOccupancy_);
|
.computeInt32Size(2, heapOccupancy_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(3, compactionPressure_);
|
||||||
|
}
|
||||||
size += getUnknownFields().getSerializedSize();
|
size += getUnknownFields().getSerializedSize();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@ -27850,6 +27905,11 @@ public final class ClientProtos {
|
|||||||
result = result && (getHeapOccupancy()
|
result = result && (getHeapOccupancy()
|
||||||
== other.getHeapOccupancy());
|
== other.getHeapOccupancy());
|
||||||
}
|
}
|
||||||
|
result = result && (hasCompactionPressure() == other.hasCompactionPressure());
|
||||||
|
if (hasCompactionPressure()) {
|
||||||
|
result = result && (getCompactionPressure()
|
||||||
|
== other.getCompactionPressure());
|
||||||
|
}
|
||||||
result = result &&
|
result = result &&
|
||||||
getUnknownFields().equals(other.getUnknownFields());
|
getUnknownFields().equals(other.getUnknownFields());
|
||||||
return result;
|
return result;
|
||||||
@ -27871,6 +27931,10 @@ public final class ClientProtos {
|
|||||||
hash = (37 * hash) + HEAPOCCUPANCY_FIELD_NUMBER;
|
hash = (37 * hash) + HEAPOCCUPANCY_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getHeapOccupancy();
|
hash = (53 * hash) + getHeapOccupancy();
|
||||||
}
|
}
|
||||||
|
if (hasCompactionPressure()) {
|
||||||
|
hash = (37 * hash) + COMPACTIONPRESSURE_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getCompactionPressure();
|
||||||
|
}
|
||||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||||
memoizedHashCode = hash;
|
memoizedHashCode = hash;
|
||||||
return hash;
|
return hash;
|
||||||
@ -27989,6 +28053,8 @@ public final class ClientProtos {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
heapOccupancy_ = 0;
|
heapOccupancy_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
compactionPressure_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28025,6 +28091,10 @@ public final class ClientProtos {
|
|||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.heapOccupancy_ = heapOccupancy_;
|
result.heapOccupancy_ = heapOccupancy_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.compactionPressure_ = compactionPressure_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
@ -28047,6 +28117,9 @@ public final class ClientProtos {
|
|||||||
if (other.hasHeapOccupancy()) {
|
if (other.hasHeapOccupancy()) {
|
||||||
setHeapOccupancy(other.getHeapOccupancy());
|
setHeapOccupancy(other.getHeapOccupancy());
|
||||||
}
|
}
|
||||||
|
if (other.hasCompactionPressure()) {
|
||||||
|
setCompactionPressure(other.getCompactionPressure());
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.getUnknownFields());
|
this.mergeUnknownFields(other.getUnknownFields());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -28176,6 +28249,55 @@ public final class ClientProtos {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional int32 compactionPressure = 3 [default = 0];
|
||||||
|
private int compactionPressure_ ;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasCompactionPressure() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public int getCompactionPressure() {
|
||||||
|
return compactionPressure_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setCompactionPressure(int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
compactionPressure_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 compactionPressure = 3 [default = 0];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder clearCompactionPressure() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
compactionPressure_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:hbase.pb.RegionLoadStats)
|
// @@protoc_insertion_point(builder_scope:hbase.pb.RegionLoadStats)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33441,38 +33563,39 @@ public final class ClientProtos {
|
|||||||
"essorServiceCall\"k\n\014RegionAction\022)\n\006regi" +
|
"essorServiceCall\"k\n\014RegionAction\022)\n\006regi" +
|
||||||
"on\030\001 \002(\0132\031.hbase.pb.RegionSpecifier\022\016\n\006a" +
|
"on\030\001 \002(\0132\031.hbase.pb.RegionSpecifier\022\016\n\006a" +
|
||||||
"tomic\030\002 \001(\010\022 \n\006action\030\003 \003(\0132\020.hbase.pb.A" +
|
"tomic\030\002 \001(\010\022 \n\006action\030\003 \003(\0132\020.hbase.pb.A" +
|
||||||
"ction\"D\n\017RegionLoadStats\022\027\n\014memstoreLoad" +
|
"ction\"c\n\017RegionLoadStats\022\027\n\014memstoreLoad" +
|
||||||
"\030\001 \001(\005:\0010\022\030\n\rheapOccupancy\030\002 \001(\005:\0010\"\332\001\n\021" +
|
"\030\001 \001(\005:\0010\022\030\n\rheapOccupancy\030\002 \001(\005:\0010\022\035\n\022c" +
|
||||||
"ResultOrException\022\r\n\005index\030\001 \001(\r\022 \n\006resu" +
|
"ompactionPressure\030\003 \001(\005:\0010\"\332\001\n\021ResultOrE" +
|
||||||
"lt\030\002 \001(\0132\020.hbase.pb.Result\022*\n\texception\030" +
|
"xception\022\r\n\005index\030\001 \001(\r\022 \n\006result\030\002 \001(\0132" +
|
||||||
"\003 \001(\0132\027.hbase.pb.NameBytesPair\022:\n\016servic" +
|
"\020.hbase.pb.Result\022*\n\texception\030\003 \001(\0132\027.h" +
|
||||||
"e_result\030\004 \001(\0132\".hbase.pb.CoprocessorSer" +
|
"base.pb.NameBytesPair\022:\n\016service_result\030" +
|
||||||
"viceResult\022,\n\tloadStats\030\005 \001(\0132\031.hbase.pb",
|
"\004 \001(\0132\".hbase.pb.CoprocessorServiceResul",
|
||||||
".RegionLoadStats\"x\n\022RegionActionResult\0226" +
|
"t\022,\n\tloadStats\030\005 \001(\0132\031.hbase.pb.RegionLo" +
|
||||||
"\n\021resultOrException\030\001 \003(\0132\033.hbase.pb.Res" +
|
"adStats\"x\n\022RegionActionResult\0226\n\021resultO" +
|
||||||
"ultOrException\022*\n\texception\030\002 \001(\0132\027.hbas" +
|
"rException\030\001 \003(\0132\033.hbase.pb.ResultOrExce" +
|
||||||
"e.pb.NameBytesPair\"x\n\014MultiRequest\022,\n\014re" +
|
"ption\022*\n\texception\030\002 \001(\0132\027.hbase.pb.Name" +
|
||||||
"gionAction\030\001 \003(\0132\026.hbase.pb.RegionAction" +
|
"BytesPair\"x\n\014MultiRequest\022,\n\014regionActio" +
|
||||||
"\022\022\n\nnonceGroup\030\002 \001(\004\022&\n\tcondition\030\003 \001(\0132" +
|
"n\030\001 \003(\0132\026.hbase.pb.RegionAction\022\022\n\nnonce" +
|
||||||
"\023.hbase.pb.Condition\"\\\n\rMultiResponse\0228\n" +
|
"Group\030\002 \001(\004\022&\n\tcondition\030\003 \001(\0132\023.hbase.p" +
|
||||||
"\022regionActionResult\030\001 \003(\0132\034.hbase.pb.Reg" +
|
"b.Condition\"\\\n\rMultiResponse\0228\n\022regionAc" +
|
||||||
"ionActionResult\022\021\n\tprocessed\030\002 \001(\010*\'\n\013Co" +
|
"tionResult\030\001 \003(\0132\034.hbase.pb.RegionAction" +
|
||||||
"nsistency\022\n\n\006STRONG\020\000\022\014\n\010TIMELINE\020\0012\203\004\n\r",
|
"Result\022\021\n\tprocessed\030\002 \001(\010*\'\n\013Consistency",
|
||||||
"ClientService\0222\n\003Get\022\024.hbase.pb.GetReque" +
|
"\022\n\n\006STRONG\020\000\022\014\n\010TIMELINE\020\0012\203\004\n\rClientSer" +
|
||||||
"st\032\025.hbase.pb.GetResponse\022;\n\006Mutate\022\027.hb" +
|
"vice\0222\n\003Get\022\024.hbase.pb.GetRequest\032\025.hbas" +
|
||||||
"ase.pb.MutateRequest\032\030.hbase.pb.MutateRe" +
|
"e.pb.GetResponse\022;\n\006Mutate\022\027.hbase.pb.Mu" +
|
||||||
"sponse\0225\n\004Scan\022\025.hbase.pb.ScanRequest\032\026." +
|
"tateRequest\032\030.hbase.pb.MutateResponse\0225\n" +
|
||||||
"hbase.pb.ScanResponse\022P\n\rBulkLoadHFile\022\036" +
|
"\004Scan\022\025.hbase.pb.ScanRequest\032\026.hbase.pb." +
|
||||||
".hbase.pb.BulkLoadHFileRequest\032\037.hbase.p" +
|
"ScanResponse\022P\n\rBulkLoadHFile\022\036.hbase.pb" +
|
||||||
"b.BulkLoadHFileResponse\022X\n\013ExecService\022#" +
|
".BulkLoadHFileRequest\032\037.hbase.pb.BulkLoa" +
|
||||||
".hbase.pb.CoprocessorServiceRequest\032$.hb" +
|
"dHFileResponse\022X\n\013ExecService\022#.hbase.pb" +
|
||||||
"ase.pb.CoprocessorServiceResponse\022d\n\027Exe" +
|
".CoprocessorServiceRequest\032$.hbase.pb.Co" +
|
||||||
"cRegionServerService\022#.hbase.pb.Coproces",
|
"processorServiceResponse\022d\n\027ExecRegionSe",
|
||||||
"sorServiceRequest\032$.hbase.pb.Coprocessor" +
|
"rverService\022#.hbase.pb.CoprocessorServic" +
|
||||||
"ServiceResponse\0228\n\005Multi\022\026.hbase.pb.Mult" +
|
"eRequest\032$.hbase.pb.CoprocessorServiceRe" +
|
||||||
"iRequest\032\027.hbase.pb.MultiResponseBB\n*org" +
|
"sponse\0228\n\005Multi\022\026.hbase.pb.MultiRequest\032" +
|
||||||
".apache.hadoop.hbase.protobuf.generatedB" +
|
"\027.hbase.pb.MultiResponseBB\n*org.apache.h" +
|
||||||
"\014ClientProtosH\001\210\001\001\240\001\001"
|
"adoop.hbase.protobuf.generatedB\014ClientPr" +
|
||||||
|
"otosH\001\210\001\001\240\001\001"
|
||||||
};
|
};
|
||||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||||
@ -33634,7 +33757,7 @@ public final class ClientProtos {
|
|||||||
internal_static_hbase_pb_RegionLoadStats_fieldAccessorTable = new
|
internal_static_hbase_pb_RegionLoadStats_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_hbase_pb_RegionLoadStats_descriptor,
|
internal_static_hbase_pb_RegionLoadStats_descriptor,
|
||||||
new java.lang.String[] { "MemstoreLoad", "HeapOccupancy", });
|
new java.lang.String[] { "MemstoreLoad", "HeapOccupancy", "CompactionPressure", });
|
||||||
internal_static_hbase_pb_ResultOrException_descriptor =
|
internal_static_hbase_pb_ResultOrException_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(23);
|
getDescriptor().getMessageTypes().get(23);
|
||||||
internal_static_hbase_pb_ResultOrException_fieldAccessorTable = new
|
internal_static_hbase_pb_ResultOrException_fieldAccessorTable = new
|
||||||
|
@ -400,6 +400,8 @@ message RegionLoadStats {
|
|||||||
// Percent JVM heap occupancy. Guaranteed to be positive, between 0 and 100.
|
// Percent JVM heap occupancy. Guaranteed to be positive, between 0 and 100.
|
||||||
// We can move this to "ServerLoadStats" should we develop them.
|
// We can move this to "ServerLoadStats" should we develop them.
|
||||||
optional int32 heapOccupancy = 2 [default = 0];
|
optional int32 heapOccupancy = 2 [default = 0];
|
||||||
|
// Compaction pressure. Guaranteed to be positive, between 0 and 100.
|
||||||
|
optional int32 compactionPressure = 3 [default = 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6790,6 +6790,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
|||||||
stats.setMemstoreLoad((int) (Math.min(100, (this.memstoreSize.get() * 100) / this
|
stats.setMemstoreLoad((int) (Math.min(100, (this.memstoreSize.get() * 100) / this
|
||||||
.memstoreFlushSize)));
|
.memstoreFlushSize)));
|
||||||
stats.setHeapOccupancy((int)rsServices.getHeapMemoryManager().getHeapOccupancyPercent()*100);
|
stats.setHeapOccupancy((int)rsServices.getHeapMemoryManager().getHeapOccupancyPercent()*100);
|
||||||
|
stats.setCompactionPressure((int)rsServices.getCompactionPressure()*100 > 100 ? 100 :
|
||||||
|
(int)rsServices.getCompactionPressure()*100);
|
||||||
return stats.build();
|
return stats.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user