public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
private void firePreEvent(PreEventContext event) throws MetaException { for (MetaStorePreEventListener listener : preListeners) { try { listener.onEvent(event); } catch (NoSuchObjectException e) { throw new MetaException(e.getMessage()); } catch (InvalidOperationException e) { throw new MetaException(e.getMessage()); } } }
throw new HiveException("Unable to rename partition. " + e.getMessage(), e); } catch (MetaException e) { throw new HiveException("Unable to rename partition. " + e.getMessage(), e);
db.alterIndex(baseTableName, indexName, idx); } catch (InvalidOperationException e) { console.printError("Invalid alter operation: " + e.getMessage()); LOG.info("alter index: " + stringifyException(e)); return 1;
throw new HiveException("Unable to rename partition. " + e.getMessage(), e); } catch (MetaException e) { throw new HiveException("Unable to rename partition. " + e.getMessage(), e);
db.alterTable(tbl.getDbName()+"."+tbl.getTableName(),tbl,null); } catch (InvalidOperationException e) { throw new HiveException("Unable to alter table. " + e.getMessage(), e);
assertTrue("Table not found", ioe.getMessage().contains("null tables"));
public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
private void firePreEvent(PreEventContext event) throws MetaException { for (MetaStorePreEventListener listener : preListeners) { try { listener.onEvent(event); } catch (NoSuchObjectException e) { throw new MetaException(e.getMessage()); } catch (InvalidOperationException e) { throw new MetaException(e.getMessage()); } } }
private void firePreEvent(PreEventContext event) throws MetaException { for (MetaStorePreEventListener listener : preListeners) { try { listener.onEvent(event); } catch (NoSuchObjectException e) { throw new MetaException(e.getMessage()); } catch (InvalidOperationException e) { throw new MetaException(e.getMessage()); } } }
private void firePreEvent(PreEventContext event) throws MetaException { for (MetaStorePreEventListener listener : preListeners) { try { listener.onEvent(event); } catch (NoSuchObjectException e) { throw new MetaException(e.getMessage()); } catch (InvalidOperationException e) { throw new MetaException(e.getMessage()); } } }
private void firePreEvent(PreEventContext event) throws MetaException { for (MetaStorePreEventListener listener : preListeners) { try { listener.onEvent(event); } catch (NoSuchObjectException e) { throw new MetaException(e.getMessage()); } catch (InvalidOperationException e) { throw new MetaException(e.getMessage()); } } }
/** * {@inheritDoc}. */ @Override public void delete(final ConnectorRequestContext requestContext, final QualifiedName name) { try { this.metacatHiveClient.dropDatabase(name.getDatabaseName()); } catch (NoSuchObjectException exception) { throw new DatabaseNotFoundException(name, exception); } catch (MetaException exception) { throw new InvalidMetaException(name, exception); } catch (InvalidOperationException exception) { throw new MetacatNotSupportedException(exception.getMessage()); } catch (TException exception) { throw new ConnectorException(String.format("Failed delete hive database %s", name), exception); } }
/** * {@inheritDoc}. */ @Override public void delete(final ConnectorRequestContext requestContext, final QualifiedName name) { try { this.metacatHiveClient.dropDatabase(name.getDatabaseName()); } catch (NoSuchObjectException exception) { throw new DatabaseNotFoundException(name, exception); } catch (MetaException exception) { throw new InvalidMetaException(name, exception); } catch (InvalidOperationException exception) { throw new MetacatNotSupportedException(exception.getMessage()); } catch (TException exception) { throw new ConnectorException(String.format("Failed delete hive database %s", name), exception); } }
throw new HiveException("Unable to rename partition. " + e.getMessage(), e); } catch (MetaException e) { throw new HiveException("Unable to rename partition. " + e.getMessage(), e);
db.alterIndex(baseTableName, indexName, idx); } catch (InvalidOperationException e) { console.printError("Invalid alter operation: " + e.getMessage()); LOG.info("alter index: " + stringifyException(e)); return 1;
private int alterIndex(Hive db, AlterIndexDesc alterIndex) throws HiveException { String dbName = alterIndex.getDbName(); String baseTableName = alterIndex.getBaseTableName(); String indexName = alterIndex.getIndexName(); Index idx = db.getIndex(dbName, baseTableName, indexName); if (alterIndex.getOp() == AlterIndexDesc.AlterIndexTypes.ADDPROPS) { idx.getParameters().putAll(alterIndex.getProps()); } else { console.printError("Unsupported Alter commnad"); return 1; } // set last modified by properties if (!updateModifiedParameters(idx.getParameters(), conf)) { return 1; } try { db.alterIndex(dbName, baseTableName, indexName, idx); } catch (InvalidOperationException e) { console.printError("Invalid alter operation: " + e.getMessage()); LOG.info("alter index: " + stringifyException(e)); return 1; } catch (HiveException e) { console.printError("Invalid alter operation: " + e.getMessage()); return 1; } return 0; }
db.alterTable(tbl.getDbName()+"."+tbl.getTableName(),tbl); } catch (InvalidOperationException e) { throw new HiveException("Unable to alter table. " + e.getMessage(), e);