ReaderEncryptionVariant (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl.reader

## Class ReaderEncryptionVariant

- java.lang.Object
- - org.apache.orc.impl.reader.ReaderEncryptionVariant

- All Implemented Interfaces:
    Comparable<EncryptionVariant>, EncryptionVariant

      public class ReaderEncryptionVariant
      extends Object
      implements EncryptionVariant

  Information about an encrypted column.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(@NotNull EncryptionVariant other)`
    `boolean` | `equals(Object other)`
    `Key` | `getFileFooterKey()` Get the local key for the footer.
    `ReaderEncryptionKey` | `getKeyDescription()` Get the key description for this column.
    `TypeDescription` | `getRoot()` Get the root column for this variant.
    `Key` | `getStripeKey(long stripe)` Get the local key for a stripe's data or footer.
    `List<StripeStatistics>` | `getStripeStatistics(boolean[] columns, InStream.StreamOptions compression, ReaderImpl reader)` Decrypt the raw data and return the list of the stripe statistics for this variant.
    `long` | `getStripeStatisticsLength()`
    `int` | `getVariantId()` Get the encryption variant id within the file.
    `int` | `hashCode()`

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

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

- - ### Method Detail

    - #### getKeyDescription

          public ReaderEncryptionKey getKeyDescription()

      Description copied from interface: `EncryptionVariant`
      Get the key description for this column. This description is global to the file and is passed to the KeyProvider along with various encrypted local keys for the stripes or file footer so that it can decrypt them.
      Specified by:
        `getKeyDescription` in interface `EncryptionVariant`
      Returns:
        the encryption key description

    - #### getRoot

          public TypeDescription getRoot()

      Description copied from interface: `EncryptionVariant`
      Get the root column for this variant.
      Specified by:
        `getRoot` in interface `EncryptionVariant`
      Returns:
        the root column type

    - #### getVariantId

          public int getVariantId()

      Description copied from interface: `EncryptionVariant`
      Get the encryption variant id within the file.
      Specified by:
        `getVariantId` in interface `EncryptionVariant`

    - #### getFileFooterKey

          public Key getFileFooterKey()
                               throws IOException

      Description copied from interface: `EncryptionVariant`
      Get the local key for the footer.
      Specified by:
        `getFileFooterKey` in interface `EncryptionVariant`
      Returns:
        the local decrypted key or null if it isn't available
      Throws:
        `IOException`

    - #### getStripeKey

          public Key getStripeKey(long stripe)
                           throws IOException

      Description copied from interface: `EncryptionVariant`
      Get the local key for a stripe's data or footer.
      Specified by:
        `getStripeKey` in interface `EncryptionVariant`
      Parameters:
        `stripe` - the stripe within the file (0 to N-1)
      Returns:
        the local decrypted key or null if it isn't available
      Throws:
        `IOException`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### compareTo

          public int compareTo(@NotNull
                               @NotNull EncryptionVariant other)

      Specified by:
        `compareTo` in interface `Comparable<EncryptionVariant>`

    - #### getStripeStatisticsLength

          public long getStripeStatisticsLength()

    - #### getStripeStatistics

          public List<StripeStatistics> getStripeStatistics(boolean[] columns,
                                                            InStream.StreamOptions compression,
                                                            ReaderImpl reader)
                                                     throws IOException

      Decrypt the raw data and return the list of the stripe statistics for this variant.
      Parameters:
        `columns` - true for the columns that should be included
        `compression` - the compression options
      Returns:
        the stripe statistics for this variant.
      Throws:
        `IOException`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.