You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Jingsong Lee (JIRA)" <ji...@apache.org> on 2017/01/17 12:02:26 UTC

[jira] [Commented] (BEAM-41) State for "Set" data, supporting efficient membership checks

    [ https://issues.apache.org/jira/browse/BEAM-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15825944#comment-15825944 ] 

Jingsong Lee commented on BEAM-41:
----------------------------------

Hi, Our project is great need of SetState. Is it blocked by some thing?
Is there anything I can do to help? I am very happy to be involved.
{code:title=Bar.java|borderStyle=solid}
public interface SetState<T> extends CombiningState<T, Iterable<T>> {
  /**
   * Returns true if this set contains the specified element.
   */
  boolean contains(T t);

  /**
   * Add a value to the buffer if it is not already present.
   * If this set already contains the element, the call leaves the set
   * unchanged and returns false.
   */
  boolean addIfAbsent(T t);

  @Override
  SetState<T> readLater();
}
{code}
Is this interface appropriate?

I want to do some optimization on SetState in my runners(as well as MapState).

> State for "Set" data, supporting efficient membership checks
> ------------------------------------------------------------
>
>                 Key: BEAM-41
>                 URL: https://issues.apache.org/jira/browse/BEAM-41
>             Project: Beam
>          Issue Type: New Feature
>          Components: beam-model
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Minor
>              Labels: State
>
> Analogous to how BagState supports efficient blind writes, a SetState would support efficient membership checking without reading the entire set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)