[ https://issues.apache.org/jira/browse/CARBONDATA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17392791#comment-17392791 ]
ChenKai commented on CARBONDATA-4227: ------------------------------------- Hi [~nihal], thanks for your reply. I think you have a point, it's really confusing to reuse the `builder` object to build different CarbonWriters, but my original intention is to reduce the generation of the `builder` object. It is also possible to do as you suggest, then I will close this issue, thanks. > SDK CarbonWriterBuilder cannot execute `build()` several times with different > output path > ----------------------------------------------------------------------------------------- > > Key: CARBONDATA-4227 > URL: https://issues.apache.org/jira/browse/CARBONDATA-4227 > Project: CarbonData > Issue Type: Bug > Components: core > Affects Versions: 2.1.1 > Reporter: ChenKai > Priority: Major > Time Spent: 2h 10m > Remaining Estimate: 0h > > Sometimes we want to reuse CarbonWriterBuilder object to build CarbonWriter > with different output paths, but it does not work. > For example: > {code:scala} > val builder = CarbonWriter.builder().withCsvInput(...).writtenBy(...) > // 1. first writing with path1 > val writer1 = builder.outputPath(path1).build() > // write data, it works > // 2. second writing with path2 > val writer2 = builder.outputPath(path2).build() > // write data, it does not work. It still writes data to path1 > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)