You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/04/08 08:59:01 UTC

[GitHub] [flink] tzulitai commented on a change in pull request #8078: [FLINK-12066] [State Backends] Remove StateSerializerProvider field in keyed state backends

tzulitai commented on a change in pull request #8078: [FLINK-12066] [State Backends] Remove StateSerializerProvider field in keyed state backends
URL: https://github.com/apache/flink/pull/8078#discussion_r272922020
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapInternalKeyContext.java
 ##########
 @@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.state.heap;
+
+import org.apache.flink.api.common.typeutils.TypeSerializer;
+import org.apache.flink.runtime.state.KeyGroupRange;
+
+/**
+ * The {@link InternalKeyContext} for heap keyed backend.
+ *
+ * @param <K> Type of the key.
+ */
+public class HeapInternalKeyContext<K> implements InternalKeyContext<K> {
+	private final KeyGroupRange keyGroupRange;
+	private final int numberOfKeyGroups;
+
+	private K currentKey;
+	private int currentKeyGroupIndex;
+	private TypeSerializer<K> keySerializer;
+
+	HeapInternalKeyContext(KeyGroupRange keyGroupRange, int numberOfKeyGroups, TypeSerializer<K> keySerializer) {
+		this.keyGroupRange = keyGroupRange;
+		this.numberOfKeyGroups = numberOfKeyGroups;
+		this.keySerializer = keySerializer;
 
 Review comment:
   Maybe some sanity checks (e.g. non-null, non-negative) will make sense here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services