@Override
	public JobDefinition findOne(String id) {
		try {
			byte[] bytes = zkConnection.getClient().getData().forPath(Paths.build(Paths.JOBS, id));
			if (bytes == null) {
				return null;
			}
			Map<String, String> map = ZooKeeperUtils.bytesToMap(bytes);
			return new JobDefinition(id, map.get("definition"));
		}
		catch (Exception e) {
			ZooKeeperUtils.wrapAndThrowIgnoring(e, NoNodeException.class);
		}
		return null;
	}
A Zookeeper backed repository for persisting {@link JobDefinition}s.

@author Mark Fisher
@author David Turanski
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/zookeeper/ZooKeeperJobDefinitionRepository.java