Package org.apache.drill.exec.ops

Examples of org.apache.drill.exec.ops.OpProfileDef


    this.context = context;
    // In normal case, batchLoader does not require an allocator. However, in case of splitAndTransfer of a value vector,
    // we may need an allocator for the new offset vector. Therefore, here we pass the context's allocator to batchLoader.
    this.batchLoader = new RecordBatchLoader(context.getAllocator());

    this.stats = context.getStats().getOperatorStats(new OpProfileDef(config.getOperatorId(), config.getOperatorType(), 1), null);
    this.stats.setLongStat(Metric.NUM_SENDERS, config.getNumSenders());
    this.config = config;
  }
View Full Code Here


  protected OperatorStats stats = null;
  protected OperatorContext oContext = null;

  public BaseRootExec(FragmentContext context, PhysicalOperator config) throws OutOfMemoryException {
    this.oContext = new OperatorContext(config, context, stats);
    stats = new OperatorStats(new OpProfileDef(config.getOperatorId(),
        config.getOperatorType(), OperatorContext.getChildCount(config)),
        oContext.getAllocator());
    context.getStats().addOperatorStats(this.stats);
  }
View Full Code Here

    // In normal case, batchLoader does not require an allocator. However, in case of splitAndTransfer of a value vector,
    // we may need an allocator for the new offset vector. Therefore, here we pass the context's allocator to batchLoader.
    oContext = new OperatorContext(config, context, false);
    this.batchLoader = new RecordBatchLoader(oContext.getAllocator());

    this.stats = context.getStats().getOperatorStats(new OpProfileDef(config.getOperatorId(), config.getOperatorType(), 1), null);
    this.stats.setLongStat(Metric.NUM_SENDERS, config.getNumSenders());
    this.config = config;
  }
View Full Code Here

  protected OperatorStats stats = null;
  protected OperatorContext oContext = null;

  public BaseRootExec(FragmentContext context, PhysicalOperator config) throws OutOfMemoryException {
    this.oContext = new OperatorContext(config, context, stats, true);
    stats = new OperatorStats(new OpProfileDef(config.getOperatorId(),
        config.getOperatorType(), OperatorContext.getChildCount(config)),
        oContext.getAllocator());
    context.getStats().addOperatorStats(this.stats);
  }
View Full Code Here

    context.getStats().addOperatorStats(this.stats);
  }

  public BaseRootExec(FragmentContext context, OperatorContext oContext, PhysicalOperator config) throws OutOfMemoryException {
    this.oContext = oContext;
    stats = new OperatorStats(new OpProfileDef(config.getOperatorId(),
      config.getOperatorType(), OperatorContext.getChildCount(config)),
      oContext.getAllocator());
    context.getStats().addOperatorStats(this.stats);
  }
View Full Code Here

    PhysicalOperator physicalOperator4 = physicalOperatorIterator.next();
    PhysicalOperator physicalOperator5 = physicalOperatorIterator.next();
    PhysicalOperator physicalOperator6 = physicalOperatorIterator.next();

    // Create some bogus Operator profile defs and stats to create operator contexts
    OpProfileDef def;
    OperatorStats stats;

    //Use some bogus operator type to create a new operator context.
    def = new OpProfileDef(physicalOperator1.getOperatorId(), UserBitShared.CoreOperatorType.MOCK_SUB_SCAN_VALUE, OperatorContext.getChildCount(physicalOperator1));
    stats = fragmentContext1.getStats().getOperatorStats(def, fragmentContext1.getAllocator());


    // Add a couple of Operator Contexts
    // Initial allocation = 1000000 bytes for all operators
    OperatorContext oContext11 = new OperatorContext(physicalOperator1, fragmentContext1, true);
    DrillBuf b11=oContext11.getAllocator().buffer(1000000);

    OperatorContext oContext12 = new OperatorContext(physicalOperator2, fragmentContext1, stats, true);
    DrillBuf b12=oContext12.getAllocator().buffer(500000);

    OperatorContext oContext21 = new OperatorContext(physicalOperator3, fragmentContext2, true);

    def = new OpProfileDef(physicalOperator4.getOperatorId(), UserBitShared.CoreOperatorType.TEXT_WRITER_VALUE, OperatorContext.getChildCount(physicalOperator4));
    stats = fragmentContext2.getStats().getOperatorStats(def, fragmentContext2.getAllocator());
    OperatorContext oContext22 = new OperatorContext(physicalOperator4, fragmentContext2, stats, true);
    DrillBuf b22=oContext22.getAllocator().buffer(2000000);

    // New Fragment begins
    BitControl.PlanFragment.Builder pfBuilder3=BitControl.PlanFragment.newBuilder();
    pfBuilder3.setMemInitial(1000000);
    BitControl.PlanFragment pf3=pfBuilder3.build();

    FragmentContext fragmentContext3 = new FragmentContext(bitContext, pf3, null, functionRegistry);

    // New fragment starts an operator that allocates an amount within the limit
    def = new OpProfileDef(physicalOperator5.getOperatorId(), UserBitShared.CoreOperatorType.UNION_VALUE, OperatorContext.getChildCount(physicalOperator5));
    stats = fragmentContext3.getStats().getOperatorStats(def, fragmentContext3.getAllocator());
    OperatorContext oContext31 = new OperatorContext(physicalOperator5, fragmentContext3, stats, true);

    DrillBuf b31a = oContext31.getAllocator().buffer(200000);
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.ops.OpProfileDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.