public IterateProcessor(Kv.Range range, StoreInfo storeInfo, OperandBroker operandBroker) { this.range = range; this.storeInfo = storeInfo; this.result = operandBroker; this.nodeIdToNodes = Maps.newConcurrentMap(); this.eggFinishedCount = new AtomicInteger(0); this.curChunkSize = 0; minChunkSize = range.getMinChunkSize(); if (minChunkSize < 0) { minChunkSize = Long.MAX_VALUE; } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + START_FIELD_NUMBER; hash = (53 * hash) + getStart().hashCode(); hash = (37 * hash) + END_FIELD_NUMBER; hash = (53 * hash) + getEnd().hashCode(); hash = (37 * hash) + MINCHUNKSIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinChunkSize()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + START_FIELD_NUMBER; hash = (53 * hash) + getStart().hashCode(); hash = (37 * hash) + END_FIELD_NUMBER; hash = (53 * hash) + getEnd().hashCode(); hash = (37 * hash) + MINCHUNKSIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinChunkSize()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
LMDBStore store = getStore(); LOGGER.info("{} receive iterate request. start: {}, end: {}, minChunkSize: {}", store, request.getStart().toStringUtf8(), request.getEnd().toStringUtf8(), request.getMinChunkSize()); toBuffer = Bytes.wrap(toBytes); long threshold = request.getMinChunkSize() > 0 ? request.getMinChunkSize() : PAYLOAD_THRESHOLD; try (KeyValueIterator<Bytes, byte[]> keyValueIterator = store.range(fromBuffer, toBuffer)) { while (keyValueIterator.hasNext()) {
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.webank.ai.fate.api.eggroll.storage.Kv.Range)) { return super.equals(obj); } com.webank.ai.fate.api.eggroll.storage.Kv.Range other = (com.webank.ai.fate.api.eggroll.storage.Kv.Range) obj; boolean result = true; result = result && getStart() .equals(other.getStart()); result = result && getEnd() .equals(other.getEnd()); result = result && (getMinChunkSize() == other.getMinChunkSize()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.webank.ai.fate.api.eggroll.storage.Kv.Range)) { return super.equals(obj); } com.webank.ai.fate.api.eggroll.storage.Kv.Range other = (com.webank.ai.fate.api.eggroll.storage.Kv.Range) obj; boolean result = true; result = result && getStart() .equals(other.getStart()); result = result && getEnd() .equals(other.getEnd()); result = result && (getMinChunkSize() == other.getMinChunkSize()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.webank.ai.fate.api.eggroll.storage.Kv.Range other) { if (other == com.webank.ai.fate.api.eggroll.storage.Kv.Range.getDefaultInstance()) return this; if (other.getStart() != com.google.protobuf.ByteString.EMPTY) { setStart(other.getStart()); } if (other.getEnd() != com.google.protobuf.ByteString.EMPTY) { setEnd(other.getEnd()); } if (other.getMinChunkSize() != 0L) { setMinChunkSize(other.getMinChunkSize()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(com.webank.ai.fate.api.eggroll.storage.Kv.Range other) { if (other == com.webank.ai.fate.api.eggroll.storage.Kv.Range.getDefaultInstance()) return this; if (other.getStart() != com.google.protobuf.ByteString.EMPTY) { setStart(other.getStart()); } if (other.getEnd() != com.google.protobuf.ByteString.EMPTY) { setEnd(other.getEnd()); } if (other.getMinChunkSize() != 0L) { setMinChunkSize(other.getMinChunkSize()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }