/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder setFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.set(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
.setForeman(endPoints[minorFragmentId]) // .setHandle(handle) // .setAssignment(endPoints[minorFragmentId]) // .setLeafFragment(isLeafFragment) // .setContext(queryContextInfo) .setMemInitial(initialAllocation)// .setMemMax(wrapper.getMaxAllocation()) // TODO - for some reason OOM is using leaf fragment max allocation divided by width .setCredentials(session.getCredentials()) .addAllCollector(CountRequiredFragments.getCollectors(root)) .build();
public Builder mergeFrom(org.apache.drill.exec.proto.BitControl.PlanFragment other) { if (other == org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()) return this; if (other.hasHandle()) { mergeHandle(other.getHandle()); setNetworkCost(other.getNetworkCost()); setCpuCost(other.getCpuCost()); setDiskCost(other.getDiskCost()); setMemoryCost(other.getMemoryCost()); onChanged(); setLeafFragment(other.getLeafFragment()); mergeAssignment(other.getAssignment()); mergeForeman(other.getForeman()); setMemInitial(other.getMemInitial()); setMemMax(other.getMemMax()); mergeCredentials(other.getCredentials()); onChanged(); mergeContext(other.getContext());
return; case 1: builder.setHandle(input.mergeObject(org.apache.drill.exec.proto.ExecProtos.FragmentHandle.newBuilder(), org.apache.drill.exec.proto.SchemaExecProtos.FragmentHandle.MERGE)); builder.setNetworkCost(input.readFloat()); break; case 5: builder.setCpuCost(input.readFloat()); break; case 6: builder.setDiskCost(input.readFloat()); break; case 7: builder.setMemoryCost(input.readFloat()); break; case 8: builder.setFragmentJson(input.readString()); break; case 9: builder.setLeafFragment(input.readBool()); break; case 10: builder.setAssignment(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE)); builder.setForeman(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE)); builder.setMemInitial(input.readInt64()); break; case 13:
.setForeman(foremanNode) // .setHandle(handle) // .setAssignment(wrapper.getAssignedEndpoint(minorFragmentId)) // .setLeafFragment(isLeafFragment) // .setContext(queryContextInfo) .setMemInitial(wrapper.getInitialAllocation())// .setMemMax(wrapper.getMaxAllocation()) .setCredentials(session.getCredentials()) .addAllCollector(CountRequiredFragments.getCollectors(root)) .build();
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder addFragments( org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder addFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder setFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.set(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 3;</code> */ public Builder addFragments( org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code> */ public Builder addFragment( org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentBuilder_ == null) { ensureFragmentIsMutable(); fragment_.add(builderForValue.build()); onChanged(); } else { fragmentBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code> */ public Builder setFragment( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentBuilder_ == null) { ensureFragmentIsMutable(); fragment_.set(index, builderForValue.build()); onChanged(); } else { fragmentBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code> */ public Builder addFragment( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentBuilder_ == null) { ensureFragmentIsMutable(); fragment_.add(index, builderForValue.build()); onChanged(); } else { fragmentBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 3;</code> */ public Builder addFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 3;</code> */ public Builder setFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.set(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
public PlanFragment applyPlan(PhysicalPlanReader reader) throws ForemanSetupException { // get plan as JSON try { final String plan = reader.writeJson(root); final String optionsData = reader.writeJson(options); return PlanFragment.newBuilder(fragment) .setFragmentJson(plan) .setOptionsJson(optionsData) .build(); } catch (JsonProcessingException e) { throw new ForemanSetupException("Failure while trying to convert fragment into json.", e); } } }
public Builder mergeFrom(org.apache.drill.exec.proto.BitControl.PlanFragment other) { if (other == org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()) return this; if (other.hasHandle()) { mergeHandle(other.getHandle()); setNetworkCost(other.getNetworkCost()); setCpuCost(other.getCpuCost()); setDiskCost(other.getDiskCost()); setMemoryCost(other.getMemoryCost()); onChanged(); setLeafFragment(other.getLeafFragment()); mergeAssignment(other.getAssignment()); mergeForeman(other.getForeman()); setMemInitial(other.getMemInitial()); setMemMax(other.getMemMax()); mergeCredentials(other.getCredentials()); onChanged(); mergeContext(other.getContext());
return; case 1: builder.setHandle(input.mergeObject(org.apache.drill.exec.proto.ExecProtos.FragmentHandle.newBuilder(), org.apache.drill.exec.proto.SchemaExecProtos.FragmentHandle.MERGE)); builder.setNetworkCost(input.readFloat()); break; case 5: builder.setCpuCost(input.readFloat()); break; case 6: builder.setDiskCost(input.readFloat()); break; case 7: builder.setMemoryCost(input.readFloat()); break; case 8: builder.setFragmentJson(input.readString()); break; case 9: builder.setLeafFragment(input.readBool()); break; case 10: builder.setAssignment(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE)); builder.setForeman(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE)); builder.setMemInitial(input.readInt64()); break; case 13:
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder addFragments( int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(index, builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .exec.bit.control.PlanFragment fragments = 4;</code> * * <pre> * * Input for query type EXECUTION. Input is a set of executable fragments. * </pre> */ public Builder addFragments( org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { if (fragmentsBuilder_ == null) { ensureFragmentsIsMutable(); fragments_.add(builderForValue.build()); onChanged(); } else { fragmentsBuilder_.addMessage(builderForValue.build()); } return this; } /**