listener.onDropPartition(null);
LoadPartitionDoneEvent lpde = new LoadPartitionDoneEvent(true, tbl, partName, this); for (MetaStoreEventListener transactionalListener : transactionalListeners) { transactionalListener.onLoadPartitionDone(lpde); listener.onLoadPartitionDone(new LoadPartitionDoneEvent(true, tbl, partName, this));
/** * Internal function to notify listeners for meta config change events */ private void notifyMetaListeners(String key, String oldValue, String newValue) throws MetaException { for (MetaStoreEventListener listener : listeners) { listener.onConfigChange(new ConfigChangeEvent(this, key, oldValue, newValue)); } if (transactionalListeners.size() > 0) { // All the fields of this event are final, so no reason to create a new one for each // listener ConfigChangeEvent cce = new ConfigChangeEvent(this, key, oldValue, newValue); for (MetaStoreEventListener transactionalListener : transactionalListeners) { transactionalListener.onConfigChange(cce); } } }
private void fireMetaStoreAddPartitionEvent(final Table tbl, final List<Partition> parts, final EnvironmentContext envContext, boolean success) throws MetaException { if (tbl != null && parts != null && !parts.isEmpty()) { AddPartitionEvent addPartitionEvent = new AddPartitionEvent(tbl, parts, success, this); addPartitionEvent.setEnvironmentContext(envContext); for (MetaStoreEventListener listener : listeners) { listener.onAddPartition(addPartitionEvent); } } }
new AlterPartitionEvent(oldPart, new_part, true, this); alterPartitionEvent.setEnvironmentContext(envContext); listener.onAlterPartition(alterPartitionEvent);
listener.onCreateDatabase(new CreateDatabaseEvent(db, success, this));
new AlterTableEvent(oldt, newTable, success, this); alterTableEvent.setEnvironmentContext(envContext); listener.onAlterTable(alterTableEvent);
DropTableEvent dropTableEvent = new DropTableEvent(tbl, success, this); dropTableEvent.setEnvironmentContext(envContext); listener.onDropTable(dropTableEvent);
new CreateTableEvent(tbl, success, this); createTableEvent.setEnvironmentContext(envContext); listener.onCreateTable(createTableEvent);
listener.onDropDatabase(new DropDatabaseEvent(db, success, this));
private void fireMetaStoreAddPartitionEvent(final Table tbl, final List<Partition> parts, final EnvironmentContext envContext, boolean success) throws MetaException { if (tbl != null && parts != null && !parts.isEmpty()) { AddPartitionEvent addPartitionEvent = new AddPartitionEvent(tbl, parts, success, this); addPartitionEvent.setEnvironmentContext(envContext); for (MetaStoreEventListener listener : listeners) { listener.onAddPartition(addPartitionEvent); } } }
listener.onAlterPartition(alterPartitionEvent);
listener.onCreateDatabase(new CreateDatabaseEvent(db, success, this));
new AlterTableEvent(oldt, newTable, success, this); alterTableEvent.setEnvironmentContext(envContext); listener.onAlterTable(alterTableEvent);
DropTableEvent dropTableEvent = new DropTableEvent(tbl, success, deleteData, this); dropTableEvent.setEnvironmentContext(envContext); listener.onDropTable(dropTableEvent);
new CreateTableEvent(tbl, success, this); createTableEvent.setEnvironmentContext(envContext); listener.onCreateTable(createTableEvent);
listener.onDropDatabase(new DropDatabaseEvent(db, success, this));
@Override public void onDropPartition(DropPartitionEvent partitionEvent) throws MetaException { // don't sync path if the operation has failed if (!partitionEvent.getStatus()) { LOGGER.debug("Skip syncing path with Sentry server for onDropPartition event," + " since the operation failed. \n"); return; } String authzObj = partitionEvent.getTable().getDbName() + "." + partitionEvent.getTable().getTableName(); String path = partitionEvent.getPartition().getSd().getLocation(); for (SentryMetastoreListenerPlugin plugin : sentryPlugins) { plugin.removePath(authzObj, path); } super.onDropPartition(partitionEvent); }
private void fireMetaStoreAddPartitionEvent(final Table tbl, final PartitionSpecProxy partitionSpec, final EnvironmentContext envContext, boolean success) throws MetaException { if (tbl != null && partitionSpec != null) { AddPartitionEvent addPartitionEvent = new AddPartitionEvent(tbl, partitionSpec, success, this); addPartitionEvent.setEnvironmentContext(envContext); for (MetaStoreEventListener listener : listeners) { listener.onAddPartition(addPartitionEvent); } } }
LoadPartitionDoneEvent lpde = new LoadPartitionDoneEvent(true, tbl, partName, this); for (MetaStoreEventListener transactionalListener : transactionalListeners) { transactionalListener.onLoadPartitionDone(lpde); listener.onLoadPartitionDone(new LoadPartitionDoneEvent(true, tbl, partName, this));