From 582da6839d46965401d1353e5a8a9787aa8451e3 Mon Sep 17 00:00:00 2001 From: Carlos Queiroz Date: Mon, 28 Mar 2016 14:15:21 +0800 Subject: [PATCH] Fix delimiter issue. --- .../spring/xd/jdbcgpfdist/gpfdist/GPFDistMessageHandler.java | 2 +- .../io/pivotal/spring/xd/jdbcgpfdist/jdbc/CustomRowMapper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/gpfdist/GPFDistMessageHandler.java b/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/gpfdist/GPFDistMessageHandler.java index 5df572f..779dccc 100644 --- a/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/gpfdist/GPFDistMessageHandler.java +++ b/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/gpfdist/GPFDistMessageHandler.java @@ -90,7 +90,7 @@ protected void doWrite(Message message) throws Exception { String data = (String)payload; log.info("data:" + data); if (delimiter != null) { - processor.onNext(Buffer.wrap(data)); + processor.onNext(Buffer.wrap(data+delimiter)); } else { processor.onNext(Buffer.wrap(data)); } diff --git a/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/jdbc/CustomRowMapper.java b/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/jdbc/CustomRowMapper.java index 1509026..b9f2036 100644 --- a/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/jdbc/CustomRowMapper.java +++ b/src/main/java/io/pivotal/spring/xd/jdbcgpfdist/jdbc/CustomRowMapper.java @@ -30,7 +30,7 @@ public String mapRow(ResultSet resultSet, int i) throws SQLException { sb.append(columnDelimiter); } - String row = sb.append(resultSet.getObject(columnsCount)).append("\t").toString(); + String row = sb.append(resultSet.getObject(columnsCount)).toString(); log.info(row); return row; }