class HadoopConfOverlay implements ContainerOverlay {

	@Override
	public void configure(ContainerSpecification container) throws IOException {

		if(hadoopConfDir == null) {
			return;
		}

		File coreSitePath = new File(hadoopConfDir, "core-site.xml");
		File hdfsSitePath = new File(hadoopConfDir, "hdfs-site.xml");

		container.getEnvironmentVariables().put("HADOOP_CONF_DIR", TARGET_CONF_DIR.toString());
		container.getFlinkConfiguration().setString(ConfigConstants.PATH_HADOOP_CONFIG, TARGET_CONF_DIR.toString());

		container.getArtifacts().add(ContainerSpecification.Artifact
			.newBuilder()
			.setSource(new Path(coreSitePath.toURI()))
			.setDest(new Path(TARGET_CONF_DIR, coreSitePath.getName()))
			.setCachable(true)
			.build());

		container.getArtifacts().add(ContainerSpecification.Artifact
			.newBuilder()
			.setSource(new Path(hdfsSitePath.toURI()))
			.setDest(new Path(TARGET_CONF_DIR, hdfsSitePath.getName()))
			.setCachable(true)
			.build());
	}

	public  HadoopConfOverlay(@Nullable File hadoopConfDir);

}