Search in sources :

Example 6 with DatalakeTriggerBackupEvent

use of com.sequenceiq.datalake.flow.dr.backup.event.DatalakeTriggerBackupEvent in project cloudbreak by hortonworks.

the class DatalakeResizeFlowEventChainTest method assertTriggerBackupEvent.

private void assertTriggerBackupEvent(FlowTriggerEventQueue flowChainQueue) {
    Selectable triggerBackupEvent = flowChainQueue.getQueue().remove();
    assertEquals(DATALAKE_TRIGGER_BACKUP_EVENT.selector(), triggerBackupEvent.selector());
    assertEquals(sdxCluster.getId(), triggerBackupEvent.getResourceId());
    assertTrue(triggerBackupEvent instanceof DatalakeTriggerBackupEvent);
    DatalakeTriggerBackupEvent event = (DatalakeTriggerBackupEvent) triggerBackupEvent;
    assertEquals(BACKUP_LOCATION, event.getBackupLocation());
    assertTrue(event.getBackupName().startsWith("resize"));
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) DatalakeTriggerBackupEvent(com.sequenceiq.datalake.flow.dr.backup.event.DatalakeTriggerBackupEvent)

Aggregations

DatalakeTriggerBackupEvent (com.sequenceiq.datalake.flow.dr.backup.event.DatalakeTriggerBackupEvent)6 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)3 FlowIdentifier (com.sequenceiq.flow.api.model.FlowIdentifier)2 FlowTriggerEventQueue (com.sequenceiq.flow.core.chain.config.FlowTriggerEventQueue)2 SdxBackupResponse (com.sequenceiq.sdx.api.model.SdxBackupResponse)2 ConcurrentLinkedQueue (java.util.concurrent.ConcurrentLinkedQueue)2 PollerStoppedException (com.dyngr.exception.PollerStoppedException)1 DatalakeBackupStatusResponse (com.sequenceiq.cloudbreak.datalakedr.model.DatalakeBackupStatusResponse)1 SdxCluster (com.sequenceiq.datalake.entity.SdxCluster)1 SdxContext (com.sequenceiq.datalake.flow.SdxContext)1 SdxEvent (com.sequenceiq.datalake.flow.SdxEvent)1 DatalakeUpgradeStartEvent (com.sequenceiq.datalake.flow.datalake.upgrade.event.DatalakeUpgradeStartEvent)1 SdxDeleteStartEvent (com.sequenceiq.datalake.flow.delete.event.SdxDeleteStartEvent)1 SdxStartDetachEvent (com.sequenceiq.datalake.flow.detach.event.SdxStartDetachEvent)1 DatalakeTriggerRestoreEvent (com.sequenceiq.datalake.flow.dr.restore.event.DatalakeTriggerRestoreEvent)1 DatahubRefreshStartEvent (com.sequenceiq.datalake.flow.refresh.event.DatahubRefreshStartEvent)1 SdxStartStopEvent (com.sequenceiq.datalake.flow.stop.event.SdxStartStopEvent)1 AbstractSdxAction (com.sequenceiq.datalake.service.AbstractSdxAction)1 FlowParameters (com.sequenceiq.flow.core.FlowParameters)1 Map (java.util.Map)1