or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

configuration.mdentry-points.mdhigh-availability.mdindex.mdresource-management.mdtask-scheduling.mdutilities.md

entry-points.mddocs/

0

# Cluster Entry Points

1

2

Main entry points for launching Flink clusters on Mesos, supporting both session and per-job deployment modes with full integration into the Mesos resource management framework.

3

4

## Capabilities

5

6

### Session Cluster Entry Point

7

8

Entry point for launching long-running Flink session clusters on Mesos that can execute multiple jobs over their lifetime.

9

10

```java { .api }

11

/**

12

* Entry point for Mesos session clusters

13

* Extends SessionClusterEntrypoint with Mesos-specific resource management

14

*/

15

public class MesosSessionClusterEntrypoint extends SessionClusterEntrypoint {

16

/**

17

* Constructor for Mesos session cluster entry point

18

* @param config - Flink configuration including Mesos settings

19

*/

20

public MesosSessionClusterEntrypoint(Configuration config);

21

22

/**

23

* Main entry point for starting a Mesos session cluster

24

* @param args - Command line arguments for cluster configuration

25

*/

26

public static void main(String[] args);

27

}

28

```

29

30

**Usage Example:**

31

32

```java

33

import org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint;

34

import org.apache.flink.configuration.Configuration;

35

import org.apache.flink.mesos.configuration.MesosOptions;

36

37

// Configure Mesos session cluster

38

Configuration config = new Configuration();

39

config.setString(MesosOptions.MASTER_URL, "mesos://master:5050");

40

config.setString(MesosOptions.RESOURCEMANAGER_FRAMEWORK_NAME, "flink-session");

41

config.setInteger(MesosOptions.FAILOVER_TIMEOUT_SECONDS, 600);

42

43

// Start from command line

44

MesosSessionClusterEntrypoint.main(new String[]{

45

"--configDir", "/path/to/config"

46

});

47

```

48

49

### Per-Job Cluster Entry Point

50

51

Entry point for launching Flink per-job clusters on Mesos where each job runs in its own dedicated cluster environment.

52

53

```java { .api }

54

/**

55

* Entry point for Mesos per-job clusters

56

* Extends JobClusterEntrypoint with Mesos-specific lifecycle management

57

*/

58

public class MesosJobClusterEntrypoint extends JobClusterEntrypoint {

59

/**

60

* Constructor for Mesos per-job cluster entry point

61

* @param config - Flink configuration including job and Mesos settings

62

*/

63

public MesosJobClusterEntrypoint(Configuration config);

64

65

/**

66

* Main entry point for starting a Mesos per-job cluster

67

* @param args - Command line arguments including job class specification

68

*/

69

public static void main(String[] args);

70

}

71

```

72

73

**Usage Example:**

74

75

```java

76

import org.apache.flink.mesos.entrypoint.MesosJobClusterEntrypoint;

77

import org.apache.flink.configuration.Configuration;

78

import org.apache.flink.mesos.configuration.MesosOptions;

79

80

// Configure Mesos per-job cluster

81

Configuration config = new Configuration();

82

config.setString(MesosOptions.MASTER_URL, "mesos://master:5050");

83

config.setString(MesosOptions.RESOURCEMANAGER_FRAMEWORK_NAME, "flink-job");

84

85

// Start from command line with job specification

86

MesosJobClusterEntrypoint.main(new String[]{

87

"--job-classname", "com.example.MyStreamingJob",

88

"--configDir", "/path/to/config"

89

});

90

```

91

92

### TaskManager Entry Point

93

94

Entry point for running TaskManager processes within Mesos containers, automatically launched by the Mesos resource manager.

95

96

```java { .api }

97

/**

98

* Entry point for TaskManager processes in Mesos containers

99

* Handles TaskManager initialization within Mesos task environment

100

*/

101

public class MesosTaskExecutorRunner {

102

/**

103

* Main entry point for TaskManager processes in Mesos containers

104

* @param args - Arguments passed from Mesos task launch

105

*/

106

public static void main(String[] args);

107

}

108

```

109

110

**Usage Note:**

111

112

This class is not intended for direct user invocation. It is automatically launched by the Mesos ResourceManager when TaskManager containers are started on Mesos agents.

113

114

## Configuration Requirements

115

116

All entry points require proper Mesos configuration to function correctly:

117

118

### Required Configuration Options

119

120

```java

121

// Mesos master URL

122

config.setString(MesosOptions.MASTER_URL, "mesos://master:5050");

123

124

// Framework identification

125

config.setString(MesosOptions.RESOURCEMANAGER_FRAMEWORK_NAME, "my-flink-framework");

126

127

// Optional but recommended

128

config.setInteger(MesosOptions.FAILOVER_TIMEOUT_SECONDS, 600);

129

config.setString(MesosOptions.RESOURCEMANAGER_FRAMEWORK_ROLE, "production");

130

```

131

132

### High Availability Configuration

133

134

For production deployments, configure high availability:

135

136

```java

137

// Enable HA

138

config.setString("high-availability", "zookeeper");

139

config.setString("high-availability.zookeeper.quorum", "zk1:2181,zk2:2181,zk3:2181");

140

config.setString("high-availability.storageDir", "hdfs://namenode/flink/ha");

141

```

142

143

## Error Handling

144

145

Entry points handle common Mesos integration errors:

146

147

- **Framework registration failures**: Automatic retry with exponential backoff

148

- **Mesos master disconnection**: Failover to alternate masters if configured

149

- **Resource allocation timeouts**: Graceful degradation with configurable timeouts

150

- **Container launch failures**: Automatic cleanup and retry mechanisms

151

152

## Deprecation Notice

153

154

All entry points in this module are deprecated as of Flink 1.13. Users should migrate to:

155

156

- **Kubernetes**: Use `org.apache.flink.kubernetes.entrypoint.*` classes

157

- **YARN**: Use `org.apache.flink.yarn.entrypoint.*` classes

158

- **Standalone**: Use native Flink standalone mode

159

160

## Types

161

162

```java { .api }

163

/**

164

* Base configuration class for all Mesos entry points

165

*/

166

public abstract class MesosEntrypoint {

167

protected Configuration configuration;

168

protected MesosServices mesosServices;

169

}

170

```