You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Aljoscha Krettek (JIRA)" <ji...@apache.org> on 2014/11/26 18:12:12 UTC

[jira] [Commented] (FLINK-1285) Make execution mode configurable

    [ https://issues.apache.org/jira/browse/FLINK-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226469#comment-14226469 ] 

Aljoscha Krettek commented on FLINK-1285:
-----------------------------------------

I have this, in a branch, right now:

{code}
public class FlinkConfig implements Serializable {
	private boolean useClosureCleaner = true;
	private int degreeOfParallelism = -1;
	private int numberOfExecutionRetries = -1;

	public FlinkConfig enableClosureCleaner() {
		useClosureCleaner = true;
		return this;
	}

	public FlinkConfig disableClosureCleaner() {
		useClosureCleaner = true;
		return this;
	}

	public boolean isClosureCleanerEnabled() {
		return useClosureCleaner;
	}

	public int getDegreeOfParallelism() {
		return degreeOfParallelism;
	}

	public FlinkConfig setDegreeOfParallelism(int degreeOfParallelism) {
		if (degreeOfParallelism < 1) {
			throw new IllegalArgumentException("Degree of parallelism must be at least one.");
		}
		this.degreeOfParallelism = degreeOfParallelism;
		return this;
	}

	public int getNumberOfExecutionRetries() {
		return numberOfExecutionRetries;
	}

	public FlinkConfig setNumberOfExecutionRetries(int numberOfExecutionRetries) {
		if (numberOfExecutionRetries < -1) {
			throw new IllegalArgumentException("The number of execution retries must be non-negative, or -1 (use system default)");
		}
		this.numberOfExecutionRetries = numberOfExecutionRetries;
		return this;
	}
}
{code}

And then ExecutionEnvironment has a getter and setter for the config object. The config object would then of course need to be passed to the code that deals with mutable object mode and other stuff. Right now, I only use the isClosureCleanerEnabled inside the Scala DataSet to do conditional closure cleaning.

Is this what we want?

> Make execution mode configurable
> --------------------------------
>
>                 Key: FLINK-1285
>                 URL: https://issues.apache.org/jira/browse/FLINK-1285
>             Project: Flink
>          Issue Type: Improvement
>          Components: Local Runtime
>            Reporter: Ufuk Celebi
>            Priority: Minor
>
> As discussed in a PR: https://github.com/apache/incubator-flink/pull/227#discussion_r20788430.
> The goal would be to make the execution mode configurable in order to easily configure closure cleaning, custom serializers etc.
> Configuration could be done either via 1) setters or 2) a configuration object.
> I vote for 2).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)