tison,你好运行到这里时,报空指针 Caused by: java.lang.NullPointerException at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getNodeReports(YarnClientImpl.java:506)
getNodeReports方法中: GetClusterNodesResponse response = rmClient.getClusterNodes(request); 这句的rmClient为null值。 我看YarnClientImpl中,有个start()可为rmClient赋值,但是,我加上此方法执行时又会报以下错误: Exception in thread "main" org.apache.hadoop.service.ServiceStateException: org.apache.hadoop.yarn.client.api.impl.YarnClientImpl cannot enter state STARTED from state NOTINITED at org.apache.hadoop.service.ServiceStateModel.checkStateTransition(ServiceStateModel.java:129) at org.apache.hadoop.service.ServiceStateModel.enterState(ServiceStateModel.java:111) at org.apache.hadoop.service.AbstractService.start(AbstractService.java:190) 在 2020-03-07 11:15:10,"tison" <wander4...@gmail.com> 写道: >不成功的报错是啥? > >Best, >tison. > > >nicygan <read3...@163.com> 于2020年3月7日周六 上午11:14写道: > >> dear all: >> >> 我用的flink版本1.9,现在我把flinksql语句生成了jobGroph,现在我不知道如何提交到yarn上,以pre-job方式运行。我尝试通过生成 >> yarnClusterDescriptor提交代码,但不成功,代码大致如下,各位有没有成功示例求分享。 >> >> ...... >> JobGraph jobGraph = env.getStreamGraph("StreamSql").getJobGraph(); >> ...... >> ...... >> yarnClusterDescriptor.deployJobCluster( >> clusterSpecification, >> jobGraph, true); >> >>