New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-18927][python][doc] Add Debugging document in Python Table API #13171
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 9474e60 (Mon Aug 17 09:33:40 UTC 2020) ✅no warnings Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some engilish grammar suggestions.
docs/dev/table/python/debugging.md
Outdated
You can take use of Logging module of Python to print infos in Python UDF. e.g. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can take use of Logging module of Python to print infos in Python UDF. e.g. | |
Python UDFs can log contextual and debug information via standard Python logging modules. | |
docs/dev/table/python/debugging.md
Outdated
If you set the environment variable `FLINK_HOME`, logs will be placed in the log directory under `FLINK_HOME`. | ||
Otherwise, logs will be placed in the directory of PyFlink module. You can execute following command to find | ||
the log directory of PyFlink module: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set the environment variable `FLINK_HOME`, logs will be placed in the log directory under `FLINK_HOME`. | |
Otherwise, logs will be placed in the directory of PyFlink module. You can execute following command to find | |
the log directory of PyFlink module: | |
If the environment variable `FLINK_HOME` is set, logs will be written in the log directory under `FLINK_HOME`. | |
Otherwise, logs will be placed in the directory of the PyFlink module. You can execute the following command to find | |
the log directory of PyFlink module: |
9474e60
to
577e982
Compare
Thanks a lot for @sjwiesman review. I have addressed the comments at the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding debugging hints, @HuangXingBo, this is really useful! Left some minor suggestions/corrections.
|
||
If the environment variable `FLINK_HOME` is set, logs will be written in the log directory under `FLINK_HOME`. | ||
Otherwise, logs will be placed in the directory of the PyFlink module. You can execute the following command to find | ||
the log directory of PyFlink module: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the log directory of PyFlink module: | |
the log directory of the PyFlink module: |
|
||
{% endhighlight %} | ||
|
||
## Debug Python UDF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Debug Python UDF | |
## Debugging Python UDFs |
{% endhighlight %} | ||
|
||
## Debug Python UDF | ||
You can take use of the pydevd_pycharm tool of PyCharm to debug Python UDF. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can take use of the pydevd_pycharm tool of PyCharm to debug Python UDF. | |
You can make use of the [`pydevd_pycharm`](https://pypi.org/project/pydevd-pycharm/) tool of PyCharm to debug Python UDFs. |
|
||
run -> Python Remote Debug -> + -> choose a port (e.g. 6789) | ||
|
||
2. Install pydevd-pycharm tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Install pydevd-pycharm tool | |
2. Install the `pydevd-pycharm` tool |
pydevd_pycharm.settrace('localhost', port=6789, stdoutToServer=True, stderrToServer=True) | ||
``` | ||
|
||
4. Start the previous created Python Remote Debug Server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. Start the previous created Python Remote Debug Server | |
4. Start the previously created Python Remote Debug Server |
|
||
{% endhighlight %} | ||
|
||
## Watching Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Watching Logs | |
## Accessing Logs |
7df5c7a
to
1e3c218
Compare
@morsapaes Thanks a lot for your review, I have addressed the comments at the latest |
@sjwiesman It would be great if you could take a look at the latest PR. Thanks a lot~ |
Merging |
What is the purpose of the change
This pull request will add Debugging doc in Python Table API
Brief change log
Verifying this change
execute the script build_docs.sh
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation