提交 6f9a8840 编写于 作者: S Stefan Richter

[hotfix] Remove unused generic parameter from RocksDB states

上级 28e0b83d
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
package org.apache.flink.contrib.streaming.state; package org.apache.flink.contrib.streaming.state;
import org.apache.flink.api.common.state.State;
import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.runtime.state.internal.InternalAppendingState; import org.apache.flink.runtime.state.internal.InternalAppendingState;
import org.apache.flink.util.FlinkRuntimeException; import org.apache.flink.util.FlinkRuntimeException;
...@@ -28,8 +27,8 @@ import org.rocksdb.RocksDBException; ...@@ -28,8 +27,8 @@ import org.rocksdb.RocksDBException;
import java.io.IOException; import java.io.IOException;
abstract class AbstractRocksDBAppendingState <K, N, IN, SV, OUT, S extends State> abstract class AbstractRocksDBAppendingState <K, N, IN, SV, OUT>
extends AbstractRocksDBState<K, N, SV, S> extends AbstractRocksDBState<K, N, SV>
implements InternalAppendingState<K, N, IN, SV, OUT> { implements InternalAppendingState<K, N, IN, SV, OUT> {
/** /**
......
...@@ -44,9 +44,8 @@ import java.io.IOException; ...@@ -44,9 +44,8 @@ import java.io.IOException;
* @param <K> The type of the key. * @param <K> The type of the key.
* @param <N> The type of the namespace. * @param <N> The type of the namespace.
* @param <V> The type of values kept internally in state. * @param <V> The type of values kept internally in state.
* @param <S> The type of {@link State}.
*/ */
public abstract class AbstractRocksDBState<K, N, V, S extends State> implements InternalKvState<K, N, V>, State { public abstract class AbstractRocksDBState<K, N, V> implements InternalKvState<K, N, V>, State {
/** Serializer for the namespace. */ /** Serializer for the namespace. */
final TypeSerializer<N> namespaceSerializer; final TypeSerializer<N> namespaceSerializer;
......
...@@ -43,7 +43,7 @@ import java.util.Collection; ...@@ -43,7 +43,7 @@ import java.util.Collection;
* @param <R> The type of the value returned from the state * @param <R> The type of the value returned from the state
*/ */
class RocksDBAggregatingState<K, N, T, ACC, R> class RocksDBAggregatingState<K, N, T, ACC, R>
extends AbstractRocksDBAppendingState<K, N, T, ACC, R, AggregatingState<T, R>> extends AbstractRocksDBAppendingState<K, N, T, ACC, R>
implements InternalAggregatingState<K, N, T, ACC, R> { implements InternalAggregatingState<K, N, T, ACC, R> {
/** User-specified aggregation function. */ /** User-specified aggregation function. */
......
...@@ -42,7 +42,7 @@ import org.rocksdb.ColumnFamilyHandle; ...@@ -42,7 +42,7 @@ import org.rocksdb.ColumnFamilyHandle;
*/ */
@Deprecated @Deprecated
class RocksDBFoldingState<K, N, T, ACC> class RocksDBFoldingState<K, N, T, ACC>
extends AbstractRocksDBAppendingState<K, N, T, ACC, ACC, FoldingState<T, ACC>> extends AbstractRocksDBAppendingState<K, N, T, ACC, ACC>
implements InternalFoldingState<K, N, T, ACC> { implements InternalFoldingState<K, N, T, ACC> {
/** User-specified fold function. */ /** User-specified fold function. */
......
...@@ -1400,7 +1400,7 @@ public class RocksDBKeyedStateBackend<K> extends AbstractKeyedStateBackend<K> { ...@@ -1400,7 +1400,7 @@ public class RocksDBKeyedStateBackend<K> extends AbstractKeyedStateBackend<K> {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
AbstractRocksDBState<?, ?, SV, S> rocksDBState = (AbstractRocksDBState<?, ?, SV, S>) state; AbstractRocksDBState<?, ?, SV> rocksDBState = (AbstractRocksDBState<?, ?, SV>) state;
Snapshot rocksDBSnapshot = db.getSnapshot(); Snapshot rocksDBSnapshot = db.getSnapshot();
try ( try (
......
...@@ -59,7 +59,7 @@ import static org.apache.flink.runtime.state.StateSnapshotTransformer.Collection ...@@ -59,7 +59,7 @@ import static org.apache.flink.runtime.state.StateSnapshotTransformer.Collection
* @param <V> The type of the values in the list state. * @param <V> The type of the values in the list state.
*/ */
class RocksDBListState<K, N, V> class RocksDBListState<K, N, V>
extends AbstractRocksDBState<K, N, List<V>, ListState<V>> extends AbstractRocksDBState<K, N, List<V>>
implements InternalListState<K, N, V> { implements InternalListState<K, N, V> {
/** Serializer for the values. */ /** Serializer for the values. */
......
...@@ -64,7 +64,7 @@ import java.util.Map; ...@@ -64,7 +64,7 @@ import java.util.Map;
* @param <UV> The type of the values in the map state. * @param <UV> The type of the values in the map state.
*/ */
class RocksDBMapState<K, N, UK, UV> class RocksDBMapState<K, N, UK, UV>
extends AbstractRocksDBState<K, N, Map<UK, UV>, MapState<UK, UV>> extends AbstractRocksDBState<K, N, Map<UK, UV>>
implements InternalMapState<K, N, UK, UV> { implements InternalMapState<K, N, UK, UV> {
private static final Logger LOG = LoggerFactory.getLogger(RocksDBMapState.class); private static final Logger LOG = LoggerFactory.getLogger(RocksDBMapState.class);
......
...@@ -41,7 +41,7 @@ import java.util.Collection; ...@@ -41,7 +41,7 @@ import java.util.Collection;
* @param <V> The type of value that the state state stores. * @param <V> The type of value that the state state stores.
*/ */
class RocksDBReducingState<K, N, V> class RocksDBReducingState<K, N, V>
extends AbstractRocksDBAppendingState<K, N, V, V, V, ReducingState<V>> extends AbstractRocksDBAppendingState<K, N, V, V, V>
implements InternalReducingState<K, N, V> { implements InternalReducingState<K, N, V> {
/** User-specified reduce function. */ /** User-specified reduce function. */
......
...@@ -40,7 +40,7 @@ import java.io.IOException; ...@@ -40,7 +40,7 @@ import java.io.IOException;
* @param <V> The type of value that the state state stores. * @param <V> The type of value that the state state stores.
*/ */
class RocksDBValueState<K, N, V> class RocksDBValueState<K, N, V>
extends AbstractRocksDBState<K, N, V, ValueState<V>> extends AbstractRocksDBState<K, N, V>
implements InternalValueState<K, N, V> { implements InternalValueState<K, N, V> {
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册