From 3f463319453d52bb9e37450c8848429bb45009b7 Mon Sep 17 00:00:00 2001 From: judy0131 Date: Fri, 1 Mar 2019 14:44:54 +0800 Subject: [PATCH] fix TextFileStream bug --- .../api/HTTPClientStartFlowStreaming.scala | 56 ++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/piflow-server/src/main/scala/cn/piflow/api/HTTPClientStartFlowStreaming.scala b/piflow-server/src/main/scala/cn/piflow/api/HTTPClientStartFlowStreaming.scala index eb38b17..25bca1f 100644 --- a/piflow-server/src/main/scala/cn/piflow/api/HTTPClientStartFlowStreaming.scala +++ b/piflow-server/src/main/scala/cn/piflow/api/HTTPClientStartFlowStreaming.scala @@ -12,7 +12,7 @@ object HTTPClientStartFlowStreaming { """ |{ | "flow":{ - | "name":"TextFileStream", + | "name":"kafkaStreaming", | "uuid":"1234", | "stops":[ | { @@ -62,7 +62,7 @@ object HTTPClientStartFlowStreaming { | } |} """.stripMargin*/ - val json= + /*val json= """ |{ | "flow":{ @@ -114,6 +114,58 @@ object HTTPClientStartFlowStreaming { | ] | } |} + """.stripMargin*/ + val json = + """ + |{ + | "flow":{ + | "name":"TextFileStream", + | "uuid":"1234", + | "stops":[ + | { + | "uuid":"1111", + | "name":"TextFileStream", + | "bundle":"cn.piflow.bundle.streaming.TextFileStream", + | "properties":{ + | "directory":"hdfs://10.0.86.89:9000/textfilestream" + | } + | + | }, + | { + | "uuid":"2222", + | "name":"ConvertSchema", + | "bundle":"cn.piflow.bundle.common.ConvertSchema", + | "properties":{ + | "schema":"value->line" + | } + | }, + | { + | "uuid":"3333", + | "name":"CsvSave", + | "bundle":"cn.piflow.bundle.csv.CsvSave", + | "properties":{ + | "csvSavePath":"hdfs://10.0.86.89:9000/xjzhu/flowStreaming", + | "header":"true", + | "delimiter":"," + | } + | } + | ], + | "paths":[ + | { + | "from":"TextFileStream", + | "outport":"", + | "inport":"", + | "to":"ConvertSchema" + | }, + | { + | "from":"ConvertSchema", + | "outport":"", + | "inport":"", + | "to":"CsvSave" + | } + | ] + | } + |} """.stripMargin val url = "http://10.0.86.98:8001/flow/start" val client = HttpClients.createDefault()