[JBoss JIRA] (ISPN-9682) NullPointerException when put to JCache
by Katia Aresti (Jira)
[ https://issues.jboss.org/browse/ISPN-9682?page=com.atlassian.jira.plugin.... ]
Katia Aresti reassigned ISPN-9682:
----------------------------------
Assignee: Katia Aresti
> NullPointerException when put to JCache
> ---------------------------------------
>
> Key: ISPN-9682
> URL: https://issues.jboss.org/browse/ISPN-9682
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 9.4.0.Final, 9.4.1.Final
> Reporter: Andrei Arkaev
> Assignee: Katia Aresti
> Priority: Blocker
>
> After upgrade from 9.4.0.RC3 to 9.4.0.Final (and 9.4.1.Final too) I have an error
> java.lang.NullPointerException: null
> at org.infinispan.functional.impl.AbstractFunctionalMap.invokeAsync(AbstractFunctionalMap.java:127)
> at org.infinispan.functional.impl.ReadWriteMapImpl.eval(ReadWriteMapImpl.java:70)
> at org.infinispan.jcache.embedded.JCache.put(JCache.java:409)
> Cache configuration
> <local-cache
> name="SomeGlobalCache"
> simple-cache="true"
> statistics="false"
> statistics-available="false">
> <transaction mode="NONE"/>
> </local-cache>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9686) Simplified clustered executor single node submission
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9686?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-9686:
-------------------------------------
My idea is something like
{code}
interface SingleNodeExecutor extends ClusterExecutor {
SingleNodeExecutor target(Address targetNode);
<R> CompletionStage<R> submitFunction(Function<? super EmbeddedCacheManager, ? extends R> function);
... truncate duplicate overrides ...
}
{code}
We would also have to override the other various methods to return SingleNodeExecutor as well in this interface
> Simplified clustered executor single node submission
> ----------------------------------------------------
>
> Key: ISPN-9686
> URL: https://issues.jboss.org/browse/ISPN-9686
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Diego Lovison
> Priority: Major
>
> When working with *DistributedExecutorService* I can do the following
> {code:java}
> DistributedTask<Boolean> distributedTask = taskBuilder.build();
> Future<Boolean> future = des.submit(distributedTask);
> Boolean r = future.get();
> {code}
> But *DistributedExecutorService* is deprecated and we should use ClusterExecutor
> As a developer, I would like to execute a function in another node and get the result.
> I am expecting something like:
> {code:java}
> CompletableFuture<Boolean> future = master.executor().singleNodeSubmission(address, task);
> Boolean r = future.get();
> {code}
> Today, I need the following code to achieve the same result
> {code:java}
> class MutableString {
> String value;
> }
> MutableString mString = new MutableString();
> SerializableFunction<EmbeddedCacheManager, String> callable = (cm) -> {
> return "foo";
> };
> TriConsumer<Address, String, Throwable> triConsumer = (a, v, t) -> {
> mString.value = v;
> };
> master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitConsumer(callable, triConsumer).get();
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9686) Simplified clustered executor single node submission
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9686?page=com.atlassian.jira.plugin.... ]
William Burns edited comment on ISPN-9686 at 11/6/18 1:01 PM:
--------------------------------------------------------------
My idea is something like
{code}
interface SingleNodeExecutor extends ClusterExecutor {
SingleNodeExecutor filterTarget(Address targetNode);
<R> CompletionStage<R> submitFunction(Function<? super EmbeddedCacheManager, ? extends R> function);
... truncate duplicate overrides ...
}
{code}
We would also have to override the other various methods to return SingleNodeExecutor as well in this interface
was (Author: william.burns):
My idea is something like
{code}
interface SingleNodeExecutor extends ClusterExecutor {
SingleNodeExecutor target(Address targetNode);
<R> CompletionStage<R> submitFunction(Function<? super EmbeddedCacheManager, ? extends R> function);
... truncate duplicate overrides ...
}
{code}
We would also have to override the other various methods to return SingleNodeExecutor as well in this interface
> Simplified clustered executor single node submission
> ----------------------------------------------------
>
> Key: ISPN-9686
> URL: https://issues.jboss.org/browse/ISPN-9686
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Diego Lovison
> Priority: Major
>
> When working with *DistributedExecutorService* I can do the following
> {code:java}
> DistributedTask<Boolean> distributedTask = taskBuilder.build();
> Future<Boolean> future = des.submit(distributedTask);
> Boolean r = future.get();
> {code}
> But *DistributedExecutorService* is deprecated and we should use ClusterExecutor
> As a developer, I would like to execute a function in another node and get the result.
> I am expecting something like:
> {code:java}
> CompletableFuture<Boolean> future = master.executor().singleNodeSubmission(address, task);
> Boolean r = future.get();
> {code}
> Today, I need the following code to achieve the same result
> {code:java}
> class MutableString {
> String value;
> }
> MutableString mString = new MutableString();
> SerializableFunction<EmbeddedCacheManager, String> callable = (cm) -> {
> return "foo";
> };
> TriConsumer<Address, String, Throwable> triConsumer = (a, v, t) -> {
> mString.value = v;
> };
> master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitConsumer(callable, triConsumer).get();
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9686) Simplified clustered executor single node submission
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9686?page=com.atlassian.jira.plugin.... ]
William Burns edited comment on ISPN-9686 at 11/6/18 1:01 PM:
--------------------------------------------------------------
More than likely it would look something similar to:
{code}
master.executor().singleNodeSubmission().filterTarget(address).submitFunction(cm -> "foo").get();
{code}
was (Author: william.burns):
More than likely it would look something similar to:
{code}
master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitFunction(cm -> "foo").get();
{code}
> Simplified clustered executor single node submission
> ----------------------------------------------------
>
> Key: ISPN-9686
> URL: https://issues.jboss.org/browse/ISPN-9686
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Diego Lovison
> Priority: Major
>
> When working with *DistributedExecutorService* I can do the following
> {code:java}
> DistributedTask<Boolean> distributedTask = taskBuilder.build();
> Future<Boolean> future = des.submit(distributedTask);
> Boolean r = future.get();
> {code}
> But *DistributedExecutorService* is deprecated and we should use ClusterExecutor
> As a developer, I would like to execute a function in another node and get the result.
> I am expecting something like:
> {code:java}
> CompletableFuture<Boolean> future = master.executor().singleNodeSubmission(address, task);
> Boolean r = future.get();
> {code}
> Today, I need the following code to achieve the same result
> {code:java}
> class MutableString {
> String value;
> }
> MutableString mString = new MutableString();
> SerializableFunction<EmbeddedCacheManager, String> callable = (cm) -> {
> return "foo";
> };
> TriConsumer<Address, String, Throwable> triConsumer = (a, v, t) -> {
> mString.value = v;
> };
> master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitConsumer(callable, triConsumer).get();
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9686) Simplified clustered executor single node submission
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9686?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-9686:
-------------------------------------
More than likely it would look something similar to:
{code}
master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitFunction(cm -> "foo").get();
{code}
> Simplified clustered executor single node submission
> ----------------------------------------------------
>
> Key: ISPN-9686
> URL: https://issues.jboss.org/browse/ISPN-9686
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Diego Lovison
> Priority: Major
>
> When working with *DistributedExecutorService* I can do the following
> {code:java}
> DistributedTask<Boolean> distributedTask = taskBuilder.build();
> Future<Boolean> future = des.submit(distributedTask);
> Boolean r = future.get();
> {code}
> But *DistributedExecutorService* is deprecated and we should use ClusterExecutor
> As a developer, I would like to execute a function in another node and get the result.
> I am expecting something like:
> {code:java}
> CompletableFuture<Boolean> future = master.executor().singleNodeSubmission(address, task);
> Boolean r = future.get();
> {code}
> Today, I need the following code to achieve the same result
> {code:java}
> class MutableString {
> String value;
> }
> MutableString mString = new MutableString();
> SerializableFunction<EmbeddedCacheManager, String> callable = (cm) -> {
> return "foo";
> };
> TriConsumer<Address, String, Throwable> triConsumer = (a, v, t) -> {
> mString.value = v;
> };
> master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitConsumer(callable, triConsumer).get();
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9686) Simplified clustered executor single node submission
by Diego Lovison (Jira)
Diego Lovison created ISPN-9686:
-----------------------------------
Summary: Simplified clustered executor single node submission
Key: ISPN-9686
URL: https://issues.jboss.org/browse/ISPN-9686
Project: Infinispan
Issue Type: Enhancement
Reporter: Diego Lovison
When working with *DistributedExecutorService* I can do the following
{code:java}
DistributedTask<Boolean> distributedTask = taskBuilder.build();
Future<Boolean> future = des.submit(distributedTask);
Boolean r = future.get();
{code}
But *DistributedExecutorService* is deprecated and we should use ClusterExecutor
As a developer, I would like to execute a function in another node and get the result.
I am expecting something like:
{code:java}
CompletableFuture<Boolean> future = master.executor().singleNodeSubmission(address, task);
Boolean r = future.get();
{code}
Today, I need the following code to achieve the same result
{code:java}
class MutableString {
String value;
}
MutableString mString = new MutableString();
SerializableFunction<EmbeddedCacheManager, String> callable = (cm) -> {
return "foo";
};
TriConsumer<Address, String, Throwable> triConsumer = (a, v, t) -> {
mString.value = v;
};
master.executor().singleNodeSubmission().filterTargets(a -> a.equals(address)).submitConsumer(callable, triConsumer).get();
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9682) NullPointerException when put to JCache
by Andrei Arkaev (Jira)
[ https://issues.jboss.org/browse/ISPN-9682?page=com.atlassian.jira.plugin.... ]
Andrei Arkaev commented on ISPN-9682:
-------------------------------------
I need simple in-memory cache with no serialization/deserialization with JCache-api. What should I use?
> NullPointerException when put to JCache
> ---------------------------------------
>
> Key: ISPN-9682
> URL: https://issues.jboss.org/browse/ISPN-9682
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 9.4.0.Final, 9.4.1.Final
> Reporter: Andrei Arkaev
> Priority: Blocker
>
> After upgrade from 9.4.0.RC3 to 9.4.0.Final (and 9.4.1.Final too) I have an error
> java.lang.NullPointerException: null
> at org.infinispan.functional.impl.AbstractFunctionalMap.invokeAsync(AbstractFunctionalMap.java:127)
> at org.infinispan.functional.impl.ReadWriteMapImpl.eval(ReadWriteMapImpl.java:70)
> at org.infinispan.jcache.embedded.JCache.put(JCache.java:409)
> Cache configuration
> <local-cache
> name="SomeGlobalCache"
> simple-cache="true"
> statistics="false"
> statistics-available="false">
> <transaction mode="NONE"/>
> </local-cache>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month