/** * Generate a container specification as a TaskManager template. * * <p>This code is extremely Mesos-specific and registers all the artifacts that the TaskManager * needs (such as JAR file, config file, ...) and all environment variables into a container specification. * The Mesos fetcher then ensures that those artifacts will be copied into the task's sandbox directory. * A lightweight HTTP server serves the artifacts to the fetcher. */ public static void applyOverlays( Configuration configuration, ContainerSpecification containerSpec) throws IOException { // create the overlays that will produce the specification CompositeContainerOverlay overlay = new CompositeContainerOverlay( FlinkDistributionOverlay.newBuilder().fromEnvironment(configuration).build(), HadoopConfOverlay.newBuilder().fromEnvironment(configuration).build(), HadoopUserOverlay.newBuilder().fromEnvironment(configuration).build(), KeytabOverlay.newBuilder().fromEnvironment(configuration).build(), Krb5ConfOverlay.newBuilder().fromEnvironment(configuration).build(), SSLStoreOverlay.newBuilder().fromEnvironment(configuration).build() ); // apply the overlays overlay.configure(containerSpec); }
@Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); // add the paths to the container specification. addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); }
public FlinkDistributionOverlay build() { return new FlinkDistributionOverlay(flinkBinPath, flinkConfPath, flinkLibPath); } }
@Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); // add the paths to the container specification. addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); }
public FlinkDistributionOverlay build() { return new FlinkDistributionOverlay(flinkBinPath, flinkConfPath, flinkLibPath); } }
@Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); // add the paths to the container specification. addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); }
public FlinkDistributionOverlay build() { return new FlinkDistributionOverlay(flinkBinPath, flinkConfPath, flinkLibPath); } }
@Override public void configure(ContainerSpecification container) throws IOException { container.getEnvironmentVariables().put(ENV_FLINK_HOME_DIR, TARGET_ROOT.toString()); // add the paths to the container specification. addPathRecursively(flinkBinPath, TARGET_ROOT, container); addPathRecursively(flinkConfPath, TARGET_ROOT, container); addPathRecursively(flinkLibPath, TARGET_ROOT, container); }
public FlinkDistributionOverlay build() { return new FlinkDistributionOverlay(flinkBinPath, flinkConfPath, flinkLibPath); } }