Question: I have a stream that watch output of multi file in a directory, process data and put it to HDFS. Here is my stream creat command: 

```
stream create --name fileHdfs --definition "file --dir=/var/log/supervisor/ --pattern=tracker.out-*.log --outputType=text/plain | logHdfsTransformer | hdfs --fsUri=hdfs://192.168.1.115:8020 --directory=/data/log/appsync --fileName=log --partitionPath=path(dateFormat('yyyy/MM/dd'))" --deploy

```

Problem is source:file module send all data read from file to log processing module instead of one line each turn, becase of that, payload string have millions of char, i can't process it. Ex:

```
--- PAYLOAD LENGTH---- 9511284

```

Please tell me how to read line by line when use source:file module, thanks !!!

Answer: 
I know that this may be late, but for any googlers out there looking for the solution:

Even though there is no module or option that does it automatically, it's as simple as adding a splitter that separates the incoming message into multiple outgoing messages.

Please note that you have to decide between using \n and \r\n. Check your files to see what they're using.

Example:

```
stream create --name filetest --definition "file --outputType=text/plain --dir=/tmp/examplefiles/| splitter --expression=payload.split('\\n') | log" --deploy

```

Cheers!
you can try using the **--mode=lines** option while deploying the stream. 
Please check below documentation reference : <http://docs.spring.io/spring-xd/docs/current/reference/html/#file>

Hope this helps!

Cheers, 
Pratik