Login  Register

Re: CarbonWriterBuild issue

Posted by Ajantha Bhat on Sep 20, 2018; 1:13pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/CarbonWriterBuild-issue-tp62361p62922.html

yes,

finally, we can keep 3 API with below signatures.



*buildWriterForCSVInput(carbonSchema)buildWriterForAvroInput(avroSchema)buildWriterForJsonInput(carbonSchema)*

and create new methods for

*a) withThreadSafe(NumOfThreads) b) withHadoopConf(configuration)*

Along with these change, I want to simplify some more API.

1) Below 5 table properties methods can be made private.
so that end user uses only withTableProperties API instead of each separate
API.






*public CarbonWriterBuilder sortBy(String[] sortColumns)public
CarbonWriterBuilder withBlockSize(int blockSize)public CarbonWriterBuilder
localDictionaryThreshold(int localDictionaryThreshold)public
CarbonWriterBuilder enableLocalDictionary(boolean
enableLocalDictionary)public CarbonWriterBuilder withBlockletSize(int
blockletSize)*
this is the exposed API for the above configurations.
*public CarbonWriterBuilder withTableProperties(Map<String, String>
options)*

2) Also at SDK side, name transactional and nontransactional doesn't make
sense.
As long as we don't write the metadata folder, it is always
nonTransactional table at write side.

*public CarbonWriterBuilder isTransactionalTable(boolean
isTransactionalTable)*

can we rename above API to isFlatFolderPath ?
Also, at SDK reader side also we can rename this.
and by default keep flat folder as true.

let me know if any suggestions.

So, that I can go ahead with the changes

Thanks,
AB

On Thu, Sep 13, 2018 at 11:15 AM Ravindra Pesala <[hidden email]>
wrote:

> Yes, should not have this many methods, we will remove those methods and
> add those to builder.
>
> Regards,
> Ravindra.
> On Thu, 13 Sep 2018 at 9:14 AM, xuchuanyin <[hidden email]> wrote:
>
> > Yeah, it actually belongs to 'Builder Pattern'. We should simplify this
> > before they are widely used.
> >
> >
> >
> > --
> > Sent from:
> > http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
> >
>