public List < String > findWorkersWorkingOnPlan ( Plan plan ) throws WorkerDaoException { try { Stat exists = framework . getCuratorFramework ( ) . checkExists ( ) . forPath ( PLAN_WORKERS_ZK + "/" + plan . getName ( ) ) ; if ( exists == null ) { return new ArrayList < String > ( ) ; } return framework . getCuratorFramework ( ) . getChildren ( ) . forPath ( PLAN_WORKERS_ZK + "/" + plan . getName ( ) ) ; } catch ( Exception e ) { throw new WorkerDaoException ( e ) ; } }
Returns the node name of all the ephemeral nodes under a plan . This is effectively who is working on the plan .