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

org.apache.orc.impl.writer

## Class WriterEncryptionVariant

- java.lang.Object
- - org.apache.orc.impl.writer.WriterEncryptionVariant

- All Implemented Interfaces:
    Comparable<EncryptionVariant>, EncryptionVariant

      public class WriterEncryptionVariant
      extends Object
      implements EncryptionVariant

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WriterEncryptionVariant(WriterEncryptionKey key, TypeDescription root, LocalKey columnKey)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEncoding(OrcProto.ColumnEncoding encoding)`
    `void` | `clearEncodings()`
    `void` | `clearFileStatistics()`
    `int` | `compareTo(@NotNull EncryptionVariant other)`
    `boolean` | `equals(Object other)`
    `List<OrcProto.ColumnEncoding>` | `getEncodings()`
    `Key` | `getFileFooterKey()` Get the local key for the footer.
    `OrcProto.FileStatistics` | `getFileStatistics()`
    `WriterEncryptionKey` | `getKeyDescription()` Get the key description for this column.
    `LocalKey` | `getMaterial()`
    `TypeDescription` | `getRoot()` Get the root column for this variant.
    `Key` | `getStripeKey(long stripe)` Get the local key for a stripe's data or footer.
    `int` | `getVariantId()` Get the encryption variant id within the file.
    `int` | `hashCode()`
    `void` | `setId(int id)`

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

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

- - ### Constructor Detail

    - #### WriterEncryptionVariant

          public WriterEncryptionVariant(WriterEncryptionKey key,
                                         TypeDescription root,
                                         LocalKey columnKey)

  - ### Method Detail

    - #### getKeyDescription

          public WriterEncryptionKey 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

    - #### setId

          public void setId(int id)

    - #### 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()

      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

    - #### getStripeKey

          public Key getStripeKey(long stripe)

      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

    - #### getMaterial

          public LocalKey getMaterial()

    - #### clearFileStatistics

          public void clearFileStatistics()

    - #### getFileStatistics

          public OrcProto.FileStatistics getFileStatistics()

    - #### addEncoding

          public void addEncoding(OrcProto.ColumnEncoding encoding)

    - #### getEncodings

          public List<OrcProto.ColumnEncoding> getEncodings()

    - #### clearEncodings

          public void clearEncodings()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### compareTo

          public int compareTo(@NotNull
                               @NotNull EncryptionVariant other)

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

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