Search in sources :

Example 1 with CoreOperatorType

use of org.apache.drill.exec.server.rest.profile.CoreOperatorType in project drill by apache.

the class OperatorStats method getProfile.

@SuppressWarnings("deprecation")
public OperatorProfile getProfile() {
    final OperatorProfile.Builder b = OperatorProfile.newBuilder().setOperatorTypeName(operatorType).setOperatorId(operatorId).setSetupNanos(setupNanos).setProcessNanos(processingNanos).setWaitNanos(waitNanos);
    CoreOperatorType coreOperatorType = CoreOperatorType.forName(operatorType);
    if (coreOperatorType != null) {
        b.setOperatorType(coreOperatorType.getId());
    }
    if (allocator != null) {
        b.setPeakLocalMemoryAllocated(allocator.getPeakMemoryAllocation());
    }
    addAllMetrics(b);
    return b.build();
}
Also used : Builder(org.apache.drill.exec.proto.UserBitShared.OperatorProfile.Builder) OperatorProfile(org.apache.drill.exec.proto.UserBitShared.OperatorProfile) CoreOperatorType(org.apache.drill.exec.server.rest.profile.CoreOperatorType)

Aggregations

OperatorProfile (org.apache.drill.exec.proto.UserBitShared.OperatorProfile)1 Builder (org.apache.drill.exec.proto.UserBitShared.OperatorProfile.Builder)1 CoreOperatorType (org.apache.drill.exec.server.rest.profile.CoreOperatorType)1