@Test public void testConfigure() throws Exception { File binFolder = tempFolder.newFolder("bin"); File libFolder = tempFolder.newFolder("lib"); File pluginsFolder = tempFolder.newFolder("plugins"); 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", "plugins/P1/plugin1a.jar", "plugins/P1/plugin1b.jar", "plugins/P2/plugin2.jar"); testConfigure(binFolder, libFolder, pluginsFolder, confFolder, files); }
@Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); if (flinkPluginsPath.isDirectory()) { addPathRecursively(flinkPluginsPath, TARGET_ROOT, container); } else { LOG.warn("The plugins directory '" + flinkPluginsPath + "' doesn't exist."); } }
FlinkDistributionOverlay extends AbstractContainerOverlay { @Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); if (flinkPluginsPath.isDirectory()) { addPathRecursively(flinkPluginsPath, TARGET_ROOT, container); } else { LOG.warn("The plugins directory '" + flinkPluginsPath + "' doesn't exist."); } } }
FlinkDistributionOverlay extends AbstractContainerOverlay { @Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); if (flinkPluginsPath.isDirectory()) { addPathRecursively(flinkPluginsPath, TARGET_ROOT, container); } else { LOG.warn("The plugins directory '" + flinkPluginsPath + "' doesn't exist."); } } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); }
FlinkDistributionOverlay extends AbstractContainerOverlay { @Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); if (flinkPluginsPath.isDirectory()) { addPathRecursively(flinkPluginsPath, TARGET_ROOT, container); } else { LOG.warn("The plugins directory '" + flinkPluginsPath + "' doesn't exist."); } } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); @Override void configure(ContainerSpecification container); static Builder newBuilder(); }
FlinkDistributionOverlay extends AbstractContainerOverlay { @Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); if (flinkPluginsPath.isDirectory()) { addPathRecursively(flinkPluginsPath, TARGET_ROOT, container); } else { LOG.warn("The plugins directory '" + flinkPluginsPath + "' doesn't exist."); } } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); @Override void configure(ContainerSpecification container); static Builder newBuilder();  }