pm.retrieveAll(mVerTables); } catch (JDODataStoreException e) { if (e.getCause() instanceof MissingTableException) { throw new MetaException("Version table not found. " + "The metastore is not upgraded to " + MetaStoreSchemaInfoFactory.get(getConf()).getHiveSchemaVersion());
private MSentryVersion getMSentryVersion() throws Exception { return tm.executeTransaction( pm -> { try { Query query = pm.newQuery(MSentryVersion.class); @SuppressWarnings("unchecked") List<MSentryVersion> mSentryVersions = (List<MSentryVersion>) query .execute(); pm.retrieveAll(mSentryVersions); if (mSentryVersions.isEmpty()) { throw new SentryNoSuchObjectException("Matching Version"); } if (mSentryVersions.size() > 1) { throw new SentryAccessDeniedException( "Metastore contains multiple versions"); } return mSentryVersions.get(0); } catch (JDODataStoreException e) { if (e.getCause() instanceof MissingTableException) { throw new SentryAccessDeniedException("Version table not found. " + "The sentry store is not set or corrupt "); } else { throw e; } } }); }
pm.retrieveAll(mVerTables); } catch (JDODataStoreException e) { if (e.getCause() instanceof MissingTableException) { throw new MetaException("Version table not found. " + "The metastore is not upgraded to " + MetaStoreSchemaInfo.getHiveSchemaVersion());
pm.retrieveAll(mVerTables); } catch (JDODataStoreException e) { if (e.getCause() instanceof MissingTableException) { throw new MetaException("Version table not found. " + "The metastore is not upgraded to " + MetaStoreSchemaInfo.getHiveSchemaVersion());
pm.retrieveAll(mVerTables); } catch (JDODataStoreException e) { if (e.getCause() instanceof MissingTableException) { throw new MetaException("Version table not found. " + "The metastore is not upgraded to " + MetaStoreSchemaInfoFactory.get(getConf()).getHiveSchemaVersion());
if (e.getCause() instanceof MissingTableException) { throw new SentryAccessDeniedException("Version table not found. " + "The sentry store is not set or corrupt ");