[ https://issues.apache.org/jira/browse/HIVE-21402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788066#comment-16788066 ]
Peter Vary commented on HIVE-21402: ----------------------------------- [~ashutoshc]: Here is the exception I got: {code:java} 18:04:35.600 [PeterVary-MBP15.local-33] ERROR org.apache.hadoop.hive.ql.txn.compactor.Worker - Caught an exception in the main loop of compactor worker PeterVary-MBP15.local-33, java.lang.NoClassDefFoundError: org/apache/calcite/plan/RelOptRule at org.apache.hadoop.hive.ql.Driver.dumpMetaCallTimingWithoutEx(Driver.java:1022) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:783) at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1905) at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1965) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1788) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1777) at org.apache.hadoop.hive.ql.DriverUtils.runOnDriver(DriverUtils.java:54) at org.apache.hadoop.hive.ql.DriverUtils.runOnDriver(DriverUtils.java:34) at org.apache.hadoop.hive.ql.txn.compactor.CompactorMR.runCrudCompaction(CompactorMR.java:407) at org.apache.hadoop.hive.ql.txn.compactor.CompactorMR.run(CompactorMR.java:249) at org.apache.hadoop.hive.ql.txn.compactor.Worker.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.apache.calcite.plan.RelOptRule at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 11 more {code} > Compaction state remains 'working' when major compaction fails > -------------------------------------------------------------- > > Key: HIVE-21402 > URL: https://issues.apache.org/jira/browse/HIVE-21402 > Project: Hive > Issue Type: Bug > Components: Transactions > Affects Versions: 4.0.0 > Reporter: Peter Vary > Assignee: Peter Vary > Priority: Major > Attachments: HIVE-21402.patch > > > When calcite is not on the HMS classpath, and query based compaction is > enabled then the compaction fails with NoClassDefFound error. Since the catch > block only catches Exceptions the following code block is not executed: > {code:java} > } catch (Exception e) { > LOG.error("Caught exception while trying to compact " + ci + > ". Marking failed to avoid repeated failures, " + > StringUtils.stringifyException(e)); > msc.markFailed(CompactionInfo.compactionInfoToStruct(ci)); > msc.abortTxns(Collections.singletonList(compactorTxnId)); > } > {code} > So the compaction is not set to failed. > Would be better to catch Throwable instead of Exception -- This message was sent by Atlassian JIRA (v7.6.3#76005)