@ Override public void addDeploymentGroup ( final DeploymentGroup deploymentGroup ) throws DeploymentGroupExistsException { log . info ( "adding deployment-group: {}" , deploymentGroup ) ; final ZooKeeperClient client = provider . get ( "addDeploymentGroup" ) ; try { try { client . ensurePath ( Paths . configDeploymentGroups ( ) ) ; client . ensurePath ( Paths . statusDeploymentGroups ( ) ) ; client . transaction ( create ( Paths . configDeploymentGroup ( deploymentGroup . getName ( ) ) , deploymentGroup ) , create ( Paths . statusDeploymentGroup ( deploymentGroup . getName ( ) ) ) , create ( Paths . statusDeploymentGroupHosts ( deploymentGroup . getName ( ) ) , Json . asBytesUnchecked ( emptyList ( ) ) ) , create ( Paths . statusDeploymentGroupRemovedHosts ( deploymentGroup . getName ( ) ) , Json . asBytesUnchecked ( emptyList ( ) ) ) ) ; } catch ( final NodeExistsException e ) { throw new DeploymentGroupExistsException ( deploymentGroup . getName ( ) ) ; } } catch ( final KeeperException e ) { throw new HeliosRuntimeException ( "adding deployment-group " + deploymentGroup + " failed" , e ) ; } }
Create a deployment group .