RocMarshal commented on a change in pull request #13235:
URL: https://github.com/apache/flink/pull/13235#discussion_r480212421
##########
File path: docs/monitoring/application_profiling.zh.md
##########
@@ -25,58 +25,56 @@ under the License.
* ToC
{:toc}
-## Overview of Custom Logging with Apache Flink
+<a name="overview-of-custom-logging-with-apache-flink"></a>
-Each standalone JobManager, TaskManager, HistoryServer, and ZooKeeper daemon
redirects `stdout` and `stderr` to a file
-with a `.out` filename suffix and writes internal logging to a file with a
`.log` suffix. Java options configured by the
-user in `env.java.opts`, `env.java.opts.jobmanager`,
`env.java.opts.taskmanager`, `env.java.opts.historyserver` and
-`env.java.opts.client` can likewise define log files with
-use of the script variable `FLINK_LOG_PREFIX` and by enclosing the options in
double quotes for late evaluation. Log files
-using `FLINK_LOG_PREFIX` are rotated along with the default `.out` and `.log`
files.
+## Apache Flink 自定义日志概述
-## Profiling with Java Flight Recorder
+每个独立的 JobManager,TaskManager,HistoryServer,ZooKeeper 守护进程都将 `stdout` 和
`stderr` 重定向到名称后缀为 `.out` 的文件,并将其内部的日志记录写入到 `.log` 后缀的文件。用户可以在
`env.java.opts`,`env.java.opts.jobmanager`,`env.java.opts.taskmanager`,`env.java.opts.historyserver`
和 `env.java.opts.client` 配置项中配置 Java 选项(包括 log 相关的选项),同样也可以使用脚本变量
`FLINK_LOG_PREFIX` 定义日志文件,并将选项括在双引号中以供后期使用。日志文件将使用 `FLINK_LOG_PREFIX` 与默认的
`.out` 和 `.log` 后缀一起滚动。
-Java Flight Recorder is a profiling and event collection framework built into
the Oracle JDK.
-[Java Mission
Control](http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html)
-is an advanced set of tools that enables efficient and detailed analysis of
the extensive of data collected by Java
-Flight Recorder. Example configuration:
+<a name="profiling-with-java-flight-recorder"></a>
+
+## 使用 Java Flight Recorder 分析
+
+Java Flight Recorder 是 Oracle JDK 内置的分析和事件收集框架。[Java Mission
Control](http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html)
是一套先进的工具,可以对 Java Flight Recorder 收集的大量数据进行高效和详细的分析。配置示例:
{% highlight yaml %}
env.java.opts: "-XX:+UnlockCommercialFeatures -XX:+UnlockDiagnosticVMOptions
-XX:+FlightRecorder -XX:+DebugNonSafepoints
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=${FLINK_LOG_PREFIX}.jfr"
{% endhighlight %}
-## Profiling with JITWatch
+<a name="profiling-with-jitwatch"></a>
+
+## 使用 JITWatch 分析
-[JITWatch](https://github.com/AdoptOpenJDK/jitwatch/wiki) is a log analyser
and visualizer for the Java HotSpot JIT
-compiler used to inspect inlining decisions, hot methods, bytecode, and
assembly. Example configuration:
+[JITWatch](https://github.com/AdoptOpenJDK/jitwatch/wiki) Java HotSpot JIT
编译器的日志分析器和可视化工具,用于检查内联决策,热方法,字节码和汇编。配置示例:
{% highlight yaml %}
env.java.opts: "-XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading
-XX:+LogCompilation -XX:LogFile=${FLINK_LOG_PREFIX}.jit -XX:+PrintAssembly"
{% endhighlight %}
-## Analyzing Out of Memory Problems
+<a name="analyzing-out-of-memory-problems"></a>
-If you encounter `OutOfMemoryExceptions` with your Flink application, then it
is a good idea to enable heap dumps on out of memory errors.
+## 分析内存溢出问题(Out of Memory Problems)
+
+如果你的 Flink 应用程序遇到 `OutOfMemoryExceptions` ,那么启用在内存不足错误时堆转储是一个好主意。
Review comment:
```suggestion
如果你的 Flink 应用程序遇到 `OutOfMemoryExceptions` ,那么启用在内存溢出错误时堆转储是一个好主意。
```
----------------------------------------------------------------
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]