Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CF131200C10 for ; Fri, 3 Feb 2017 17:41:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CDB88160B55; Fri, 3 Feb 2017 16:41:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2161C160B3F for ; Fri, 3 Feb 2017 17:41:55 +0100 (CET) Received: (qmail 36091 invoked by uid 500); 3 Feb 2017 16:41:55 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 36079 invoked by uid 99); 3 Feb 2017 16:41:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2017 16:41:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B4FF4C1EA9 for ; Fri, 3 Feb 2017 16:41:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id dYOZUI_KLlnC for ; Fri, 3 Feb 2017 16:41:53 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1883F5F5F8 for ; Fri, 3 Feb 2017 16:41:53 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2C5EAE01A7 for ; Fri, 3 Feb 2017 16:41:52 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 84B4425286 for ; Fri, 3 Feb 2017 16:41:51 +0000 (UTC) Date: Fri, 3 Feb 2017 16:41:51 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-5024) Add SimpleStateDescriptor to clarify the concepts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Feb 2017 16:41:57 -0000 [ https://issues.apache.org/jira/browse/FLINK-5024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851686#comment-15851686 ] ASF GitHub Bot commented on FLINK-5024: --------------------------------------- Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3243#discussion_r99374243 --- Diff: flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java --- @@ -20,34 +20,29 @@ import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.api.common.ExecutionConfig; -import org.apache.flink.api.common.typeinfo.TypeInformation; -import org.apache.flink.api.common.typeutils.TypeSerializer; -import org.apache.flink.api.java.typeutils.TypeExtractor; -import org.apache.flink.core.memory.DataInputViewStreamWrapper; -import org.apache.flink.core.memory.DataOutputViewStreamWrapper; import org.apache.flink.util.Preconditions; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.io.Serializable; import static java.util.Objects.requireNonNull; /** - * Base class for state descriptors. A {@code StateDescriptor} is used for creating partitioned - * {@link State} in stateful operations. This contains the name and can create an actual state - * object given a {@link StateBackend} using {@link #bind(StateBackend)}. - * + * Base class for state descriptors. A {@code StateDescriptor} is used for creating + * {@link State keyed state} in stateful operations. The descriptor contains the name of the state, --- End diff -- Please close this issue as well if you address this here: https://issues.apache.org/jira/browse/FLINK-5599 > Add SimpleStateDescriptor to clarify the concepts > ------------------------------------------------- > > Key: FLINK-5024 > URL: https://issues.apache.org/jira/browse/FLINK-5024 > Project: Flink > Issue Type: Improvement > Components: State Backends, Checkpointing > Reporter: Xiaogang Shi > Assignee: Xiaogang Shi > > Currently, StateDescriptors accept two type arguments : the first one is the type of the created state and the second one is the type of the values in the states. > The concepts however is a little confusing here because in ListStates, the arguments passed to the StateDescriptors are the types of the list elements instead of the lists. It also makes the implementation of MapStates difficult. > I suggest not to put the type serializer in StateDescriptors, making StateDescriptors independent of the data structures of the values. > A new type of StateDescriptor named SimpleStateDescriptor can be provided to abstract those states (namely ValueState, ReducingState and FoldingState) whose states are not composited. > The states (e.g. ListStates and MapStates) can implement their own descriptors according to their data structures. -- This message was sent by Atlassian JIRA (v6.3.15#6346)