Package org.apache.hadoop.hive.ql.io.slice

Examples of org.apache.hadoop.hive.ql.io.slice.Slice


   * Ensure that the given index is valid.
   */
  protected void grow(int index) {
    if ((index * literalSize) + (literalSize - 1) >= data.length()) {
      int newSize = Math.max((index * literalSize) + defaultSize, 2 * data.length());
      Slice newSlice = Slices.allocate(newSize);
      newSlice.setBytes(0, data);
      setData(newSlice);
    }
  }
View Full Code Here


   * Ensure that the given index is valid.
   */
  private void grow(int index) {
    if (index >= data.length()) {
      int newSize = Math.max(index + DEFAULT_SIZE, 2 * data.length());
      Slice newSlice = Slices.allocate(newSize);
      newSlice.setBytes(0, data);
      data = newSlice;
    }
  }
View Full Code Here

   * Ensure that the given index is valid.
   */
  private void grow(int index) {
    if ((index * SizeOf.SIZE_OF_INT) + (SizeOf.SIZE_OF_INT - 1) >= data.length()) {
      int newSize = Math.max((index * SizeOf.SIZE_OF_INT) + DEFAULT_SIZE, 2 * data.length());
      Slice newSlice = Slices.allocate(newSize);
      newSlice.setBytes(0, data);
      data = newSlice;
    }
  }
View Full Code Here

   * Ensure that the given index is valid.
   */
  private void grow(int index) {
    if ((index * SizeOf.SIZE_OF_LONG) + (SizeOf.SIZE_OF_LONG - 1) >= data.length()) {
      int newSize = Math.max((index * SizeOf.SIZE_OF_LONG) + DEFAULT_SIZE, 2 * data.length());
      Slice newSlice = Slices.allocate(newSize);
      newSlice.setBytes(0, data);
      data = newSlice;
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.io.slice.Slice

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.