Class CSVMessageDecoder
- java.lang.Object
-
- org.apache.pinot.plugin.inputformat.csv.CSVMessageDecoder
-
- All Implemented Interfaces:
StreamMessageDecoder<byte[]>
public class CSVMessageDecoder extends Object implements StreamMessageDecoder<byte[]>
-
-
Field Summary
Fields Modifier and Type Field Description static StringIGNORE_EMPTY_LINESstatic StringIGNORE_SURROUNDING_SPACESstatic StringNULL_STRING_VALUEstatic StringQUOTE_CHARACTERstatic StringQUOTE_MODEstatic StringRECORD_SEPARATORstatic StringSKIP_HEADER-
Fields inherited from interface org.apache.pinot.spi.stream.StreamMessageDecoder
RECORD_EXTRACTOR_CONFIG_CONFIG_KEY, RECORD_EXTRACTOR_CONFIG_KEY
-
-
Constructor Summary
Constructors Constructor Description CSVMessageDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericRowdecode(byte[] payload, int offset, int length, GenericRow destination)GenericRowdecode(byte[] payload, GenericRow destination)voidinit(Map<String,String> props, Set<String> fieldsToRead, String topicName)
-
-
-
Field Detail
-
NULL_STRING_VALUE
public static final String NULL_STRING_VALUE
- See Also:
- Constant Field Values
-
SKIP_HEADER
public static final String SKIP_HEADER
- See Also:
- Constant Field Values
-
IGNORE_EMPTY_LINES
public static final String IGNORE_EMPTY_LINES
- See Also:
- Constant Field Values
-
IGNORE_SURROUNDING_SPACES
public static final String IGNORE_SURROUNDING_SPACES
- See Also:
- Constant Field Values
-
QUOTE_CHARACTER
public static final String QUOTE_CHARACTER
- See Also:
- Constant Field Values
-
QUOTE_MODE
public static final String QUOTE_MODE
- See Also:
- Constant Field Values
-
RECORD_SEPARATOR
public static final String RECORD_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Map<String,String> props, Set<String> fieldsToRead, String topicName) throws Exception
- Specified by:
initin interfaceStreamMessageDecoder<byte[]>- Throws:
Exception
-
decode
public GenericRow decode(byte[] payload, GenericRow destination)
- Specified by:
decodein interfaceStreamMessageDecoder<byte[]>
-
decode
public GenericRow decode(byte[] payload, int offset, int length, GenericRow destination)
- Specified by:
decodein interfaceStreamMessageDecoder<byte[]>
-
-