Hi Ravi,

Thanks for your response. But your example is for *forBulkForma**t*. How
about  *forRowFormat* ?.

Regards,
Vijay

On Tue, Jul 28, 2020 at 11:28 AM Ravi Bhushan Ratnakar <
ravibhushanratna...@gmail.com> wrote:

> Hi Vijayendra,
>
> You could achieve row encoded with like this as well
>
> codecName = "org.apache.hadoop.io.compress.GzipCodec"
>
> val streamingFileSink:StreamingFileSink[String] = 
> StreamingFileSink.forBulkFormat(new 
> Path(outputPath),CompressWriters.forExtractor(new 
> DefaultExtractor[String]).withHadoopCompression(codecName)).build()
>
> Regards,
> Ravi
>
> On Tue, Jul 28, 2020 at 8:03 PM Vijayendra Yadav <contact....@gmail.com>
> wrote:
>
>> Hi Team,
>>
>> Is there a way to enable compression in StreamingFileSink API for
>> Row-encoded formats ?.
>>
>> val sink: StreamingFileSink[String] = StreamingFileSink
>>     .forRowFormat(new Path(outputPath), new
>> SimpleStringEncoder[String]("UTF-8"))
>>
>>
>> Regards,
>> Vijay
>>
>

Reply via email to