Skip to content

Conversation

@StephanEwen
Copy link
Contributor

The streaming mode subsumes the batch mode, as it allows to run both kinds of programs. Batch programs will most likely run slightly less efficient than in pure batch mode, due to lazy memory allocation (see below)

Adds new startup options to the JobManager and TaskManager.

Adds additional scripts bin/start-cluster-streaming.sh and start-local-streaming.sh.

Currently, streaming mode only sets the memory manager to lazy memory allocation to ensure heap is not blocked by batch memory manager

Includes [FLINK-2085] To support on-demand memory allocation in the memory manager.

…e and release memory as needed.

This is an alternative mode to the current mode that pre-allocates all memory.

The default remains to pre-allocate all memory.
 - Streaming mode sets the memory manager to lazy memory allocation to ensure
   heap is not blocked by batch memory manager
@@ -80,7 +81,7 @@ case $STARTSTOP in
rotateLogFile $out

echo "Starting Job Manager"
$JAVA_RUN $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_JM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" org.apache.flink.runtime.jobmanager.JobManager --executionMode $EXECUTIONMODE --configDir "$FLINK_CONF_DIR" > "$out" 2>&1 < /dev/null &
$JAVA_RUN $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_JM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" org.apache.flink.runtime.jobmanager.JobManager --configDir "$FLINK_CONF_DIR" --executionMode $EXECUTIONMODE --streamingMode "$STREAMINGMODE" > "$out" 2>&1 < /dev/null &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, the script now expects three arguments, right?
If you, you need to update this line as well

echo "Please specify 'start (cluster|local)' or stop"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the streaming mode parameter is optional and defaults to "batch".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, sorry. I didn't see this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add it anyways. It is a good hint.

@rmetzger
Copy link
Contributor

+1 to merge.
The changes look good.


Assert.assertTrue("The previously allocated segments were not valid any more.",
allMemorySegmentsValid(segs));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

@mxm
Copy link
Contributor

mxm commented May 26, 2015

+1 looks solid.

@StephanEwen
Copy link
Contributor Author

Thank you for the comments.

I'll address them and merge this...

@asfgit asfgit closed this in 0437722 May 26, 2015
marthavk pushed a commit to marthavk/flink that referenced this pull request Jun 9, 2015
@StephanEwen StephanEwen deleted the streaming_mode branch August 4, 2015 16:39
nltran pushed a commit to nltran/flink that referenced this pull request Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants