diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index c71a453..41c9f08 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -510,4 +510,16 @@ public void endFunction(String function, MetaStoreEndFunctionContext context) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } + // + // This is a temporary workaround for the following unresolved bug: + // https://issues.apache.org/jira/browse/HIVE-5457 + // + // Killing myself so that I don't end up failing more jobs. + if (context.getException() instanceof MetaException) { + MetaException ex = (MetaException)context.getException(); + if (ex.getCause() instanceof org.datanucleus.exceptions.NucleusException) { + LOG.fatal("HiveMetastore hit NucleusException. Killing myself.", ex); + System.exit(1); + } + } } @Override