Search in sources :

Example 6 with ContainerSpecification

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"));
}
Also used : ContainerSpecification(org.apache.flink.runtime.clusterframework.ContainerSpecification) UserGroupInformation(org.apache.hadoop.security.UserGroupInformation) Test(org.junit.Test)

Example 7 with ContainerSpecification

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);
}
Also used : ContainerSpecification(org.apache.flink.runtime.clusterframework.ContainerSpecification) Test(org.junit.Test)

Example 8 with 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()));
    }
}
Also used : Path(org.apache.flink.core.fs.Path) ContainerSpecification(org.apache.flink.runtime.clusterframework.ContainerSpecification) File(java.io.File) Test(org.junit.Test)

Example 9 with ContainerSpecification

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"));
}
Also used : Path(org.apache.flink.core.fs.Path) ContainerSpecification(org.apache.flink.runtime.clusterframework.ContainerSpecification) File(java.io.File) Test(org.junit.Test)

Example 10 with ContainerSpecification

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);
}
Also used : ContainerSpecification(org.apache.flink.runtime.clusterframework.ContainerSpecification) Test(org.junit.Test)

Aggregations

ContainerSpecification (org.apache.flink.runtime.clusterframework.ContainerSpecification)13 Test (org.junit.Test)11 File (java.io.File)5 Path (org.apache.flink.core.fs.Path)3 ActorRef (akka.actor.ActorRef)1 ActorSystem (akka.actor.ActorSystem)1 Address (akka.actor.Address)1 Props (akka.actor.Props)1 IOException (java.io.IOException)1 InetAddress (java.net.InetAddress)1 URL (java.net.URL)1 FileVisitResult (java.nio.file.FileVisitResult)1 BasicFileAttributes (java.nio.file.attribute.BasicFileAttributes)1 ExecutorService (java.util.concurrent.ExecutorService)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 Configuration (org.apache.flink.configuration.Configuration)1 GlobalConfiguration (org.apache.flink.configuration.GlobalConfiguration)1 MesosServices (org.apache.flink.mesos.runtime.clusterframework.services.MesosServices)1 MesosWorkerStore (org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore)1 MesosArtifactServer (org.apache.flink.mesos.util.MesosArtifactServer)1