@Test public void testBuilderFromEnvironment() throws Exception { Configuration conf = new Configuration(); File binFolder = tempFolder.newFolder("bin"); File libFolder = tempFolder.newFolder("lib"); File pluginsFolder = tempFolder.newFolder("plugins"); File confFolder = tempFolder.newFolder("conf"); Map<String, String> map = new HashMap<String, String>(System.getenv()); map.put(ENV_FLINK_BIN_DIR, binFolder.getAbsolutePath()); map.put(ENV_FLINK_LIB_DIR, libFolder.getAbsolutePath()); map.put(ENV_FLINK_PLUGINS_DIR, pluginsFolder.getAbsolutePath()); map.put(ENV_FLINK_CONF_DIR, confFolder.getAbsolutePath()); CommonTestUtils.setEnv(map); FlinkDistributionOverlay.Builder builder = FlinkDistributionOverlay.newBuilder().fromEnvironment(conf); assertEquals(binFolder.getAbsolutePath(), builder.flinkBinPath.getAbsolutePath()); assertEquals(libFolder.getAbsolutePath(), builder.flinkLibPath.getAbsolutePath()); assertEquals(pluginsFolder.getAbsolutePath(), builder.flinkPluginsPath.getAbsolutePath()); assertEquals(confFolder.getAbsolutePath(), builder.flinkConfPath.getAbsolutePath()); }
public static Builder newBuilder() { return new Builder(); }
FlinkDistributionOverlay extends AbstractContainerOverlay { public static Builder newBuilder() { return new Builder(); } }
FlinkDistributionOverlay extends AbstractContainerOverlay { public static Builder newBuilder() { return new Builder(); } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); }
FlinkDistributionOverlay extends AbstractContainerOverlay { public static Builder newBuilder() { return new Builder(); } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); @Override void configure(ContainerSpecification container); static Builder newBuilder(); }
FlinkDistributionOverlay extends AbstractContainerOverlay { public static Builder newBuilder() { return new Builder(); } FlinkDistributionOverlay(File flinkBinPath, File flinkConfPath, File flinkLibPath, File flinkPluginsPath); @Override void configure(ContainerSpecification container); static Builder newBuilder();  }