dianfu commented on a change in pull request #17206:
URL: https://github.com/apache/flink/pull/17206#discussion_r705009381



##########
File path: flink-python/pyflink/datastream/stream_execution_environment.py
##########
@@ -462,6 +462,23 @@ def get_stream_time_characteristic(self) -> 
'TimeCharacteristic':
         j_characteristic = 
self._j_stream_execution_environment.getStreamTimeCharacteristic()
         return TimeCharacteristic._from_j_time_characteristic(j_characteristic)
 
+    def configure(self, configuration: Configuration):
+        """
+        Sets all relevant options contained in the 
:class:`~pyflink.common.Configuration`. such as
+        e.g. `pipeline.time-characteristic`. It will reconfigure
+        :class:`~pyflink.datastream.StreamExecutionEnvironment`,
+        :class:`~pyflink.common.ExecutionConfig` and 
:class:`~pyflink.datastream.CheckpointConfig`.
+
+        It will change the value of a setting only if a corresponding option 
was set in the
+        `configuration`. If a key is not present, the current value of a field 
will remain
+        untouched.
+

Review comment:
       .. versionadded:: 1.15.0

##########
File path: flink-python/pyflink/datastream/stream_execution_environment.py
##########
@@ -462,6 +462,23 @@ def get_stream_time_characteristic(self) -> 
'TimeCharacteristic':
         j_characteristic = 
self._j_stream_execution_environment.getStreamTimeCharacteristic()
         return TimeCharacteristic._from_j_time_characteristic(j_characteristic)
 
+    def configure(self, configuration: Configuration):
+        """
+        Sets all relevant options contained in the 
:class:`~pyflink.common.Configuration`. such as
+        e.g. `pipeline.time-characteristic`. It will reconfigure
+        :class:`~pyflink.datastream.StreamExecutionEnvironment`,
+        :class:`~pyflink.common.ExecutionConfig` and 
:class:`~pyflink.datastream.CheckpointConfig`.
+
+        It will change the value of a setting only if a corresponding option 
was set in the
+        `configuration`. If a key is not present, the current value of a field 
will remain
+        untouched.
+
+        :param configuration: a configuration to read the values from.
+        """
+        
self._j_stream_execution_environment.configure(configuration._j_configuration,

Review comment:
       `get_gateway().jvm.Thread.currentThread().getContextClassLoader()` could 
be removed.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to