DiskRangeList (Hive Storage API 2.1.1-pre-orc API)
Date: 2016-10-19

org.apache.hadoop.hive.common.io

## Class DiskRangeList

- java.lang.Object
- - org.apache.hadoop.hive.common.io.DiskRange
  - - org.apache.hadoop.hive.common.io.DiskRangeList

- Direct Known Subclasses:
    DiskRangeList.MutateHelper

      public class DiskRangeList
      extends DiskRange

  Java linked list iterator interface is convoluted, and moreover concurrent modifications of the same list by multiple iterators are impossible. Hence, this. Java also doesn't support multiple inheritance, so this cannot be done as "aspect"...

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DiskRangeList.CreateHelper`
    `static class` | `DiskRangeList.MutateHelper` List in-place mutation helper - a bogus first element that is inserted before list head, and thus remains constant even if head is replaced with some new range via in-place list mutation.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `DiskRangeList` | `next`
    `DiskRangeList` | `prev`

    - ### Fields inherited from class org.apache.hadoop.hive.common.io.DiskRange

      `end, offset`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DiskRangeList(long offset, long end)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getTotalLength()`
    `boolean` | `hasContiguousNext()`
    `DiskRangeList` | `insertAfter(DiskRangeList other)` Inserts an element after current in the list.
    `DiskRangeList` | `insertPartAfter(DiskRangeList other)` Inserts an intersecting range after current in the list and adjusts offset accordingly.
    `DiskRangeList` | `insertPartBefore(DiskRangeList other)` Inserts an intersecting range before current in the list and adjusts offset accordingly.
    `int` | `listSize()`
    `DiskRangeList[]` | `listToArray()`
    `void` | `removeAfter()` Removes an element after current from the list.
    `void` | `removeSelf()` Removes the current element from the list.
    `DiskRangeList` | `replaceSelfWith(DiskRangeList other)` Replaces this element with another in the list; returns the new element.
    `DiskRangeList` | `split(long cOffset)` Splits current element in the list, using DiskRange::slice

    - ### Methods inherited from class org.apache.hadoop.hive.common.io.DiskRange

      `equalRange, equals, getData, getEnd, getLength, getOffset, hasData, hashCode, merge, sliceAndShift, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### prev

          public DiskRangeList prev

    - #### next

          public DiskRangeList next

  - ### Constructor Detail

    - #### DiskRangeList

          public DiskRangeList(long offset,
                               long end)

  - ### Method Detail

    - #### replaceSelfWith

          public DiskRangeList replaceSelfWith(DiskRangeList other)

      Replaces this element with another in the list; returns the new element.

    - #### insertPartBefore

          public DiskRangeList insertPartBefore(DiskRangeList other)

      Inserts an intersecting range before current in the list and adjusts offset accordingly.
      Returns:
        the new element.

    - #### insertAfter

          public DiskRangeList insertAfter(DiskRangeList other)

      Inserts an element after current in the list.
      Returns:
        the new element.

    - #### insertPartAfter

          public DiskRangeList insertPartAfter(DiskRangeList other)

      Inserts an intersecting range after current in the list and adjusts offset accordingly.
      Returns:
        the new element.

    - #### removeAfter

          public void removeAfter()

      Removes an element after current from the list.

    - #### removeSelf

          public void removeSelf()

      Removes the current element from the list.

    - #### split

          public final DiskRangeList split(long cOffset)

      Splits current element in the list, using DiskRange::slice

    - #### hasContiguousNext

          public boolean hasContiguousNext()

    - #### listSize

          public int listSize()

    - #### getTotalLength

          public long getTotalLength()

    - #### listToArray

          public DiskRangeList[] listToArray()

Copyright © 2016 The Apache Software Foundation. All rights reserved.