private void transitionToDeploying(DeploymentUnit deploymentUnit) throws Exception {
		String pathPrefix = (deploymentUnit instanceof Stream)
				? Paths.STREAM_DEPLOYMENTS
				: Paths.JOB_DEPLOYMENTS;

		getClient().setData().forPath(
				Paths.build(pathPrefix, deploymentUnit.getName(), Paths.STATUS),
				ZooKeeperUtils.mapToBytes(new DeploymentUnitStatus(
						DeploymentUnitStatus.State.deploying).toMap()));
	}
Transitions the deployment unit state to {@link DeploymentUnitStatus.State#deploying}.
This transition should occur before making a module deployment attempt.

@param deploymentUnit deployment unit that contains a module to be deployed
@throws Exception
@see #updateDeploymentUnitState
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/admin/deployment/zk/ModuleRedeployer.java