Examples of writeBlock()


Examples of com.facebook.presto.spi.block.VariableWidthBlockEncoding.writeBlock()

                .appendSlice(Slices.utf8Slice("dave"))
                .build();

        DynamicSliceOutput sliceOutput = new DynamicSliceOutput(1024);
        BlockEncoding blockEncoding = new VariableWidthBlockEncoding(VARCHAR);
        blockEncoding.writeBlock(sliceOutput, expectedBlock);
        Block actualBlock = blockEncoding.readBlock(sliceOutput.slice().getInput());
        BlockAssertions.assertBlockEquals(actualBlock, expectedBlock);
    }

    @Test
View Full Code Here

Examples of com.facebook.presto.spi.block.VariableWidthBlockEncoding.writeBlock()

        VARCHAR.writeString(expectedBlockBuilder, "dave");
        Block expectedBlock = expectedBlockBuilder.build();

        DynamicSliceOutput sliceOutput = new DynamicSliceOutput(1024);
        BlockEncoding blockEncoding = new VariableWidthBlockEncoding();
        blockEncoding.writeBlock(sliceOutput, expectedBlock);
        Block actualBlock = blockEncoding.readBlock(sliceOutput.slice().getInput());
        BlockAssertions.assertBlockEquals(VARCHAR, actualBlock, expectedBlock);
    }

    @Test
View Full Code Here

Examples of org.apache.flink.runtime.io.disk.iomanager.BlockChannelWriter.writeBlock()

      for (int i = 0; i < NUM_IOS; i++) {
        for (int pos = 0; pos < memSeg.size(); pos += 4) {
          memSeg.putInt(pos, i);
        }
       
        writer.writeBlock(memSeg);
        memSeg = writer.getNextReturnedSegment();
      }
     
      writer.close();
     
View Full Code Here

Examples of org.apache.flink.runtime.io.disk.iomanager.BlockChannelWriter.writeBlock()

       
        for (int pos = 0; pos < memSeg.size(); pos += 4) {
          memSeg.putInt(pos, i);
        }
       
        writer.writeBlock(memSeg);
      }
      writer.close();
     
      // get back the memory
      while (memSegs.size() < NUM_SEGS) {
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

     */
    private void syncWithDataSource() throws IOException
    {
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(-1) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

     */
    private void syncWithDataSource() throws IOException
    {
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(0) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

        _property_table.write(propStream);
        // _header.setPropertyStart has been updated on write ...
       
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(-1) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

     */
    private void syncWithDataSource() throws IOException
    {
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(-1) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

     */
    private void syncWithDataSource() throws IOException
    {
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(-1) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlockWriter.writeBlock()

     */
    private void syncWithDataSource() throws IOException
    {
       // HeaderBlock
       HeaderBlockWriter hbw = new HeaderBlockWriter(_header);
       hbw.writeBlock( getBlockAt(0) );
      
       // BATs
       for(BATBlock bat : _bat_blocks) {
          ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
          BlockAllocationTableWriter.writeBlock(bat, block);
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.