本文基於 Pinpoint 2.1.0 版本java
官方的相關文檔見 https://github.com/pinpoint-apm/pinpoint-docker#flink-configuration-optionalgit
首先咱們須要更改源碼 pinpoint-flink-job 對應的代碼,緣由是這個裏面配置的 ZK是寫死的。咱們須要更改。web
./flink/src/main/resources/profiles/local/hbase.properties
docker
配置咱們線上的 Hbase 使用的ZK 地址apache
hbase.client.host=192.168.80.129 hbase.client.port=2181
./flink/src/main/resources/profiles/local/pinpoint-flink.properties
app
配置咱們線上的 ZK 地址.net
Flink.cluster.enable=true # 這個須要配置未 true 不然會導入失敗 flink.StreamExecutionEnvironment=server flink.cluster.zookeeper.address=192.168.80.129
而後進行編譯,編譯完以後,在 target 找到對應的包下載下來。netty
而後打開 pinpoint-flink-jobmanager
所在的 8081 端口code
在Submit 的地方上傳咱們上面編譯的包 ,而後填入咱們下面的信息加到 entry class
com.navercorp.pinpoint.flink.StatStreamingVer2Job
提交成功
提交失敗
解決導入失敗的問題 issues: https://github.com/pinpoint-apm/pinpoint/issues/4178
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error. at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:545) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:419) at org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:80) at org.apache.flink.client.program.ClusterClient.getOptimizedPlan(ClusterClient.java:318) at org.apache.flink.runtime.webmonitor.handlers.JarActionHandler.getJobGraphAndClassLoader(JarActionHandler.java:72) at org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.handleJsonRequest(JarRunHandler.java:61) at org.apache.flink.runtime.webmonitor.handlers.AbstractJsonRequestHandler.handleRequest(AbstractJsonRequestHandler.java:41) at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandler.respondAsLeader(RuntimeMonitorHandler.java:109) at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandlerBase.channelRead0(RuntimeMonitorHandlerBase.java:97) at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandlerBase.channelRead0(RuntimeMonitorHandlerBase.java:44) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) at io.netty.handler.codec.http.router.Handler.routed(Handler.java:62) at io.netty.handler.codec.http.router.DualAbstractHandler.channelRead0(DualAbstractHandler.java:57) at io.netty.handler.codec.http.router.DualAbstractHandler.channelRead0(DualAbstractHandler.java:20) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRea