Examples of nextBlock()


Examples of org.apache.hadoop.hive.ql.io.RCFileRecordReader.nextBlock()

      // un/compressed sizes of file and no. of rows
      long rowNo = 0;
      long uncompressedFileSize = 0;
      long compressedFileSize = 0;
      // Skip from block to block since we only need the header
      while (recordReader.nextBlock()) {
        // Get the sizes from the key buffer and aggregate
        KeyBuffer keyBuffer = recordReader.getKeyBuffer();
        if (uncompressedColumnSizes == null) {
          uncompressedColumnSizes = new long[keyBuffer.getColumnNumber()];
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.RCFileRecordReader.nextBlock()

      // un/compressed sizes of file and no. of rows
      long rowNo = 0;
      long uncompressedFileSize = 0;
      long compressedFileSize = 0;
      // Skip from block to block since we only need the header
      while (recordReader.nextBlock()) {
        // Get the sizes from the key buffer and aggregate
        KeyBuffer keyBuffer = recordReader.getKeyBuffer();
        if (uncompressedColumnSizes == null) {
          uncompressedColumnSizes = new long[keyBuffer.getColumnNumber()];
        }
View Full Code Here

Examples of org.apache.tajo.engine.planner.global.ExecutionBlockCursor.nextBlock()

      SubQueryCompletedEvent castEvent = (SubQueryCompletedEvent) event;
      ExecutionBlockCursor cursor = query.getExecutionBlockCursor();
      MasterPlan masterPlan = query.getPlan();
      // if the subquery is succeeded
      if (castEvent.getFinalState() == SubQueryState.SUCCEEDED) {
        ExecutionBlock nextBlock = cursor.nextBlock();
        if (!query.getPlan().isTerminal(nextBlock) || !query.getPlan().isRoot(nextBlock)) {
          SubQuery nextSubQuery = new SubQuery(query.context, query.getPlan(), nextBlock, query.sm);
          nextSubQuery.setPriority(query.priority--);
          query.addSubQuery(nextSubQuery);
          nextSubQuery.handle(new SubQueryEvent(nextSubQuery.getId(),
View Full Code Here

Examples of org.apache.tajo.engine.planner.global.ExecutionBlockCursor.nextBlock()

    ExecutionBlockCursor cursor = new ExecutionBlockCursor(plan);

    int count = 0;
    while(cursor.hasNext()) {
      cursor.nextBlock();
      count++;
    }

    // 4 input relations, 1 broadcast join and 2 symmetric repartition joins and 1 terminal = 8 execution blocks
    assertEquals(8, count);
View Full Code Here

Examples of org.apache.tajo.engine.planner.global.ExecutionBlockCursor.nextBlock()

      return !query.getPlan().isTerminal(nextBlock);
    }

    private void executeNextBlock(Query query) {
      ExecutionBlockCursor cursor = query.getExecutionBlockCursor();
      ExecutionBlock nextBlock = cursor.nextBlock();
      SubQuery nextSubQuery = new SubQuery(query.context, query.getPlan(), nextBlock, query.sm);
      nextSubQuery.setPriority(query.priority--);
      query.addSubQuery(nextSubQuery);
      nextSubQuery.handle(new SubQueryEvent(nextSubQuery.getId(), SubQueryEventType.SQ_INIT));
View Full Code Here

Examples of org.apache.tajo.engine.planner.global.ExecutionBlockCursor.nextBlock()

    ExecutionBlockCursor cursor = new ExecutionBlockCursor(plan);

    int count = 0;
    while(cursor.hasNext()) {
      cursor.nextBlock();
      count++;
    }

    assertEquals(6, count);
  }
View Full Code Here

Examples of org.jostraca.BlockList.nextBlock()

    bl.add( new Block( Block.TYPE_text, c1 ) );
    bl.add( new Block( Block.TYPE_script, c2 ) );

    Block b;
    assertTrue( bl.hasMoreBlocks() );
    b = bl.nextBlock();
    assertTrue( c1.equals( b.getContent() ) );
    assertTrue( b.isText() );

    assertTrue( bl.hasMoreBlocks() );
    b = bl.nextBlock();
View Full Code Here

Examples of org.jostraca.BlockList.nextBlock()

    b = bl.nextBlock();
    assertTrue( c1.equals( b.getContent() ) );
    assertTrue( b.isText() );

    assertTrue( bl.hasMoreBlocks() );
    b = bl.nextBlock();
    assertTrue( c2.equals( b.getContent() ) );
    assertTrue( b.isScript() );

    assertTrue( !bl.hasMoreBlocks() );
  }
View Full Code Here

Examples of org.sindice.siren.index.codecs.siren10.DocsFreqBlockIndexInput.DocsFreqBlockReader.nextBlock()

    reader.setNodeBlockIndex(in.index());
    reader.setPosBlockIndex(in.index());
    for (int i = 0; i < 11777; i++) {
      if (reader.isExhausted()) {
        reader.nextBlock();
      }
      assertEquals(i, reader.nextDocument());
    }

    in.close();
View Full Code Here

Examples of org.sindice.siren.index.codecs.siren10.DocsFreqBlockIndexInput.DocsFreqBlockReader.nextBlock()

    reader.setNodeBlockIndex(in.index());
    reader.setPosBlockIndex(in.index());
    for (int i = 0; i < 11777; i++) {
      if (reader.isExhausted()) {
        reader.nextBlock();
      }
      assertEquals(i, reader.nextDocument());
      final int frq = reader.nextNodeFreq();
      assertTrue(frq > 0);
      assertTrue(frq <= 10);
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.