OrcStruct (ORC MapReduce 1.2.1 API)
Date: 2016-10-19

org.apache.orc.mapred

## Class OrcStruct

- java.lang.Object
- - org.apache.orc.mapred.OrcStruct

- All Implemented Interfaces:
    Comparable<OrcStruct>, Writable, WritableComparable<OrcStruct>

      public final class OrcStruct
      extends Object
      implements WritableComparable<OrcStruct>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrcStruct(TypeDescription schema)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(OrcStruct other)`
    `static WritableComparable` | `createValue(TypeDescription type)`
    `boolean` | `equals(Object other)`
    `WritableComparable` | `getFieldValue(int fieldIndex)`
    `WritableComparable` | `getFieldValue(String fieldName)`
    `int` | `getNumFields()`
    `TypeDescription` | `getSchema()` Get the schema for this object.
    `int` | `hashCode()`
    `void` | `readFields(DataInput input)`
    `void` | `setAllFields(WritableComparable... values)` Set all of the fields in the struct
    `void` | `setFieldValue(int fieldIndex, WritableComparable value)`
    `void` | `setFieldValue(String fieldName, WritableComparable value)`
    `String` | `toString()`
    `void` | `write(DataOutput output)`

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

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

- - ### Constructor Detail

    - #### OrcStruct

          public OrcStruct(TypeDescription schema)

  - ### Method Detail

    - #### getFieldValue

          public WritableComparable getFieldValue(int fieldIndex)

    - #### setFieldValue

          public void setFieldValue(int fieldIndex,
                                    WritableComparable value)

    - #### getNumFields

          public int getNumFields()

    - #### write

          public void write(DataOutput output)
                     throws IOException

      Specified by:
        `write` in interface `Writable`
      Throws:
        `IOException`

    - #### readFields

          public void readFields(DataInput input)
                          throws IOException

      Specified by:
        `readFields` in interface `Writable`
      Throws:
        `IOException`

    - #### getSchema

          public TypeDescription getSchema()

      Get the schema for this object.
      Returns:
        the schema object

    - #### setAllFields

          public void setAllFields(WritableComparable... values)

      Set all of the fields in the struct
      Parameters:
        `values` - the list of values for each of the fields.

    - #### setFieldValue

          public void setFieldValue(String fieldName,
                                    WritableComparable value)

    - #### getFieldValue

          public WritableComparable getFieldValue(String fieldName)

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### createValue

          public static WritableComparable createValue(TypeDescription type)

    - #### compareTo

          public int compareTo(OrcStruct other)

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

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