use of com.sequenceiq.datalake.flow.datalake.cmsync.event.SdxCmSyncStartEvent in project cloudbreak by hortonworks.
the class SdxCmSyncActions method callCoreCmSync.
@Bean(name = "CORE_CM_SYNC_STATE")
public Action<?, ?> callCoreCmSync() {
return new AbstractSdxCmSyncAction<>(SdxCmSyncStartEvent.class) {
@Override
protected void doExecute(SdxContext context, SdxCmSyncStartEvent payload, Map<Object, Object> variables) throws Exception {
LOGGER.debug("Calling cm sync on core");
sdxCmSyncService.callCmSync(payload.getResourceId());
sendEvent(context, new SdxEvent(SDX_CM_SYNC_IN_PROGRESS_EVENT.event(), context));
}
};
}
use of com.sequenceiq.datalake.flow.datalake.cmsync.event.SdxCmSyncStartEvent in project cloudbreak by hortonworks.
the class SdxReactorFlowManager method triggerDatalakeSyncComponentVersionsFromCmFlow.
public FlowIdentifier triggerDatalakeSyncComponentVersionsFromCmFlow(SdxCluster cluster) {
LOGGER.info("Trigger Datalake sync component versions from CM");
String userId = ThreadBasedUserCrnProvider.getUserCrn();
SdxCmSyncStartEvent event = new SdxCmSyncStartEvent(cluster.getId(), userId);
return notify(event.selector(), event, cluster.getClusterName());
}
Aggregations