org.apache.storm.hive.bolt.mapper

## Class DelimitedRecordHiveMapper

- java.lang.Object
- - org.apache.storm.hive.bolt.mapper.DelimitedRecordHiveMapper

- All Implemented Interfaces:
    Serializable, HiveMapper

      public class DelimitedRecordHiveMapper
      extends Object
      implements HiveMapper

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelimitedRecordHiveMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hive.hcatalog.streaming.RecordWriter` | `createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint)` Given a endPoint, returns a RecordWriter with columnNames.
    `String` | `getFieldDelimiter()`
    `List<String>` | `mapPartitions(TridentTuple tuple)` Given a TridetnTuple, return a hive partition values list.
    `List<String>` | `mapPartitions(Tuple tuple)` Given a tuple, return a hive partition values list.
    `byte[]` | `mapRecord(TridentTuple tuple)` Given a TridentTuple, maps to a HiveRecord based on columnFields.
    `byte[]` | `mapRecord(Tuple tuple)` Given a tuple, maps to a HiveRecord based on columnFields.
    `DelimitedRecordHiveMapper` | `withColumnFields(Fields columnFields)`
    `DelimitedRecordHiveMapper` | `withFieldDelimiter(String delimiter)`
    `DelimitedRecordHiveMapper` | `withPartitionFields(Fields partitionFields)`
    `DelimitedRecordHiveMapper` | `withTimeAsPartitionField(String timeFormat)`
    `void` | `write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple)`

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

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

- - ### Constructor Detail

    - #### DelimitedRecordHiveMapper

          public DelimitedRecordHiveMapper()

  - ### Method Detail

    - #### withColumnFields

          public DelimitedRecordHiveMapper withColumnFields(Fields columnFields)

    - #### withPartitionFields

          public DelimitedRecordHiveMapper withPartitionFields(Fields partitionFields)

    - #### withFieldDelimiter

          public DelimitedRecordHiveMapper withFieldDelimiter(String delimiter)

    - #### withTimeAsPartitionField

          public DelimitedRecordHiveMapper withTimeAsPartitionField(String timeFormat)

    - #### createRecordWriter

          public org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint)
                                                                             throws org.apache.hive.hcatalog.streaming.StreamingException,
                                                                                    IOException,
                                                                                    ClassNotFoundException

      Description copied from interface: `HiveMapper`

      Given a endPoint, returns a RecordWriter with columnNames.

      Specified by:
        `createRecordWriter` in interface `HiveMapper`
      Throws:
        `org.apache.hive.hcatalog.streaming.StreamingException`
        `IOException`
        `ClassNotFoundException`

    - #### write

          public void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
                            Tuple tuple)
                     throws org.apache.hive.hcatalog.streaming.StreamingException,
                            IOException,
                            InterruptedException

      Specified by:
        `write` in interface `HiveMapper`
      Throws:
        `org.apache.hive.hcatalog.streaming.StreamingException`
        `IOException`
        `InterruptedException`

    - #### mapPartitions

          public List<String> mapPartitions(Tuple tuple)

      Description copied from interface: `HiveMapper`

      Given a tuple, return a hive partition values list.

      Specified by:
        `mapPartitions` in interface `HiveMapper`

    - #### mapPartitions

          public List<String> mapPartitions(TridentTuple tuple)

      Description copied from interface: `HiveMapper`

      Given a TridetnTuple, return a hive partition values list.

      Specified by:
        `mapPartitions` in interface `HiveMapper`

    - #### mapRecord

          public byte[] mapRecord(Tuple tuple)

      Description copied from interface: `HiveMapper`

      Given a tuple, maps to a HiveRecord based on columnFields.

      Specified by:
        `mapRecord` in interface `HiveMapper`

    - #### mapRecord

          public byte[] mapRecord(TridentTuple tuple)

      Description copied from interface: `HiveMapper`

      Given a TridentTuple, maps to a HiveRecord based on columnFields.

      Specified by:
        `mapRecord` in interface `HiveMapper`

    - #### getFieldDelimiter

          public String getFieldDelimiter()

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