Skip to content

Commit

Permalink
[hotfix][test] Remove usage of deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
tisonkun authored and zentol committed Jan 9, 2019
1 parent 64f766f commit 9323ef6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
import org.apache.flink.runtime.concurrent.ScheduledExecutorServiceAdapter;
import org.apache.flink.runtime.jobgraph.JobGraph;
import org.apache.flink.runtime.jobgraph.JobStatus;
import org.apache.flink.runtime.state.AbstractStateBackend;
import org.apache.flink.runtime.state.CheckpointListener;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.testingUtils.TestingUtils;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.QueryableStateStream;
Expand Down Expand Up @@ -107,15 +107,15 @@
public abstract class AbstractQueryableStateTestBase extends TestLogger {

private static final Duration TEST_TIMEOUT = Duration.ofSeconds(10000L);
public static final long RETRY_TIMEOUT = 50L;
private static final long RETRY_TIMEOUT = 50L;

private final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(4);
private final ScheduledExecutor executor = new ScheduledExecutorServiceAdapter(executorService);

/**
* State backend to use.
*/
protected AbstractStateBackend stateBackend;
private StateBackend stateBackend;

/**
* Client shared between all the test.
Expand All @@ -142,7 +142,7 @@ public void setUp() throws Exception {
*
* @return a state backend instance for each unit test
*/
protected abstract AbstractStateBackend createStateBackend() throws Exception;
protected abstract StateBackend createStateBackend() throws Exception;

/**
* Runs a simple topology producing random (key, 1) pairs at the sources (where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.test.util.MiniClusterWithClientResource;
Expand Down Expand Up @@ -58,7 +58,7 @@ public class HAQueryableStateFsBackendITCase extends AbstractQueryableStateTestB
private static MiniClusterWithClientResource miniClusterResource;

@Override
protected AbstractStateBackend createStateBackend() throws Exception {
protected StateBackend createStateBackend() throws Exception {
return new FsStateBackend(temporaryFolder.newFolder().toURI().toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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.state.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.test.util.MiniClusterWithClientResource;

Expand Down Expand Up @@ -58,7 +58,7 @@ public class HAQueryableStateRocksDBBackendITCase extends AbstractQueryableState
private static MiniClusterWithClientResource miniClusterResource;

@Override
protected AbstractStateBackend createStateBackend() throws Exception {
protected StateBackend createStateBackend() throws Exception {
return new RocksDBStateBackend(temporaryFolder.newFolder().toURI().toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.test.util.MiniClusterWithClientResource;
Expand Down Expand Up @@ -61,7 +61,7 @@ public class NonHAQueryableStateFsBackendITCase extends AbstractQueryableStateTe
.build());

@Override
protected AbstractStateBackend createStateBackend() throws Exception {
protected StateBackend createStateBackend() throws Exception {
return new FsStateBackend(temporaryFolder.newFolder().toURI().toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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.state.AbstractStateBackend;
import org.apache.flink.runtime.state.StateBackend;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.test.util.MiniClusterWithClientResource;

Expand Down Expand Up @@ -60,7 +60,7 @@ public class NonHAQueryableStateRocksDBBackendITCase extends AbstractQueryableSt
.build());

@Override
protected AbstractStateBackend createStateBackend() throws Exception {
protected StateBackend createStateBackend() throws Exception {
return new RocksDBStateBackend(temporaryFolder.newFolder().toURI().toString());
}

Expand Down

0 comments on commit 9323ef6

Please sign in to comment.