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); } } }
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); } } }
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); } } }
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); } } }
private void fireMetaStoreAddPartitionEvent(final RawStore ms, final Partition part, final EnvironmentContext envContext, boolean success) throws MetaException { final Table tbl = ms.getTable(part.getDbName(), part.getTableName()); for (MetaStoreEventListener listener : listeners) { AddPartitionEvent addPartitionEvent = new AddPartitionEvent(tbl, part, success, this); addPartitionEvent.setEnvironmentContext(envContext); listener.onAddPartition(addPartitionEvent); } }
@Override public void onAddPartition(AddPartitionEvent partitionEvent) throws MetaException { // don't sync path if the operation has failed if (!partitionEvent.getStatus()) { LOGGER.debug("Skip syncing path with Sentry server for onAddPartition event," + " since the operation failed. \n"); return; } for (Partition part : partitionEvent.getPartitions()) { if (part.getSd() != null && part.getSd().getLocation() != null) { String authzObj = part.getDbName() + "." + part.getTableName(); String path = part.getSd().getLocation(); for (SentryMetastoreListenerPlugin plugin : sentryPlugins) { plugin.addPath(authzObj, path); } } } super.onAddPartition(partitionEvent); }
new AddPartitionEvent(tbl, part, success, this); addPartitionEvent.setEnvironmentContext(envContext); listener.onAddPartition(addPartitionEvent);
new AddPartitionEvent(tbl, part, success, this); addPartitionEvent.setEnvironmentContext(envContext); listener.onAddPartition(addPartitionEvent);
new AddPartitionEvent(tbl, part, success, this); addPartitionEvent.setEnvironmentContext(envContext); listener.onAddPartition(addPartitionEvent);