Skip to content

Commit

Permalink
[FLINK-36323][State] Remove deprecated FsStateBackend and RocksDBStat…
Browse files Browse the repository at this point in the history
…eBackend
  • Loading branch information
Kaitian Hu authored and Zakelly committed Sep 30, 2024
1 parent 5dcfdf7 commit 36c3d77
Show file tree
Hide file tree
Showing 34 changed files with 166 additions and 2,097 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import org.apache.flink.api.common.state.ValueStateDescriptor;
import org.apache.flink.api.common.typeinfo.Types;
import org.apache.flink.api.java.tuple.Tuple3;
import org.apache.flink.contrib.streaming.state.RocksDBStateBackend;
import org.apache.flink.contrib.streaming.state.EmbeddedRocksDBStateBackend;
import org.apache.flink.core.fs.Path;
import org.apache.flink.runtime.checkpoint.OperatorSubtaskState;
import org.apache.flink.runtime.state.storage.FileSystemCheckpointStorage;
import org.apache.flink.state.api.functions.KeyedStateBootstrapFunction;
import org.apache.flink.state.api.output.operators.KeyedStateBootstrapOperator;
import org.apache.flink.streaming.api.TimeDomain;
Expand Down Expand Up @@ -121,7 +122,8 @@ private <T> KeyedOneInputStreamOperatorTestHarness<Long, Long, T> getHarness(
new KeyedOneInputStreamOperatorTestHarness<>(
bootstrapOperator, id -> id, Types.LONG, 128, 1, 0);

harness.setStateBackend(new RocksDBStateBackend(folder.newFolder().toURI()));
harness.setStateBackend(new EmbeddedRocksDBStateBackend());
harness.setCheckpointStorage(new FileSystemCheckpointStorage(folder.newFolder().toURI()));
if (state != null) {
harness.initializeState(state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.flink.configuration.WebOptions;
import org.apache.flink.core.testutils.AllCallbackWrapper;
import org.apache.flink.queryablestate.client.QueryableStateClient;
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.runtime.zookeeper.ZooKeeperExtension;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
Expand All @@ -44,7 +43,7 @@

import java.nio.file.Path;

/** Several integration tests for queryable state using the {@link FsStateBackend}. */
/** Several integration tests for queryable state. */
class HAQueryableStateFsBackendITCase extends AbstractQueryableStateTestBase {

// NUM_TMS * NUM_SLOTS_PER_TM must match the parallelism of the pipelines so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.flink.configuration.QueryableStateOptions;
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.configuration.WebOptions;
import org.apache.flink.contrib.streaming.state.RocksDBStateBackend;
import org.apache.flink.core.testutils.AllCallbackWrapper;
import org.apache.flink.queryablestate.client.QueryableStateClient;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
Expand All @@ -44,7 +43,10 @@

import java.nio.file.Path;

/** Several integration tests for queryable state using the {@link RocksDBStateBackend}. */
/**
* Several integration tests for queryable state using the {@link
* org.apache.flink.contrib.streaming.state.EmbeddedRocksDBStateBackend}.
*/
class HAQueryableStateRocksDBBackendITCase extends AbstractQueryableStateTestBase {

// NUM_TMS * NUM_SLOTS_PER_TM must match the parallelism of the pipelines so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.configuration.WebOptions;
import org.apache.flink.queryablestate.client.QueryableStateClient;
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.util.CheckpointStorageUtils;
Expand All @@ -40,7 +39,7 @@

import java.nio.file.Path;

/** Several integration tests for queryable state using the {@link FsStateBackend}. */
/** Several integration tests for queryable state. */
public class NonHAQueryableStateFsBackendITCase extends AbstractQueryableStateTestBase {

// NUM_TMS * NUM_SLOTS_PER_TM must match the parallelism of the pipelines so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.flink.configuration.QueryableStateOptions;
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.configuration.WebOptions;
import org.apache.flink.contrib.streaming.state.RocksDBStateBackend;
import org.apache.flink.queryablestate.client.QueryableStateClient;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
Expand All @@ -40,7 +39,10 @@

import java.nio.file.Path;

/** Several integration tests for queryable state using the {@link RocksDBStateBackend}. */
/**
* Several integration tests for queryable state using the {@link
* org.apache.flink.contrib.streaming.state.EmbeddedRocksDBStateBackend}.
*/
public class NonHAQueryableStateRocksDBBackendITCase extends AbstractQueryableStateTestBase {

// NUM_TMS * NUM_SLOTS_PER_TM must match the parallelism of the pipelines so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
import java.net.URI;

/**
* A base class for all state backends that store their metadata (and data) in files. Examples that
* inherit from this are the {@link FsStateBackend} or the {@code RocksDBStateBackend}.
* A base class for all state backends that store their metadata (and data) in files.
*
* <p>This class takes the base checkpoint- and savepoint directory paths, but also accepts null for
* both of then, in which case creating externalized checkpoint is not possible, and it is not
Expand Down
Loading

0 comments on commit 36c3d77

Please sign in to comment.