dianfu commented on a change in pull request #13232: URL: https://github.com/apache/flink/pull/13232#discussion_r486172462
########## File path: docs/dev/python/datastream-api-users-guide/dependency_management.md ########## @@ -0,0 +1,113 @@ +--- +title: "Dependency Management" +nav-parent_id: python_datastream_api +nav-pos: 40 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Java Dependency + +If third-party Java dependencies are used, you can specify the dependencies with the following Python DataStream APIs or +through [command line arguments]({% link ops/cli.md %}#usage) directly when submitting the job. + +{% highlight python %} +# Use the add_jars() to add local jars and the jars will be uploaded to the cluster. +# NOTE: Only local file URLs (start with "file://") are supported. +stream_execution_environment.add_jars("file:///my/jar/path/connector.jar", ...) + +# Use the add_classpaths() to add the dependent jars URL into the classpath. And the URL will also be added to the classpath of the cluster. +# NOTE: The Paths must specify a protocol (e.g. file://) and users should ensure that the URLs are accessible on both the client and the cluster. +stream_execution_environment.add_classpaths("file:///my/jar/path/connector.jar", ...) +{% endhighlight %} +**Note** These APIs can be called multiple times. + +# Python Dependency + +If third-party Python dependencies are used, Users can specify the dependencies with the following Python DataStream Review comment: ```suggestion If third-party Python dependencies are used, you can specify the dependencies with the following Python DataStream ``` ########## File path: docs/dev/python/datastream-api-users-guide/dependency_management.md ########## @@ -0,0 +1,113 @@ +--- +title: "Dependency Management" +nav-parent_id: python_datastream_api +nav-pos: 40 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Java Dependency + +If third-party Java dependencies are used, you can specify the dependencies with the following Python DataStream APIs or +through [command line arguments]({% link ops/cli.md %}#usage) directly when submitting the job. + +{% highlight python %} +# Use the add_jars() to add local jars and the jars will be uploaded to the cluster. +# NOTE: Only local file URLs (start with "file://") are supported. +stream_execution_environment.add_jars("file:///my/jar/path/connector.jar", ...) + +# Use the add_classpaths() to add the dependent jars URL into the classpath. And the URL will also be added to the classpath of the cluster. +# NOTE: The Paths must specify a protocol (e.g. file://) and users should ensure that the URLs are accessible on both the client and the cluster. +stream_execution_environment.add_classpaths("file:///my/jar/path/connector.jar", ...) +{% endhighlight %} +**Note** These APIs can be called multiple times. Review comment: ```suggestion **Note:** These APIs can be called multiple times. ``` ---------------------------------------------------------------- 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: [email protected]
