Package org.apache.tajo.util

Examples of org.apache.tajo.util.BitArray


    private BitArray nullFlags;
    private int headerSize;

    private RowStoreDecoder(Schema schema) {
      this.schema = schema;
      nullFlags = new BitArray(schema.size());
      headerSize = nullFlags.bytesLength();
    }
View Full Code Here


    private BitArray nullFlags;
    private int headerSize;

    private RowStoreEncoder(Schema schema) {
      this.schema = schema;
      nullFlags = new BitArray(schema.size());
      headerSize = nullFlags.bytesLength();
    }
View Full Code Here

      SYNC_INTERVAL =
          conf.getInt(ConfVars.RAWFILE_SYNC_INTERVAL.varname,
              SYNC_SIZE * 100);

      nullFlags = new BitArray(schema.size());
      tupleHeaderSize = nullFlags.bytesLength() + (2 * Short.SIZE / 8);
      this.start = fragment.getStartKey();
      this.end = this.start + fragment.getEndKey();
    }
View Full Code Here

      tuple = new VTuple(schema.size());

      int nullFlagSize = buffer.getShort();
      byte[] nullFlagBytes = new byte[nullFlagSize];
      buffer.get(nullFlagBytes, 0, nullFlagSize);
      nullFlags = new BitArray(nullFlagBytes);
      int tupleSize = buffer.getShort();

      while (buffer.remaining() < (tupleSize)) {
        if (fillBuffer() < 0) {
          return null;
View Full Code Here

      writeHeader();

      buffer = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE);

      nullFlags = new BitArray(schema.size());

      if (enabledStats) {
        this.stats = new TableStatistics(this.schema);
      }
    }
View Full Code Here

      // initial read
      channel.read(buffer);
      buffer.flip();

      nullFlags = new BitArray(schema.getColumnNum());
      headerSize = RECORD_SIZE + 2 + nullFlags.bytesLength();

      super.init();
    }
View Full Code Here

      buffer = ByteBuffer.allocateDirect(65535);

      // comput the number of bytes, representing the null flags

      nullFlags = new BitArray(schema.getColumnNum());
      headerSize = RECORD_SIZE + 2 + nullFlags.bytesLength();

      if (enabledStats) {
        this.stats = new TableStatistics(this.schema);
      }
View Full Code Here

      SYNC_INTERVAL =
          conf.getInt(ConfVars.RAWFILE_SYNC_INTERVAL.varname,
              SYNC_SIZE * 100);
      numBitsOfNullFlags = (int) Math.ceil(((double)schema.getColumnNum()));
      nullFlags = new BitArray(numBitsOfNullFlags);
      tupleHeaderSize = nullFlags.bytesLength() + (2 * Short.SIZE/8);
      this.start = fragment.getStartOffset();
      this.end = this.start + fragment.getLength();
    }
View Full Code Here

      tuple = new VTuple(schema.getColumnNum());

      int nullFlagSize = buffer.getShort();
      byte[] nullFlagBytes = new byte[nullFlagSize];
      buffer.get(nullFlagBytes, 0, nullFlagSize);
      nullFlags = new BitArray(nullFlagBytes);
      int tupleSize = buffer.getShort();

      while (buffer.remaining() < (tupleSize)) {
        if (fillBuffer() < 0) {
          return null;
View Full Code Here

      writeHeader();

      buffer = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE);

      numBitsOfNullFlags = (int) Math.ceil(((double)schema.getColumnNum()));
      nullFlags = new BitArray(numBitsOfNullFlags);

      if (enabledStats) {
        this.stats = new TableStatistics(this.schema);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.tajo.util.BitArray

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.