Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problems encountered in the process of flink development

2025-03-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to solve the problems encountered in the development process of flink". In daily operation, I believe many people have doubts about how to solve the problems encountered in the development process of flink. Xiaobian consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts of "how to solve the problems encountered in the development process of flink"! Next, please follow the small series to learn together!

class transition exception

cannot be cast to com.google.protobuf.Message

Caused by: java.lang.ClassCastException: org.apache.hadoop.yarn.proto.YarnServiceProtos$RegisterApplicationMasterRequestProto cannot be cast to com.google.protobuf.Message

at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:227)

at com.sun.proxy.$ Proxy14.registerApplicationMaster(Unknown Source)

at org.apache.hadoop.yarn.api.impl.pb.client.ApplicationMasterProtocolPBClientImpl.registerApplicationMaster(ApplicationMasterProtocolPBClientImpl.java:106)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:256)

at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:104)

at com.sun.proxy.$ Proxy15.registerApplicationMaster(Unknown Source)

at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.registerApplicationMaster(AMRMClientImpl.java:222)

at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.registerApplicationMaster(AMRMClientImpl.java:214)

at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl.registerApplicationMaster(AMRMClientAsyncImpl.java:138)

at org.apache.flink.yarn.YarnResourceManager.createAndStartResourceManagerClient(YarnResourceManager.java:205)

at org.apache.flink.yarn.YarnResourceManager.initialize(YarnResourceManager.java:234)

... 11 common frames omitted

This kind of problem generally occurs when deploying flink program to yarn cluster, because flink will load jar package under hadoop when starting, and add it to its own classpath. If the jar package version of hadoop is inconsistent with that of its own flink project, this problem will be caused. Solution: exclude hadoop-related jars in your own project, and do not type them in when packaging.

org.apache.hadoop

hadoop-common

${hadoop.version}

provided

Note that it is possible that you did not explicitly import jars such as hadoop-common and hadoop-hdfs, but you imported jars from hbase, because hbase will import jars related to hdfs, which will cause similar errors.

local class incompatibleorg.apache.flink.table.api.StreamQueryConfig; local class incompatible: stream classdesc serialVersionUID = XXX, local class serialVersionUID = -XXX

When submitting a flink program, if this happens, it is usually caused by jar package conflicts, which may be caused by a jar conflict or inconsistent scala versions. For example, the scala version of your flink cluster is 2.11, and the scala version of your program is 2.12.

At this point, the study of "how to solve the problems encountered in the development process of flink" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report