Skip to content

Commit

Permalink
[hotfix] Remove unused generic parameter from RocksDB states
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanRRichter committed Jan 7, 2019
1 parent 28e0b83 commit 6f9a884
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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.runtime.state.internal.InternalAppendingState;
import org.apache.flink.util.FlinkRuntimeException;
Expand All @@ -28,8 +27,8 @@

import java.io.IOException;

abstract class AbstractRocksDBAppendingState <K, N, IN, SV, OUT, S extends State>
extends AbstractRocksDBState<K, N, SV, S>
abstract class AbstractRocksDBAppendingState <K, N, IN, SV, OUT>
extends AbstractRocksDBState<K, N, SV>
implements InternalAppendingState<K, N, IN, SV, OUT> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
* @param <K> The type of the key.
* @param <N> The type of the namespace.
* @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. */
final TypeSerializer<N> namespaceSerializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @param <R> The type of the value returned from the state
*/
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> {

/** User-specified aggregation function. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/
@Deprecated
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> {

/** User-specified fold function. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ private <N, S extends State, SV> void migrateStateValues(
}

@SuppressWarnings("unchecked")
AbstractRocksDBState<?, ?, SV, S> rocksDBState = (AbstractRocksDBState<?, ?, SV, S>) state;
AbstractRocksDBState<?, ?, SV> rocksDBState = (AbstractRocksDBState<?, ?, SV>) state;

Snapshot rocksDBSnapshot = db.getSnapshot();
try (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* @param <V> The type of the values in the list state.
*/
class RocksDBListState<K, N, V>
extends AbstractRocksDBState<K, N, List<V>, ListState<V>>
extends AbstractRocksDBState<K, N, List<V>>
implements InternalListState<K, N, V> {

/** Serializer for the values. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* @param <UV> The type of the values in the map state.
*/
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> {

private static final Logger LOG = LoggerFactory.getLogger(RocksDBMapState.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* @param <V> The type of value that the state state stores.
*/
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> {

/** User-specified reduce function. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @param <V> The type of value that the state state stores.
*/
class RocksDBValueState<K, N, V>
extends AbstractRocksDBState<K, N, V, ValueState<V>>
extends AbstractRocksDBState<K, N, V>
implements InternalValueState<K, N, V> {

/**
Expand Down

0 comments on commit 6f9a884

Please sign in to comment.