flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljoscha <...@git.apache.org>
Subject [GitHub] flink pull request #2768: [FLINK-5023][FLINK-5024] Add SimpleStateDescriptor...
Date Tue, 22 Nov 2016 17:03:55 GMT
Github user aljoscha commented on a diff in the pull request:

    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyedStateBackend.java
    @@ -69,25 +69,26 @@
     	 * @param stateDescriptor The identifier for the state. This contains name and can create
a default state value.
     	 * @param <N> The type of the namespace.
    +	 * @param <V> The type of the values in the state.
     	 * @param <S> The type of the state.
     	 * @return A new key/value state backed by this backend.
     	 * @throws Exception Exceptions may occur during initialization of the state and should
be forwarded.
     	@SuppressWarnings({"rawtypes", "unchecked"})
    -	<N, S extends State> S getPartitionedState(
    +	<N, V, S extends State<V>> S getPartitionedState(
    --- End diff --
    I think we don't need the additional `V` parameter. It's never used and `State<?>`
works just as while while `State<V>` just pretends to add more type safety. Because
both ways work I would prefer to go with the solution that doesn't add additional generic
parameters to methods.
    Same holds for `mergePartitionedStates()`.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message