public String getFileContentsFromHdfs(String path) {
		Assert.hasText(path, "path can not be empty nor null");
		String result = null;
		RestTemplate template = new RestTemplate();
		String streamURL = String.format("http://%s:%s/streamFile%s?nnaddr=%s:%s",
				getNameNodeHost(), dataNodePort, path, getNameNodeHost(), getNameNodePort());
		result = template.getForObject(streamURL, String.class);
		return result;
	}
Retrieves the file from the hdfs file system.

@param path The URI to the file to be retrieved.
@return The string contents of the file.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/HadoopUtils.java