@Override
		public void run() {
			try {
				Properties properties = new Properties();
				File file = new File(System.getProperty("java.io.tmpdir")
						+ File.separator + UUID.randomUUID());
				file.deleteOnExit();
				properties.setProperty("dataDir", file.getAbsolutePath());
				properties.setProperty("clientPort", String.valueOf(clientPort));

				QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
				quorumPeerConfig.parseProperties(properties);

				zkServer = new ZooKeeperServerMain();
				ServerConfig configuration = new ServerConfig();
				configuration.readFrom(quorumPeerConfig);

				zkServer.runFromConfig(configuration);
			}
			catch (Exception e) {
				if (errorHandler != null) {
					errorHandler.handleError(e);
				}
				else {
					logger.error("Exception running embedded ZooKeeper", e);
				}
			}
		}
Runnable implementation that starts the ZooKeeper server.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/EmbeddedZooKeeper.java