StephanEwen commented on a change in pull request #7508: [hotfix][docs] Add 
example for the BulkFormat of the StreamingFileSink
URL: https://github.com/apache/flink/pull/7508#discussion_r256823252
 
 

 ##########
 File path: docs/dev/connectors/streamfile_sink.md
 ##########
 @@ -110,12 +110,45 @@ interactions of bucket assigners and rolling policies.
 
 In the above example we used an `Encoder` that can encode or serialize each
 record individually. The streaming file sink also supports bulk-encoded output
-formats such as [Apache Parquet](http://parquet.apache.org). To use these,
-instead of `StreamingFileSink.forRowFormat()` you would use
+formats such as [Apache Parquet](http://parquet.apache.org) or [Apache 
Avro](https://avro.apache.org/).
+To use these, instead of `StreamingFileSink.forRowFormat()` you would use
 `StreamingFileSink.forBulkFormat()` and specify a `BulkWriter.Factory`.
 
-[ParquetAvroWriters]({{ site.javadocs_baseurl 
}}/api/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.html)
-has static methods for creating a `BulkWriter.Factory` for various types.
+<div class="codetabs" markdown="1">
+<div data-lang="java" markdown="1">
+{% highlight java %}
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.formats.parquet.avro.ParquetAvroWriters;
+import 
org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink;
+
+DataStream<RawEvent> input = ...;
+
+StreamingFileSink<RawEvent> sink = StreamingFileSink.forBulkFormat(
+                               new Path(outputPath),
+                               
ParquetAvroWriters.forSpecificRecord(RawEvent.class)
+)
 
 Review comment:
   missing `.build()`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to