@Override public void onAlterPartition(AlterPartitionEvent ape) throws MetaException { if (ape.getStatus()) { Partition before = ape.getOldPartition(); Partition after = ape.getNewPartition(); String topicName = getTopicName(ape.getTable()); send(messageFactory.buildAlterPartitionMessage(ape.getTable(),before, after, ape.getWriteId()), topicName); } }
Assert.assertTrue(alterPartEvent.getStatus()); validateAlterPartition(origP, origP, alterPartEvent.getOldPartition().getDbName(), alterPartEvent.getOldPartition().getTableName(),
@Override public void onAlterPartition(AlterPartitionEvent ape) throws MetaException { if (ape.getStatus()) { Partition before = ape.getOldPartition(); Partition after = ape.getNewPartition(); String topicName = getTopicName(ape.getTable()); send(messageFactory.buildAlterPartitionMessage(ape.getTable(),before, after), topicName); } }
@Override public void onAlterPartition(AlterPartitionEvent ape) throws MetaException { if (ape.getStatus()) { Partition before = ape.getOldPartition(); Partition after = ape.getNewPartition(); String topicName = getTopicName(ape.getTable()); send(messageFactory.buildAlterPartitionMessage(ape.getTable(),before, after), topicName); } }
@Override public void onAlterPartition(AlterPartitionEvent ape) throws MetaException { if (ape.getStatus()) { Partition before = ape.getOldPartition(); Partition after = ape.getNewPartition(); String topicName = getTopicName(ape.getTable()); send(messageFactory.buildAlterPartitionMessage(ape.getTable(),before, after), topicName); } }
@Override public void onAlterPartition(AlterPartitionEvent partitionEvent) throws MetaException { // don't sync privileges if the operation has failed if (!partitionEvent.getStatus()) { LOGGER.debug("Skip syncing privileges with Sentry server for onAlterPartition event," + " since the operation failed. \n"); return; } String oldLoc = null, newLoc = null; if (partitionEvent.getOldPartition() != null) { oldLoc = partitionEvent.getOldPartition().getSd().getLocation(); } if (partitionEvent.getNewPartition() != null) { newLoc = partitionEvent.getNewPartition().getSd().getLocation(); } if (oldLoc != null && newLoc != null && !oldLoc.equals(newLoc)) { String authzObj = partitionEvent.getOldPartition().getDbName() + "." + partitionEvent.getOldPartition().getTableName(); for (SentryMetastoreListenerPlugin plugin : sentryPlugins) { plugin.renameAuthzObject(authzObj, oldLoc, authzObj, newLoc); } } }