Skip to content

Commit

Permalink
[ISSUE-3114][Improve] Improve streampark-testcontainer module based o…
Browse files Browse the repository at this point in the history
…n [3.7 Code Comments Rule]
  • Loading branch information
RocMarshal committed Oct 10, 2023
1 parent 1f35c80 commit 3f4b451
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

import javax.annotation.Nonnull;

/** The enum is used to represent the type of the flink component. */
enum FlinkComponent {
JOBMANAGER("jobmanager"),

TASKMANAGER("taskmanager");

private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
import static org.apache.streampark.testcontainer.flink.FlinkComponent.JOBMANAGER;
import static org.apache.streampark.testcontainer.flink.FlinkComponent.TASKMANAGER;

/**
* The Flink container class. It would be created as a flink jobmanager container or a taskmanaager
* container. Note: It's an internal class to construct a flink session cluster.
*/
class FlinkContainer extends GenericContainer<FlinkContainer> {

public static final AtomicInteger TM_INDEX_SUFFIX = new AtomicInteger(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
import static org.apache.streampark.testcontainer.flink.FlinkComponent.TASKMANAGER;

/**
* Class to start a couple of flink 1-jobmanager & n-taskmanagers. The priority of flinkYamlConfStr
* is the highest. But: The 'jobmanager.rpc.address' is always 'jobmanager'. The 'rest.port' always
* is 8081.
* Class to start a couple of flink 1-jobmanager & n-taskmanagers. The priority of
* flinkYamlConfContent is the highest. But: The 'jobmanager.rpc.address' is always 'jobmanager'.
* The 'rest.port' always is 8081.
*/
public class FlinkStandaloneSessionCluster implements Startable {

Expand Down Expand Up @@ -135,6 +135,7 @@ private void renderJmRpcConfIfNeeded(@Nullable String yamlConfStr) {
: String.format("%s\n%s\n", this.yamlConfContent, yamlConfStr));
}

/** A tool class to create a flink standalone session cluster quickly. */
public static class Builder {

private DockerImageName dockerImageName =
Expand Down

0 comments on commit 3f4b451

Please sign in to comment.