apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkatesh Kottapalli <venkat...@datatorrent.com>
Subject Re: Default value for tupleSeperator
Date Sat, 13 Aug 2016 05:34:59 GMT
Yes Yogi.

What you pointed is one such example, another example for similar case would be CSVFormatter
and AbstractFileOutputOperator combination. If we go with default values two new lines get
inserted here as well.

What I meant before is to have the line delimiter as it is because these two operators might
not be combined all the time. When such case arise, the user can always configure empty string
as delimiter in the operator he would prefer to.


> On Aug 12, 2016, at 10:08 PM, Yogi Devendra <devendra.vyavahare@gmail.com> wrote:
> @Venkatesh
> Yes. Property is configurable by the end user.
> But, we are saying that better to have meaningful defaults where ever
> possible.
> ~ Yogi
> On 13 August 2016 at 08:39, Vlad Rozov <v.rozov@datatorrent.com> wrote:
>> StringFileOutput should default to empty. It should be possible to send
>> multiple strings to a file without every new string being on a new line.
>> Possibly a better option will be to have a separate operator that inserts
>> necessary delimiters as csvformatter may be connected to jdbc output
>> operator and should not insert new lines after each tuple. That brings
>> overall design question: is it better to compose dag from multiple
>> operators or overload each operator functionality with extra features. IMO,
>> composition is better.
>> Thank you,
>> Vlad
>> Отправлено с iPhone
>>> On Aug 12, 2016, at 19:09, Venkatesh Kottapalli <
>> venkatesh@datatorrent.com> wrote:
>>> IMO, since we have an option to configure the line delimiter, leaving it
>> to the user is a good idea as there might be cases where either one of them
>> is used and not both.
>>> -Venkatesh.
>>>> On Aug 12, 2016, at 6:29 PM, Yogi Devendra <yogidevendra@apache.org>
>> wrote:
>>>> Hi,
>>>> Currently, for the usecases involving writing POJO to file output we use
>>>> DAG simillar to following:
>>>> POJOEmittingOperator->CSVFormatter->StringFileOutputOperator.
>>>> Both CSVFormatter as well as StringFileOutputOperator have
>>>> configurable tupleSeperator defaulting to newline. This introduces two
>>>> newlines for every tuple. We should make one of the defaults to empty
>>>> string and the other to be newline.
>>>> Any opinions on which default should be empty string?
>>>> ~ Yogi

View raw message