Skip to content

Commit

Permalink
[FLINK-2097] temporarily disable session management API
Browse files Browse the repository at this point in the history
  • Loading branch information
mxm committed Sep 21, 2015
1 parent 4260457 commit 57cf958
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,13 @@ public String getIdString() {
* @param timeout The timeout, in seconds.
*/
public void setSessionTimeout(long timeout) {
if (timeout < 0) {
throw new IllegalArgumentException("The session timeout must not be less than zero.");
}
this.sessionTimeout = timeout;
throw new IllegalStateException("Support for sessions is currently disabled. " +
"It will be enabled in future Flink versions.");
// Session management is disabled, revert this commit to enable
//if (timeout < 0) {
// throw new IllegalArgumentException("The session timeout must not be less than zero.");
//}
//this.sessionTimeout = timeout;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public JobExecutionResult execute(String jobName) throws Exception {
}

Plan p = createProgramPlan(jobName);
p.setJobId(jobID);
p.setSessionTimeout(sessionTimeout);

// Session management is disabled, revert this commit to enable
//p.setJobId(jobID);
//p.setSessionTimeout(sessionTimeout);

JobExecutionResult result = executor.executePlan(p);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ public JobExecutionResult execute(String jobName) throws Exception {
ensureExecutorCreated();

Plan p = createProgramPlan(jobName);
p.setJobId(jobID);
p.setSessionTimeout(sessionTimeout);

// Session management is disabled, revert this commit to enable
//p.setJobId(jobID);
//p.setSessionTimeout(sessionTimeout);

JobExecutionResult result = executor.executePlan(p);

Expand Down

0 comments on commit 57cf958

Please sign in to comment.