org.apache.storm.hdfs.trident.format

## Class DelimitedRecordFormat

- java.lang.Object
- - org.apache.storm.hdfs.trident.format.DelimitedRecordFormat

- All Implemented Interfaces:
    Serializable, RecordFormat

      public class DelimitedRecordFormat
      extends Object
      implements RecordFormat

  RecordFormat implementation that uses field and record delimiters. By default uses a comma (“,”) as the field delimiter and a newline (“\n”) as the record delimiter.

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_FIELD_DELIMITER`
    `static String` | `DEFAULT_RECORD_DELIMITER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelimitedRecordFormat()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `format(TridentTuple tuple)`
    `DelimitedRecordFormat` | `withFieldDelimiter(String delimiter)` Overrides the default field delimiter.
    `DelimitedRecordFormat` | `withFields(Fields fields)` Only output the specified fields.
    `DelimitedRecordFormat` | `withRecordDelimiter(String delimiter)` Overrides the default record delimiter.

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

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

- - ### Field Detail

    - #### DEFAULT_FIELD_DELIMITER

          public static final String DEFAULT_FIELD_DELIMITER

      See Also:
        Constant Field Values

    - #### DEFAULT_RECORD_DELIMITER

          public static final String DEFAULT_RECORD_DELIMITER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DelimitedRecordFormat

          public DelimitedRecordFormat()

  - ### Method Detail

    - #### withFields

          public DelimitedRecordFormat withFields(Fields fields)

      Only output the specified fields.

    - #### withFieldDelimiter

          public DelimitedRecordFormat withFieldDelimiter(String delimiter)

      Overrides the default field delimiter.

    - #### withRecordDelimiter

          public DelimitedRecordFormat withRecordDelimiter(String delimiter)

      Overrides the default record delimiter.

    - #### format

          public byte[] format(TridentTuple tuple)

      Specified by:
        `format` in interface `RecordFormat`

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