@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasMemoryUse()) { hash = (37 * hash) + MEMORYUSE_FIELD_NUMBER; hash = (53 * hash) + hashLong(getMemoryUse()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, memoryUse_); } getUnknownFields().writeTo(output); }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
final double triggerFactor = context.getOptions().getOption(OOB_SPILL_TRIGGER_FACTOR); final double headroomRemaining = allocator.getHeadroom() * 1.0d / (allocator.getHeadroom() + allocator.getAllocatedMemory()); if(allocatedMemoryBeforeSpilling < (spill.getMemoryUse() * triggerFactor) && headroomRemaining > context.getOptions().getOption(OOB_SPILL_TRIGGER_HEADROOM_FACTOR)) { logger.debug("Skipping OOB spill trigger, current allocation is {}, which is not within the current factor of the spilling operator ({}) which has memory use of {}. Headroom is at {} which is greater than trigger headroom of {}", allocatedMemoryBeforeSpilling, triggerFactor, spill.getMemoryUse(), headroomRemaining, context.getOptions().getOption(OOB_SPILL_TRIGGER_HEADROOM_FACTOR)); oobDropUnderThreshold++; return;
/** * When this operator starts spilling, notify others if the triggering is enabled. */ private void notifyOthersOfSpill() { if(!context.getOptions().getOption(OOB_SPILL_TRIGGER_ENABLED)) { return; } try { Payload payload = new Payload(HashAggSpill.newBuilder().setMemoryUse(allocator.getAllocatedMemory()).build()); for(FragmentAssignment a : context.getAssignments()) { OutOfBandMessage message = new OutOfBandMessage( context.getFragmentHandle().getQueryId(), context.getFragmentHandle().getMajorFragmentId(), a.getMinorFragmentIdList(), popConfig.getOperatorId(), context.getFragmentHandle().getMinorFragmentId(), payload); context.getTunnelProvider().getExecTunnel(a.getAssignment()).sendOOBMessage(message); } oobSends++; } catch(Exception ex) { logger.warn("Failure while attempting to notify others of spilling.", ex); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.dremio.exec.proto.ExecProtos.HashAggSpill)) { return super.equals(obj); } com.dremio.exec.proto.ExecProtos.HashAggSpill other = (com.dremio.exec.proto.ExecProtos.HashAggSpill) obj; boolean result = true; result = result && (hasMemoryUse() == other.hasMemoryUse()); if (hasMemoryUse()) { result = result && (getMemoryUse() == other.getMemoryUse()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.dremio.exec.proto.ExecProtos.HashAggSpill prototype) {
public com.dremio.exec.proto.ExecProtos.HashAggSpill getDefaultInstanceForType() { return com.dremio.exec.proto.ExecProtos.HashAggSpill.getDefaultInstance(); }
public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(com.dremio.exec.proto.ExecProtos.HashAggSpill prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public com.dremio.exec.proto.ExecProtos.HashAggSpill buildPartial() { com.dremio.exec.proto.ExecProtos.HashAggSpill result = new com.dremio.exec.proto.ExecProtos.HashAggSpill(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.memoryUse_ = memoryUse_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.ExecProtos.HashAggSpill message) throws java.io.IOException { if(message.hasMemoryUse()) output.writeInt64(1, message.getMemoryUse(), false); } public boolean isInitialized(com.dremio.exec.proto.ExecProtos.HashAggSpill message)
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, memoryUse_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder mergeFrom(com.dremio.exec.proto.ExecProtos.HashAggSpill other) { if (other == com.dremio.exec.proto.ExecProtos.HashAggSpill.getDefaultInstance()) return this; if (other.hasMemoryUse()) { setMemoryUse(other.getMemoryUse()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public com.dremio.exec.proto.ExecProtos.HashAggSpill.Builder newMessage() { return com.dremio.exec.proto.ExecProtos.HashAggSpill.newBuilder(); } public java.lang.String getFieldName(int number)