HiveException: xx with newer attempt ID 1 is smaller than the file xx with with older attempt ID 0

版本:HDP3.1.4 Hive3.1.0

异常描述:

java.io.IOException: File hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_1 with newer attempt ID 1 is smaller than the file hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_0 with older attempt ID 0)'
13929: 2021-04-09 10:24:43.608 | com.bx.slave.entity.JobTask.runJob(436) | org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: File hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_1 with newer attempt ID 1 is smaller than the file hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_0 with older attempt ID 0
13930: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1402)
13931: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:798)
13932: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:803)
13933: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:803)
13934: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.tez.TezTask.close(TezTask.java:584)
13935: 2021-04-09 10:24:43.608 | at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:321)
13936: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
13937: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:103)
13938: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2712)
13939: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2383)
13940: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2055)
13941: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1753)
13942: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1747)
13943: 2021-04-09 10:24:43.609 | at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
13944: 2021-04-09 10:24:43.609 | at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:226)
13945: 2021-04-09 10:24:43.609 | at org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
13946: 2021-04-09 10:24:43.609 | at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:324)
13947: 2021-04-09 10:24:43.609 | at java.security.AccessController.doPrivileged(Native Method)
13948: 2021-04-09 10:24:43.609 | at javax.security.auth.Subject.doAs(Subject.java:422)
13949: 2021-04-09 10:24:43.609 | at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
13950: 2021-04-09 10:24:43.609 | at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:342)
13951: 2021-04-09 10:24:43.609 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
13952: 2021-04-09 10:24:43.609 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
13953: 2021-04-09 10:24:43.610 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
13954: 2021-04-09 10:24:43.610 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
13955: 2021-04-09 10:24:43.610 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
13956: 2021-04-09 10:24:43.610 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
13957: 2021-04-09 10:24:43.610 | at java.lang.Thread.run(Thread.java:748)
13958: 2021-04-09 10:24:43.610 | Caused by: java.io.IOException: File hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_1 with newer attempt ID 1 is smaller than the file hdfs://cluster/tmp/hive/.hive-staging_hive_2021-04-09_10-08-47_704_718343819133902574-25365/_tmp.-ext-10002.moved/000316_0 with older attempt ID 0

重试文件的大小可能和压缩格式和写入顺序有关系,所以在校验id和文件大小的方式不恰当,因此去掉文件大小校验

源码地址:Utilities.java   

compareTempOrDuplicateFiles

PATCH地址:
https://issues.apache.org/jira/browse/HIVE-23354

(可以关闭mr和hive的推测执行,应用patch1)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 当出现“文件可能已损坏或是使用较新版本的Unity序列化”错误时,通常是由于以下几种情况造成的: 1. 文件损坏:文件在传输或保存过程中可能遭受了损坏。在这种情况下,会导致Unity无法正确读取或解析文件内容。 解决方法:尝试从备份或可信源中获取备份文件,以确保文件完整无损。也可以尝试使用文件修复工具来修复损坏的文件。 2. Unity版本不兼容:文件是使用较新版本的Unity进行序列化的,而当前打开的Unity版本较旧,无法正确解析文件内容。 解决方法:升级Unity到与文件创建时使用的版本相匹配的版本。或者,尝试联系文件的创建者,询问文件使用的Unity版本,并使用相应的版本进行操作。在Unity编辑器中,您可以通过“Help”>“About Unity”来查看当前Unity版本。 3. 扩展或外部工具的兼容性:如果文件是通过使用Unity的扩展或外部工具进行序列化的,而当前的Unity环境没有正确配置或加载这些扩展或工具,也会导致该错误。 解决方法:确保使用的扩展或外部工具与当前Unity版本兼容,并且已正确配置和加载。可以尝试更新或重新安装相关的扩展或外部工具,并确保其完全符合当前Unity环境的要求。 总之,当出现“文件可能已损坏或是使用较新版本的Unity序列化”错误时,我们需要确定文件的完整性、Unity版本以及相关的扩展或外部工具的兼容性,并相应地采取适当的措施来解决该错误。 ### 回答2: 当您在使用Unity软件打开一个文件时,出现“file may be corrupted or was serialized with a newer version of unity”这个错误消息,可能有两个原因。 首先,文件可能已经损坏。这可能是由于文件在传输过程中被意外中断、存储设备出现故障或者在保存过程中出现错误等。在这种情况下,您可以尝试使用备份文件(如果有的话)或者尝试修复损坏的文件。如果无法修复,您可能需要联系文件的创建者以获取一个新的文件。 其次,该文件可能是使用Unity的更新版本序列化的。Unity软件经常会发布更新版本,这些版本可能会对文件的结构和格式进行更改。如果您的Unity版本与文件序列化时使用的版本不兼容,您将收到此错误消息。要解决此问题,您需要确保您的Unity软件版本与文件序列化时使用的版本相同或更高。如果您的Unity版本较低,您可能需要升级Unity软件以支持该文件。 总而言之,当您遇到“file may be corrupted or was serialized with a newer version of unity”错误消息时,您应该首先尝试修复损坏的文件,如果无法修复,则需要确保使用与文件序列化时相同或较高的Unity版本打开该文件。 ### 回答3: 当Unity打开或导入某个文件时,有时会出现“file may be corrupted or was serialized with a newer version of unity”(文件可能已损坏或是使用新版本Unity序列化的)的报错提示。这种报错一般有以下几种可能原因: 1. 导入的Unity文件版本不兼容:Unity的不同版本之间可能存在一些不兼容的问题。如果你尝试导入一个较新版本Unity创建的文件到旧版本Unity中,就很可能出现该报错。解决方法是升级Unity到与文件创建版本相匹配的版本,或者重新导入文件并确保使用与文件创建版本相同的Unity版本。 2. 文件损坏:文件可能在导出或存储过程中出现错误,导致文件损坏。这可能是由于磁盘错误、中断的存储过程或其他异常情况引起。解决方法是尝试使用备份文件或重新从原始源获取文件。 3. 引擎版本不一致:如果在项目中同时使用多个Unity引擎版本,不同的引擎版本之间可能会存在一些不兼容性。尝试使用与文件创建版本相同的引擎版本打开文件,或者将文件导入到使用相同引擎版本的新项目中。 4. 官方插件或第三方插件不兼容:某些官方或第三方插件可能无法与某些Unity版本兼容,从而导致文件打开时出错。解决方法是升级或卸载不兼容的插件,或者尝试使用兼容的Unity版本重新导入文件。 总之,在遇到“file may be corrupted or was serialized with a newer version of unity”报错时,我们应该确认文件的兼容性、文件是否损坏以及Unity引擎及插件的版本是否一致,以找到解决问题的方法。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值