Rijo Joseph created HIVE-26050: ---------------------------------- Summary: Hive reads fails via clients like Trino after compaction failure Key: HIVE-26050 URL: https://issues.apache.org/jira/browse/HIVE-26050 Project: Hive Issue Type: Bug Reporter: Rijo Joseph
When compactions fail on hive 3.1.2, it is for some reason creating an empty metadata file which is causing the reader to fail with `{*}_No content to map to Object due to end of input_{*}` while checking for the state of compaction. Looks like there should be a validation of the content of the file is empty of not before mapping here [https://github.com/apache/hive/blob/8190d2be7b7165effa62bd21b7d60ef81fb0e4af/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java#L1679] ? {code:java} // Caused by: java.io.EOFException: No content to map to Object due to end of input at io.trino.hive.$internal.org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2775) at io.trino.hive.$internal.org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718) at io.trino.hive.$internal.org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909) at org.apache.hadoop.hive.ql.io.AcidUtils$MetaDataFile.isCompacted(AcidUtils.java:1679) at org.apache.hadoop.hive.ql.io.AcidUtils.isValidBase(AcidUtils.java:1142) at org.apache.hadoop.hive.ql.io.AcidUtils.getChildState(AcidUtils.java:1175) at org.apache.hadoop.hive.ql.io.AcidUtils.getAcidState(AcidUtils.java:1019) at org.apache.hadoop.hive.ql.io.AcidUtils.getAcidState(AcidUtils.java:978) at io.trino.plugin.hive.BackgroundHiveSplitLoader.lambda$loadPartition$4(BackgroundHiveSplitLoader.java:502) at io.trino.plugin.hive.authentication.NoHdfsAuthentication.doAs(NoHdfsAuthentication.java:25) at io.trino.plugin.hive.HdfsEnvironment.doAs(HdfsEnvironment.java:97) at io.trino.plugin.hive.BackgroundHiveSplitLoader.loadPartition(BackgroundHiveSplitLoader.java:502) at io.trino.plugin.hive.BackgroundHiveSplitLoader.loadSplits(BackgroundHiveSplitLoader.java:352) at io.trino.plugin.hive.BackgroundHiveSplitLoader$HiveSplitLoaderTask.process(BackgroundHiveSplitLoader.java:276) ... 6 more {code} Also, not sure why an empty metadata file is getting created in case of failure to compaction. -- This message was sent by Atlassian Jira (v8.20.1#820001)