[infinispan-issues] [JBoss JIRA] (ISPN-2923) provides an optimal way to search and retrieve the first non null value

Mathieu Lachance (JIRA) jira-events at lists.jboss.org
Wed Mar 27 17:27:42 EDT 2013


    [ https://issues.jboss.org/browse/ISPN-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763642#comment-12763642 ] 

Mathieu Lachance commented on ISPN-2923:
----------------------------------------

I did not ended up with null values in the cache. Sorry for the confusion.

When I was saying searching, I was referring more to this scenario :

for each (Map.Entry<K, V> entry : cache.values()){
  if (entry.getValue().getACertainField().equals(aCertainValue)){
      return entry;
  }
}

but in a distributed fashion.

By providing a stop in the map reduce operation we could achieve this.
                
> provides an optimal way to search and retrieve the first non null value
> -----------------------------------------------------------------------
>
>                 Key: ISPN-2923
>                 URL: https://issues.jboss.org/browse/ISPN-2923
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Distributed Execution and Map/Reduce
>    Affects Versions: 5.2.5.Final
>            Reporter: Mathieu Lachance
>            Assignee: Vladimir Blagojevic
>
> It would be nice if infinispan could provide a way to the common problem of searching and retrieve the first non null value.
> My attempt was to use the map reduce framework, but it would still scan all the keys and value even if the result as been found. Maybe Infinispan could provide a way to "stop" the map-reduce operation on all nodes when asked, ex, when the first non null value has been found ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list