[JBoss JIRA] (ISPN-8281) Overload collect() to take Supplier and SerializableSupplier
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8281?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8281:
-----------------------------------
Fix Version/s: 9.2.0.Final
> Overload collect() to take Supplier and SerializableSupplier
> ------------------------------------------------------------
>
> Key: ISPN-8281
> URL: https://issues.jboss.org/browse/ISPN-8281
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 9.2.0.Final
>
>
> Whenever a collect() is called in a distributed environment, you have to wrap up in a serializable supplier method call to make it serializable, e.g.
> {code}
> Map<Integer, Long> totalPerHour = cache.values().stream()
> .collect(
> CacheCollectors.serializableCollector(() -> Collectors.groupingBy(
> e -> getHourOfDay(e.departureTs),
> Collectors.counting()
> )));
> {code}
> This is a bit clunky. We should overload collect to take a SerializableSupplier in CacheStream.
> It would also be nice to have an overloaded version that takes Supplier in case you want to provide your own serialization for it.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8281) Overload collect() to take Supplier and SerializableSupplier
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8281?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8281:
-----------------------------------
Status: Open (was: New)
> Overload collect() to take Supplier and SerializableSupplier
> ------------------------------------------------------------
>
> Key: ISPN-8281
> URL: https://issues.jboss.org/browse/ISPN-8281
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
>
> Whenever a collect() is called in a distributed environment, you have to wrap up in a serializable supplier method call to make it serializable, e.g.
> {code}
> Map<Integer, Long> totalPerHour = cache.values().stream()
> .collect(
> CacheCollectors.serializableCollector(() -> Collectors.groupingBy(
> e -> getHourOfDay(e.departureTs),
> Collectors.counting()
> )));
> {code}
> This is a bit clunky. We should overload collect to take a SerializableSupplier in CacheStream.
> It would also be nice to have an overloaded version that takes Supplier in case you want to provide your own serialization for it.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8309) StateResponseOrderingTest.testStateResponseWhileRestartingBrokenTransfers failing randomly
by Galder Zamarreño (JIRA)
Galder Zamarreño created ISPN-8309:
--------------------------------------
Summary: StateResponseOrderingTest.testStateResponseWhileRestartingBrokenTransfers failing randomly
Key: ISPN-8309
URL: https://issues.jboss.org/browse/ISPN-8309
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.1.0.Final
Reporter: Galder Zamarreño
{code}
Error Message
expected:<[StateResponseOrderingTest-NodeC-20453, StateResponseOrderingTest-NodeB-7774, StateResponseOrderingTest-NodeD-65308]> but was:<[StateResponseOrderingTest-NodeB-7774, StateResponseOrderingTest-NodeC-20453, StateResponseOrderingTest-NodeD-65308]>
Stacktrace
java.lang.AssertionError: expected:<[StateResponseOrderingTest-NodeC-20453, StateResponseOrderingTest-NodeB-7774, StateResponseOrderingTest-NodeD-65308]> but was:<[StateResponseOrderingTest-NodeB-7774, StateResponseOrderingTest-NodeC-20453, StateResponseOrderingTest-NodeD-65308]>
at org.infinispan.distribution.rehash.StateResponseOrderingTest.testStateResponseWhileRestartingBrokenTransfers(StateResponseOrderingTest.java:201)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
... Removed 20 stack frames
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months