【发布时间】:2023-02-01 18:37:10
【问题描述】:
想通过flink源码研究stream原理,需要debug看看效果如何 我已经编译了 Flink 源代码并将项目导入到 Intellij IEDA,但我无法将其作为独立集群运行。我正在使用 JDK 11 和 maven 3.6.3 在 Windows 10 上工作 我将主类设置为
org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint
并从 IDEA 运行它,但我收到了一些警告和异常
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/C:/Users/%e5%88%98%e8%bf%9c%e5%8d%9a/.m2/repository/org/apache/hadoop/hadoop-auth/2.8.5/hadoop-auth-2.8.5.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.shutDownAsync(ClusterEntrypoint.java:586)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:242)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:729)
at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:59)
如何启动 JobManager 并调试它?
我尝试使用 IDE 通过 Flink 源代码启动 JobManager,然后启动任务管理器。我希望我可以调试它们。
【问题讨论】:
标签: debugging intellij-idea apache-flink