chaiyongqiang created FLINK-12979:
-------------------------------------

             Summary: Sending data to kafka with CsvRowSerializationSchema 
always adding a "\n", "\r","\r\n" at the end of the message
                 Key: FLINK-12979
                 URL: https://issues.apache.org/jira/browse/FLINK-12979
             Project: Flink
          Issue Type: Bug
          Components: API / Type Serialization System
    Affects Versions: 1.8.0, 1.8.1, 1.8.2, 1.9.0, 2.0.0
            Reporter: chaiyongqiang


When sending data to kafka using CsvRowSerializationSchema, the 
CsvRowSerializationSchema#serialize method helps generating value for 
KafkaRecord,  which will call  CsvEncoder#endRow and in which  a 
_cfgLineSeparator will be added at the end of KafkaRecord.value.

But For  CsvRowSerializationSchema#Builder , when you calling the mothod 
setLineDelimiter only "\n","\r","\r\n" could be used as the parameter.  

It's not friendly when you want to send a message "123,pingpong,21:00" to kafka 
but kafka receives a message  "123,pingpong,21:00\r\n".

I'm not sure about the reason for limitting the lineDelimiter to 
"\n","\r","\r\n" ? In previous version and jackson-databind, there's no limits 
on lineDelimiter. 

But at least it should let the application developer to set LineDelimiter with 
"".




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to