阅读背景:

腾讯云提示invalid pos, pos is bigger than filesize! pos: 0, file_size: 0错误

来源:互联网 

腾讯云提示invalid pos, pos is bigger than filesize! pos: 0, file_size: 0错误

起因

使用hdfs dfs -text xxx命令提示下面错误,使用ls可以看到其文件大小为0

```slf4j: see https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

17/11/23 11:30:39 INFO cosnative.NativeCosFileSystem: Opening 'cosn://abc/_TEST' for reading

17/11/23 11:30:39 ERROR cosnative.NativeCosFileSystem: invalid pos, pos is bigger than filesize! pos: 0, file_size: 0

text: invalid pos, pos is bigger than filesize! pos: 0, file_size: 0

```

后续

出于好奇,尝试在Hadoop上创建了空文件,再使用text去查看内容,不会出现同样的问题


分享到: