我是靠谱客的博主 大意水杯,最近开发中收集的这篇文章主要介绍线上flink任务重启报错(Hadoop问题)java.lang.NumberFormatException: For input string: “30s“,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

线上Flink任务重启时,提交任务失败,具体报错如下:

2021-12-31 18:09:19
java.lang.NumberFormatException: For input string: "30s"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Long.parseLong(Long.java:589)
	at java.lang.Long.parseLong(Long.java:631)
	at org.apache.hadoop.conf.Configuration.getLong(Configuration.java:1441)
	at org.apache.hadoop.hdfs.client.impl.DfsClientConf.<init>(DfsClientConf.java:250)
	at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:303)
	at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:287)
	at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:159)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3242)
	at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:121)
	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3291)
	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3259)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:470)
	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:356)
	at org.apache.iceberg.hadoop.Util.getFs(Util.java:51)
	at org.apache.iceberg.hadoop.HadoopOutputFile.fromPath(HadoopOutputFile.java:53)
	at org.apache.iceberg.hadoop.HadoopFileIO.newOutputFile(HadoopFileIO.java:64)
	at org.apache.iceberg.io.OutputFileFactory.newOutputFile(OutputFileFactory.java:120)
	at org.apache.iceberg.io.BaseTaskWriter$BaseRollingWriter.openCurrent(BaseTaskWriter.java:264)
	at org.apache.iceberg.io.BaseTaskWriter$BaseRollingWriter.<init>(BaseTaskWriter.java:231)
	at org.apache.iceberg.io.BaseTaskWriter$BaseRollingWriter.<init>(BaseTaskWriter.java:221)
	at org.apache.iceberg.io.BaseTaskWriter$RollingFileWriter.<init>(BaseTaskWriter.java:303)
	at org.apache.iceberg.io.UnpartitionedWriter.<init>(UnpartitionedWriter.java:33)
	at org.apache.iceberg.flink.sink.RowDataTaskWriterFactory.create(RowDataTaskWriterFactory.java:89)
	at org.apache.iceberg.flink.sink.IcebergStreamWriter.open(IcebergStreamWriter.java:59)
	at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:433)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:545)
	at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:535)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:575)
	at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:758)
	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:573)
	at java.lang.Thread.run(Thread.java:748)

解决方案:
在hdfs-site.xml中新增配置后

<property>
    <name>dfs.client.datanode-restart.timeout</name>
    <value>30</value>
</property>

问题解决

最后

以上就是大意水杯为你收集整理的线上flink任务重启报错(Hadoop问题)java.lang.NumberFormatException: For input string: “30s“的全部内容,希望文章能够帮你解决线上flink任务重启报错(Hadoop问题)java.lang.NumberFormatException: For input string: “30s“所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(34)

评论列表共有 0 条评论

立即
投稿
返回
顶部