use of org.apache.flink.runtime.clusterframework.ContainerSpecification in project flink by apache.
the class HadoopUserOverlayTest method testConfigure.
@Test
public void testConfigure() throws Exception {
final UserGroupInformation ugi = UserGroupInformation.createRemoteUser("test");
HadoopUserOverlay overlay = new HadoopUserOverlay(ugi);
ContainerSpecification spec = new ContainerSpecification();
overlay.configure(spec);
assertEquals(ugi.getUserName(), spec.getEnvironmentVariables().get("HADOOP_USER_NAME"));
}
use of org.apache.flink.runtime.clusterframework.ContainerSpecification in project flink by apache.
the class Krb5ConfOverlayTest method testNoConf.
@Test
public void testNoConf() throws Exception {
Krb5ConfOverlay overlay = new Krb5ConfOverlay((Path) null);
ContainerSpecification containerSpecification = new ContainerSpecification();
overlay.configure(containerSpecification);
}
use of org.apache.flink.runtime.clusterframework.ContainerSpecification in project flink by apache.
the class FlinkDistributionOverlayTest method testConfigure.
@Test
public void testConfigure() throws Exception {
File binFolder = tempFolder.newFolder("bin");
File libFolder = tempFolder.newFolder("lib");
File confFolder = tempFolder.newFolder("conf");
Path[] files = createPaths(tempFolder.getRoot(), "bin/config.sh", "bin/taskmanager.sh", "lib/foo.jar", "lib/A/foo.jar", "lib/B/foo.jar", "lib/B/bar.jar");
ContainerSpecification containerSpecification = new ContainerSpecification();
FlinkDistributionOverlay overlay = new FlinkDistributionOverlay(binFolder, confFolder, libFolder);
overlay.configure(containerSpecification);
for (Path file : files) {
checkArtifact(containerSpecification, new Path(TARGET_ROOT, file.toString()));
}
}
use of org.apache.flink.runtime.clusterframework.ContainerSpecification in project flink by apache.
the class HadoopConfOverlayTest method testConfigure.
@Test
public void testConfigure() throws Exception {
File confDir = tempFolder.newFolder();
initConfDir(confDir);
HadoopConfOverlay overlay = new HadoopConfOverlay(confDir);
ContainerSpecification spec = new ContainerSpecification();
overlay.configure(spec);
assertEquals(TARGET_CONF_DIR.getPath(), spec.getEnvironmentVariables().get("HADOOP_CONF_DIR"));
assertEquals(TARGET_CONF_DIR.getPath(), spec.getDynamicConfiguration().getString(ConfigConstants.PATH_HADOOP_CONFIG, null));
checkArtifact(spec, new Path(TARGET_CONF_DIR, "core-site.xml"));
checkArtifact(spec, new Path(TARGET_CONF_DIR, "hdfs-site.xml"));
}
use of org.apache.flink.runtime.clusterframework.ContainerSpecification in project flink by apache.
the class KeytabOverlayTest method testNoConf.
@Test
public void testNoConf() throws Exception {
KeytabOverlay overlay = new KeytabOverlay((Path) null);
ContainerSpecification containerSpecification = new ContainerSpecification();
overlay.configure(containerSpecification);
}
Aggregations