private void alterPartitionForTruncate(RawStore ms, String catName, String dbName, String tableName, Table table, Partition partition, String validWriteIds, long writeId) throws Exception { EnvironmentContext environmentContext = new EnvironmentContext(); updateStatsForTruncate(partition.getParameters(), environmentContext); if (!transactionalListeners.isEmpty()) { MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(partition, partition, table, true, true, writeId, this)); } if (!listeners.isEmpty()) { MetaStoreListenerNotifier.notifyEvent(listeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(partition, partition, table, true, true, writeId, this)); } if (writeId > 0) { partition.setWriteId(writeId); } alterHandler.alterPartition(ms, wh, catName, dbName, tableName, null, partition, environmentContext, this, validWriteIds); }
new AlterPartitionEvent(oldPart, newPart, tbl, false, true, newPart.getWriteId(), handler), environmentContext);
new AlterPartitionEvent(oldPart, new_part, table, false, true, new_part.getWriteId(), this), envContext);
MetaStoreListenerNotifier.notifyEvent(listeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(oldTmpPart, tmpPart, table, false, true, writeId, this));
MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventMessage.EventType.ALTER_PARTITION, new AlterPartitionEvent(oldPart, new_part, tbl, false, true, new_part.getWriteId(), handler), environmentContext); MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventMessage.EventType.ALTER_PARTITION, new AlterPartitionEvent(oldPart, new_part, tbl, false, true, new_part.getWriteId(), handler), environmentContext);
/** * Insert a thrift audit log entry that represents renaming a partition. * * @param hmsHandler the HMSHandler for the event * @param oldPartition the old partition name * @param newPartition the new partition name * @param hiveConf Hive configuration * @throws Exception if there's an error inserting into the audit log */ public static void insertThriftRenamePartitionLogEntry( HiveMetaStore.HMSHandler hmsHandler, Partition oldPartition, Partition newPartition, HiveConf hiveConf) throws Exception { final MetastoreAuditLogListener metastoreAuditLogListener = new MetastoreAuditLogListener(hiveConf); AlterPartitionEvent event = new AlterPartitionEvent( oldPartition, newPartition, true, hmsHandler ); metastoreAuditLogListener.onAlterPartition(event); }
/** * Insert a thrift audit log entry that represents renaming a partition. * * @param hmsHandler the HMSHandler for the event * @param oldPartition the old partition name * @param newPartition the new partition name * @param hiveConf Hive configuration * @throws Exception if there's an error inserting into the audit log */ public static void insertThriftRenamePartitionLogEntry( HiveMetaStore.HMSHandler hmsHandler, Partition oldPartition, Partition newPartition, HiveConf hiveConf) throws Exception { final MetastoreAuditLogListener metastoreAuditLogListener = new MetastoreAuditLogListener(hiveConf); AlterPartitionEvent event = new AlterPartitionEvent( oldPartition, newPartition, true, hmsHandler ); metastoreAuditLogListener.onAlterPartition(event); }
private void alterPartitionForTruncate(final RawStore ms, final String catName, final String dbName, final String tableName, final Table table, final Partition partition) throws Exception { EnvironmentContext environmentContext = new EnvironmentContext(); updateStatsForTruncate(partition.getParameters(), environmentContext); if (!transactionalListeners.isEmpty()) { MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(partition, partition, table, true, true, this)); } if (!listeners.isEmpty()) { MetaStoreListenerNotifier.notifyEvent(listeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(partition, partition, table, true, true, this)); } alterHandler.alterPartition(ms, wh, catName, dbName, tableName, null, partition, environmentContext, this); }
MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventMessage.EventType.ALTER_PARTITION, new AlterPartitionEvent(oldPart, newPart, tbl, false, true, handler));
new AlterPartitionEvent(oldPart, new_part, true, this); alterPartitionEvent.setEnvironmentContext(envContext); listener.onAlterPartition(alterPartitionEvent);
new AlterPartitionEvent(oldTmpPart, tmpPart, true, this); listener.onAlterPartition(alterPartitionEvent);
new AlterPartitionEvent(oldTmpPart, tmpPart, table, true, this); listener.onAlterPartition(alterPartitionEvent);
new AlterPartitionEvent(oldPart, new_part, table, false, true, this), envContext);
MetaStoreListenerNotifier.notifyEvent(listeners, EventType.ALTER_PARTITION, new AlterPartitionEvent(oldTmpPart, tmpPart, table, false, true, this));
new AlterPartitionEvent(oldPart, new_part, table, true, this); alterPartitionEvent.setEnvironmentContext(envContext); listener.onAlterPartition(alterPartitionEvent);
new AlterPartitionEvent(oldTmpPart, tmpPart, table, true, this); listener.onAlterPartition(alterPartitionEvent);
MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventMessage.EventType.ALTER_PARTITION, new AlterPartitionEvent(oldPart, new_part, tbl, false, true, handler), environmentContext); MetaStoreListenerNotifier.notifyEvent(transactionalListeners, EventMessage.EventType.ALTER_PARTITION, new AlterPartitionEvent(oldPart, new_part, tbl, false, true, handler), environmentContext);
new AlterPartitionEvent(oldPart, new_part, table, true, this); alterPartitionEvent.setEnvironmentContext(envContext); listener.onAlterPartition(alterPartitionEvent);
AlterPartitionEvent event = new AlterPartitionEvent( oldPartition, newPartition,