@Override public boolean apply(@Nullable MetricValue input) { return input.getMetricId() == id; } }).get().getLongValue();
final Number[] values = new Number[metricIds.length]; for (final MetricValue metric : op.getMetricList()) { int metricId = metric.getMetricId(); if (toSkip) { Optional<Integer> columnIndex = Optional.ofNullable(metricIdToMetricTableColumnIndex.get(metric.getMetricId())); columnIndex.ifPresent(index -> { if (metric.hasLongValue()) {
private void setSortSpillInfo(CoreOperatorType operatorType, OperatorProfile operatorProfile) { initSpillJobDetails(); final int operatorNumber = operatorType.getNumber(); Preconditions.checkState(operatorNumber == CoreOperatorType.EXTERNAL_SORT_VALUE); final List<UserBitShared.MetricValue> metricValues = operatorProfile.getMetricList(); for (UserBitShared.MetricValue metricValue : metricValues) { final int metricId = metricValue.getMetricId(); if (metricId == ExternalSortOperator.Metric.TOTAL_SPILLED_DATA_SIZE.ordinal() && metricValue.hasLongValue()) { spillJobDetails.setTotalBytesSpilledBySort(spillJobDetails.getTotalBytesSpilledBySort() + metricValue.getLongValue()); } } }
private boolean renderingOldProfiles(OperatorProfile op) { final List<MetricValue> metricValues = op.getMetricList(); for (MetricValue metric : metricValues) { final int metricId = metric.getMetricId(); if (metricId == HashAggStats.SKIP_METRIC_START) { /* if the ordinal (metric id) to skip is indeed present * in the serialized profile that we are trying to render * then we are definitely working with new profiles */ return false; } } return true; } }
public Builder mergeFrom(com.dremio.exec.proto.UserBitShared.MetricValue other) { if (other == com.dremio.exec.proto.UserBitShared.MetricValue.getDefaultInstance()) return this; if (other.hasMetricId()) { setMetricId(other.getMetricId()); } if (other.hasLongValue()) { setLongValue(other.getLongValue()); } if (other.hasDoubleValue()) { setDoubleValue(other.getDoubleValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.MetricValue message) throws java.io.IOException { if(message.hasMetricId()) output.writeInt32(1, message.getMetricId(), false); if(message.hasLongValue()) output.writeInt64(2, message.getLongValue(), false); if(message.hasDoubleValue()) output.writeDouble(3, message.getDoubleValue(), false); } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.MetricValue message)
private void setAggSpillInfo(CoreOperatorType operatorType, OperatorProfile operatorProfile) { initSpillJobDetails(); final int operatorNumber = operatorType.getNumber(); Preconditions.checkState(operatorNumber == CoreOperatorType.HASH_AGGREGATE_VALUE); final List<UserBitShared.MetricValue> metricValues = operatorProfile.getMetricList(); for (UserBitShared.MetricValue metricValue : metricValues) { final int metricId = metricValue.getMetricId(); if (metricId == HashAggStats.Metric.TOTAL_SPILLED_DATA_SIZE.ordinal() && metricValue.hasLongValue()) { spillJobDetails.setTotalBytesSpilledByHashAgg(spillJobDetails.getTotalBytesSpilledByHashAgg() + metricValue.getLongValue()); } } }
private boolean isArrowWriterOutputLimited(OperatorProfile operatorProfile) { for (int i = 0; i < operatorProfile.getMetricCount(); i++) { UserBitShared.MetricValue metricValue = operatorProfile.getMetric(i); if (metricValue.getMetricId() == WriterOperator.Metric.OUTPUT_LIMITED.ordinal()) { return metricValue.getLongValue() > 0; } } return false; }