mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 00:22:05 +08:00
fix
This commit is contained in:
parent
21ad5d0bf0
commit
1b3eb9c016
@ -125,7 +125,7 @@ public class DorisStreamLoadObserver {
|
|||||||
private byte[] addRows(List<byte[]> rows, int totalBytes) {
|
private byte[] addRows(List<byte[]> rows, int totalBytes) {
|
||||||
if (Keys.StreamLoadFormat.CSV.equals(options.getStreamLoadFormat())) {
|
if (Keys.StreamLoadFormat.CSV.equals(options.getStreamLoadFormat())) {
|
||||||
Map<String, Object> props = (options.getLoadProps() == null ? new HashMap<> () : options.getLoadProps());
|
Map<String, Object> props = (options.getLoadProps() == null ? new HashMap<> () : options.getLoadProps());
|
||||||
byte[] lineDelimiter = DelimiterParser.parse((String)props.get("row_delimiter"), "\n").getBytes(StandardCharsets.UTF_8);
|
byte[] lineDelimiter = DelimiterParser.parse((String)props.get("line_delimiter"), "\n").getBytes(StandardCharsets.UTF_8);
|
||||||
ByteBuffer bos = ByteBuffer.allocate(totalBytes + rows.size() * lineDelimiter.length);
|
ByteBuffer bos = ByteBuffer.allocate(totalBytes + rows.size() * lineDelimiter.length);
|
||||||
for (byte[] row : rows) {
|
for (byte[] row : rows) {
|
||||||
bos.put(row);
|
bos.put(row);
|
||||||
|
Loading…
Reference in New Issue
Block a user