Skip to content

Commit

Permalink
[FLINK-19031] Remove deprecated StreamExecutionEnvironment#setStateBa…
Browse files Browse the repository at this point in the history
…ckend(AbstactStateBackend)
  • Loading branch information
dawidwys committed Aug 26, 2020
1 parent 5361713 commit 642d4fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import org.apache.flink.core.execution.PipelineExecutorFactory;
import org.apache.flink.core.execution.PipelineExecutorServiceLoader;
import org.apache.flink.core.fs.Path;
import org.apache.flink.runtime.state.AbstractStateBackend;
import org.apache.flink.runtime.state.KeyGroupRangeAssignment;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.state.StateBackendLoader;
Expand Down Expand Up @@ -563,16 +562,6 @@ public StreamExecutionEnvironment setStateBackend(StateBackend backend) {
return this;
}

/**
* @deprecated Use {@link #setStateBackend(StateBackend)} instead.
*/
@Deprecated
@PublicEvolving
public StreamExecutionEnvironment setStateBackend(AbstractStateBackend backend) {
this.defaultStateBackend = Preconditions.checkNotNull(backend);
return this;
}

/**
* Gets the state backend that defines how to store and checkpoint state.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.apache.flink.streaming.api.scala

import com.esotericsoftware.kryo.Serializer
import org.apache.flink.annotation.{Experimental, Internal, Public, PublicEvolving}
import org.apache.flink.api.common.eventtime.WatermarkStrategy
import org.apache.flink.api.common.io.{FileInputFormat, FilePathFilter, InputFormat}
Expand All @@ -30,16 +29,17 @@ import org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer
import org.apache.flink.api.scala.ClosureCleaner
import org.apache.flink.configuration.{Configuration, ReadableConfig}
import org.apache.flink.core.execution.{JobClient, JobListener}
import org.apache.flink.runtime.state.AbstractStateBackend
import org.apache.flink.runtime.state.StateBackend
import org.apache.flink.streaming.api.environment.{StreamExecutionEnvironment => JavaEnv}
import org.apache.flink.streaming.api.functions.source._
import org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext
import org.apache.flink.streaming.api.functions.source._
import org.apache.flink.streaming.api.{CheckpointingMode, TimeCharacteristic}
import org.apache.flink.util.SplittableIterator

import scala.collection.JavaConverters._
import com.esotericsoftware.kryo.Serializer

import _root_.scala.language.implicitConversions
import scala.collection.JavaConverters._

@Public
class StreamExecutionEnvironment(javaEnv: JavaEnv) {
Expand Down Expand Up @@ -260,15 +260,6 @@ class StreamExecutionEnvironment(javaEnv: JavaEnv) {
this
}

/**
* @deprecated Use [[StreamExecutionEnvironment.setStateBackend(StateBackend)]] instead.
*/
@Deprecated
@PublicEvolving
def setStateBackend(backend: AbstractStateBackend): StreamExecutionEnvironment = {
setStateBackend(backend.asInstanceOf[StateBackend])
}

/**
* Returns the state backend that defines how to store and checkpoint state.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
import org.apache.flink.api.dag.Transformation;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.runtime.state.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.streaming.api.CheckpointingMode;
import org.apache.flink.streaming.api.TimeCharacteristic;
Expand Down Expand Up @@ -179,12 +178,6 @@ public StreamExecutionEnvironment setStateBackend(StateBackend backend) {
"This is a dummy StreamExecutionEnvironment, setStateBackend method is unsupported.");
}

@Override
public StreamExecutionEnvironment setStateBackend(AbstractStateBackend backend) {
throw new UnsupportedOperationException(
"This is a dummy StreamExecutionEnvironment, setStateBackend method is unsupported.");
}

@Override
public StateBackend getStateBackend() {
return realExecEnv.getStateBackend();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
import org.apache.flink.api.dag.Transformation;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.runtime.state.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.streaming.api.CheckpointingMode;
import org.apache.flink.streaming.api.TimeCharacteristic;
Expand Down Expand Up @@ -179,12 +178,6 @@ public StreamExecutionEnvironment setStateBackend(StateBackend backend) {
"This is a dummy StreamExecutionEnvironment, setStateBackend method is unsupported.");
}

@Override
public StreamExecutionEnvironment setStateBackend(AbstractStateBackend backend) {
throw new UnsupportedOperationException(
"This is a dummy StreamExecutionEnvironment, setStateBackend method is unsupported.");
}

@Override
public StateBackend getStateBackend() {
return realExecEnv.getStateBackend();
Expand Down

0 comments on commit 642d4fe

Please sign in to comment.