public class FlinkImageBuilder extends Object
Constructor and Description |
---|
FlinkImageBuilder() |
Modifier and Type | Method and Description |
---|---|
FlinkImageBuilder |
asJobManager()
Use this image for building a JobManager.
|
FlinkImageBuilder |
asTaskManager()
Use this image for building a TaskManager.
|
org.testcontainers.images.builder.ImageFromDockerfile |
build()
Build the image.
|
FlinkImageBuilder |
copyFile(Path localPath,
Path containerPath)
Copies file into the image.
|
FlinkImageBuilder |
setBaseImage(String baseImage)
Sets base image.
|
FlinkImageBuilder |
setConfiguration(Configuration conf)
Sets Flink configuration.
|
FlinkImageBuilder |
setFlinkDistPath(Path flinkDist)
Sets the path of flink-dist directory.
|
FlinkImageBuilder |
setFlinkHome(String flinkHome)
Sets flink home.
|
FlinkImageBuilder |
setImageNamePrefix(String imageNamePrefix)
Sets the prefix name of building image.
|
FlinkImageBuilder |
setJavaVersion(String javaVersion)
Sets JDK version in the image.
|
FlinkImageBuilder |
setLogProperties(Properties logProperties)
Sets log4j properties.
|
FlinkImageBuilder |
setTempDirectory(Path tempDirectory)
Sets temporary path for holding temp files when building the image.
|
FlinkImageBuilder |
setTimeout(java.time.Duration timeout)
Sets timeout for building the image.
|
FlinkImageBuilder |
useCustomStartupCommand(String command)
Use a custom command for starting up the container.
|
public FlinkImageBuilder setTempDirectory(Path tempDirectory)
Note that this parameter is required, because the builder doesn't have lifecycle management, and it is the caller's responsibility to create and remove the temp directory.
public FlinkImageBuilder setFlinkHome(String flinkHome)
flinkHome
- The flink home.public FlinkImageBuilder setImageNamePrefix(String imageNamePrefix)
If the name is not specified, DEFAULT_IMAGE_NAME_BUILD_PREFIX
will be used.
public FlinkImageBuilder setFlinkDistPath(Path flinkDist)
If path is not specified, the dist directory under current project will be used.
public FlinkImageBuilder setJavaVersion(String javaVersion)
This version string will be used as the tag of openjdk image. If version is not specified, the JDK version of the current JVM will be used.
public FlinkImageBuilder setConfiguration(Configuration conf)
public FlinkImageBuilder setLogProperties(Properties logProperties)
Containers will use "log4j-console.properties" under flink-dist as the base configuration of loggers. Properties specified by this method will be appended to the config file, or overwrite the property if already exists in the base config file.
public FlinkImageBuilder copyFile(Path localPath, Path containerPath)
public FlinkImageBuilder setTimeout(java.time.Duration timeout)
public FlinkImageBuilder asJobManager()
public FlinkImageBuilder asTaskManager()
public FlinkImageBuilder useCustomStartupCommand(String command)
public FlinkImageBuilder setBaseImage(String baseImage)
baseImage
- The base image.public org.testcontainers.images.builder.ImageFromDockerfile build() throws ImageBuildException
ImageBuildException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.