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: 
It's not currently supported, but it would be easy to write a custom `source` using a Spring Integration `inbound-channel-adapter` to invoke a POJO that reads a line at a time.

Please open a [new feature JIRA issue](https://jira.spring.io/browse/XD).

You could also do it with a `job` instead of a `stream` in XD.
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