for (final MajorFragmentProfile major : majors) { final List<MinorFragmentProfile> minors = new ArrayList<>(major.getMinorFragmentProfileList()); Collections.sort(minors, Comparators.minorId); for (final MinorFragmentProfile minor : minors) {
Collections2.filter(major.getMinorFragmentProfileList(), Filters.hasOperatorsAndTimes));
Collections2.filter(major.getMinorFragmentProfileList(), Filters.hasOperatorsAndTimes));
for (MinorFragmentProfile fragmentWrapper : majorFrag0.getMinorFragmentProfileList()) { long minorFragmentStart = fragmentWrapper.getStartTime(); if (minorFragmentStart > 0 && minorFragmentStart < estimatedPlanEnd) {
Collections2.filter(major.getMinorFragmentProfileList(), Filters.hasOperatorsAndTimes)); final List<MinorFragmentProfile> incomplete = new ArrayList<>( Collections2.filter(major.getMinorFragmentProfileList(), Filters.missingOperatorsOrTimes));
public String getPlanningDuration() { //Check if Planning End is known if (profile.getPlanEnd() > 0L) { return (new SimpleDurationFormat(profile.getStart(), profile.getPlanEnd())).verbose(); } //Check if any fragments have started if (profile.getFragmentProfileCount() > 0) { //Init Planning End Time long estimatedPlanEnd = Long.MAX_VALUE; //Using Screen MajorFragment as reference MajorFragmentProfile majorFrag0 = profile.getFragmentProfile(0); //Searching for earliest starting fragment for (MinorFragmentProfile fragmentWrapper : majorFrag0.getMinorFragmentProfileList()) { long minorFragmentStart = fragmentWrapper.getStartTime(); if (minorFragmentStart > 0 && minorFragmentStart < estimatedPlanEnd) { estimatedPlanEnd = minorFragmentStart; } } //Provide estimated plan time return (new SimpleDurationFormat(profile.getStart(), estimatedPlanEnd)).verbose() + ESTIMATED_LABEL; } //Unable to estimate/calculate Specific Time spent in Planning return NOT_AVAILABLE_LABEL; }
private long tallyMajorFragmentCost(List<MajorFragmentProfile> majorFragments) { long globalProcessNanos = 0L; for (MajorFragmentProfile majorFP : majorFragments) { String majorFragmentId = new OperatorPathBuilder().setMajor(majorFP).build(); long processNanos = 0L; for (MinorFragmentProfile minorFP : majorFP.getMinorFragmentProfileList()) { for (OperatorProfile op : minorFP.getOperatorProfileList()) { processNanos += op.getProcessNanos(); } } majorFragmentTallyMap.put(majorFragmentId, processNanos); globalProcessNanos += processNanos; } return globalProcessNanos; }
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile message) throws java.io.IOException { if(message.hasMajorFragmentId()) output.writeInt32(1, message.getMajorFragmentId(), false); for(org.apache.drill.exec.proto.UserBitShared.MinorFragmentProfile minorFragmentProfile : message.getMinorFragmentProfileList()) output.writeObject(2, minorFragmentProfile, org.apache.drill.exec.proto.SchemaUserBitShared.MinorFragmentProfile.WRITE, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile message) throws java.io.IOException { if(message.hasMajorFragmentId()) output.writeInt32(1, message.getMajorFragmentId(), false); for(org.apache.drill.exec.proto.UserBitShared.MinorFragmentProfile minorFragmentProfile : message.getMinorFragmentProfileList()) output.writeObject(2, minorFragmentProfile, org.apache.drill.exec.proto.SchemaUserBitShared.MinorFragmentProfile.WRITE, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile message)