Examples of RecordBatchData


Examples of org.apache.drill.exec.physical.impl.sort.RecordBatchData

            case STOP:
              queue.putFirst(new RecordBatchDataWrapper(null, false, true));
              return;
            case OK_NEW_SCHEMA:
            case OK:
              wrapper = new RecordBatchDataWrapper(new RecordBatchData(incoming), false, false);
              queue.put(wrapper);
              wrapper = null;
              break;
            default:
              throw new UnsupportedOperationException();
View Full Code Here

Examples of org.apache.drill.exec.physical.impl.sort.RecordBatchData

                    /* Completed hashing all records in this batch. Transfer the batch
                     * to the hyper vector container. Will be used when we want to retrieve
                     * records that have matching keys on the probe side.
                     */
                    RecordBatchData nextBatch = new RecordBatchData(right);
                    if (hyperContainer == null) {
                        hyperContainer = new ExpandableHyperContainer(nextBatch.getContainer());
                    } else {
                        hyperContainer.addBatch(nextBatch.getContainer());
                    }

                    // completed processing a batch, increment batch index
                    buildBatchIndex++;
                    break;
View Full Code Here

Examples of org.apache.drill.exec.physical.impl.sort.RecordBatchData

              return;
            case OK_NEW_SCHEMA:
            case OK:
              try {
                if (!stop) {
                  wrapper = new RecordBatchDataWrapper(new RecordBatchData(incoming), false, false);
                  queue.put(wrapper);
                }
              } catch (InterruptedException e) {
                wrapper.batch.getContainer().zeroVectors();
                throw e;
View Full Code Here

Examples of org.apache.drill.exec.physical.impl.sort.RecordBatchData

          sorter.setup(context, sv2, incoming);
          Stopwatch w = new Stopwatch();
          w.start();
          sorter.sort(sv2);
//          logger.debug("Took {} us to sort {} records", w.elapsed(TimeUnit.MICROSECONDS), count);
          RecordBatchData rbd = new RecordBatchData(incoming);
          if (incoming.getSchema().getSelectionVectorMode() == SelectionVectorMode.NONE) {
            rbd.setSv2(sv2);
          }
          batchGroups.add(new BatchGroup(rbd.getContainer(), rbd.getSv2()));
          batchesSinceLastSpill++;
          if ((spillCount > 0 && totalSizeInMemory > .75 * highWaterMark) ||
                  (totalSizeInMemory > .95 * popConfig.getMaxAllocation()) ||
                  (batchGroups.size() > SPILL_THRESHOLD && batchesSinceLastSpill >= SPILL_BATCH_GROUP_SIZE)) {
            mergeAndSpill();
            batchesSinceLastSpill = 0;
          }
          long t = w.elapsed(TimeUnit.MICROSECONDS);
//          logger.debug("Took {} us to sort {} records", t, count);
          break;
        case OUT_OF_MEMORY:
          highWaterMark = totalSizeInMemory;
          if (batchesSinceLastSpill > 2) mergeAndSpill();
          batchesSinceLastSpill = 0;
          break;
        default:
          throw new UnsupportedOperationException();
        }
      }

      if (spillCount == 0) {
        Stopwatch watch = new Stopwatch();
        watch.start();

        builder = new SortRecordBatchBuilder(oContext.getAllocator(), MAX_SORT_BYTES);

        for (BatchGroup group : batchGroups) {
          RecordBatchData rbd = new RecordBatchData(group.getContainer());
          rbd.setSv2(group.getSv2());
          builder.add(rbd);
        }

        builder.build(context, container);
        sv4 = builder.getSv4();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.