@Override public void send(final String metricType, final String metricId, final String metricField, final byte[] metricValue) { metricMessageQueue.add( ControlMessage.Metric.newBuilder() .setMetricType(metricType) .setMetricId(metricId) .setMetricField(metricField) .setMetricValue(ByteString.copyFrom(metricValue)) .build()); }
/** * <code>repeated .protobuf.Metric metric = 1;</code> */ public org.apache.nemo.runtime.common.comm.ControlMessage.Metric.Builder addMetricBuilder( int index) { return getMetricFieldBuilder().addBuilder( index, org.apache.nemo.runtime.common.comm.ControlMessage.Metric.getDefaultInstance()); } /**
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getMetricTypeBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMetricIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMetricFieldBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, metricValue_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
metricList.forEach(metric -> metricMessageHandler.onMetricMessageReceived( metric.getMetricType(), metric.getMetricId(), metric.getMetricField(), metric.getMetricValue().toByteArray())); break; case ExecutorDataCollected:
metricList.forEach(metric -> metricMessageHandler.onMetricMessageReceived( metric.getMetricType(), metric.getMetricId(), metric.getMetricField(), metric.getMetricValue().toByteArray())); break; case ExecutorDataCollected:
public org.apache.nemo.runtime.common.comm.ControlMessage.Metric buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.Metric result = new org.apache.nemo.runtime.common.comm.ControlMessage.Metric(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.metricType_ = metricType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.metricId_ = metricId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.metricField_ = metricField_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.metricValue_ = metricValue_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.Metric other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.Metric.getDefaultInstance()) return this; if (other.hasMetricType()) { bitField0_ |= 0x00000001; metricType_ = other.metricType_; onChanged(); } if (other.hasMetricId()) { bitField0_ |= 0x00000002; metricId_ = other.metricId_; onChanged(); } if (other.hasMetricField()) { bitField0_ |= 0x00000004; metricField_ = other.metricField_; onChanged(); } if (other.hasMetricValue()) { setMetricValue(other.getMetricValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.Metric other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.Metric.getDefaultInstance()) return this; if (other.hasMetricType()) { bitField0_ |= 0x00000001; metricType_ = other.metricType_; onChanged(); } if (other.hasMetricId()) { bitField0_ |= 0x00000002; metricId_ = other.metricId_; onChanged(); } if (other.hasMetricField()) { bitField0_ |= 0x00000004; metricField_ = other.metricField_; onChanged(); } if (other.hasMetricValue()) { setMetricValue(other.getMetricValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public org.apache.nemo.runtime.common.comm.ControlMessage.Metric buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.Metric result = new org.apache.nemo.runtime.common.comm.ControlMessage.Metric(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.metricType_ = metricType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.metricId_ = metricId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.metricField_ = metricField_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.metricValue_ = metricValue_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getMetricTypeBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMetricIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMetricFieldBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, metricValue_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getMetricTypeBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMetricIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMetricFieldBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, metricValue_); } getUnknownFields().writeTo(output); }
public Builder toBuilder() { return newBuilder(this); }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.nemo.runtime.common.comm.ControlMessage.Metric prototype) {
public org.apache.nemo.runtime.common.comm.ControlMessage.Metric getDefaultInstanceForType() { return org.apache.nemo.runtime.common.comm.ControlMessage.Metric.getDefaultInstance(); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getMetricTypeBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMetricIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMetricFieldBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, metricValue_); } getUnknownFields().writeTo(output); }
public org.apache.nemo.runtime.common.comm.ControlMessage.Metric getDefaultInstanceForType() { return org.apache.nemo.runtime.common.comm.ControlMessage.Metric.getDefaultInstance(); }
public static Builder newBuilder(org.apache.nemo.runtime.common.comm.ControlMessage.Metric prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.nemo.runtime.common.comm.ControlMessage.Metric prototype) {
public static Builder newBuilder(org.apache.nemo.runtime.common.comm.ControlMessage.Metric prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }