You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/18 02:21:20 UTC

[GitHub] [flink] shuiqiangchen commented on a change in pull request #13156: [FLINK-18949][python] Support Streaming File Sink for Python DataStream API

shuiqiangchen commented on a change in pull request #13156:
URL: https://github.com/apache/flink/pull/13156#discussion_r471874945



##########
File path: flink-python/pyflink/common/serialization.py
##########
@@ -365,3 +365,27 @@ def __init__(self, record_class: str = None, avro_schema_string: str = None):
             j_serialization_schema = JAvroRowSerializationSchema(avro_schema_string)
 
         super(AvroRowSerializationSchema, self).__init__(j_serialization_schema)
+
+
+class Encoder(object):
+    """
+    A `Encoder` is used by the streaming file sink to perform the actual writing
+    of the incoming elements to the files in a bucket.
+    """
+
+    def __init__(self, j_encoder):
+        self.j_encoder = j_encoder

Review comment:
       For extensibility, it would be better to support passing a fully-qualified class name of user defined java encoder. In the future, we can provide such a common util for this series of constructors that uses either can pass a string or a java object. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org