You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Steve Scheck <ss...@silverspringnet.com> on 2016/02/06 02:52:50 UTC

Exception when deploying cluster service

I’m seeing this exception when my Service implementation calls loadCache() from within its init() method:

Caused by: org.apache.ignite.IgniteCheckedException: class org.apache.ignite.IgniteCheckedException: Sessions attributes and checkpoints are disabled by default for better performance (to enable, annotate task class with @GridComputeTaskSessionFullSupport annotation).
at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6753) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:124) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at org.apache.ignite.internal.AsyncSupportAdapter.saveOrGet(AsyncSupportAdapter.java:111) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at org.apache.ignite.internal.IgniteServicesImpl.deployClusterSingleton(IgniteServicesImpl.java:93) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
... 174 common frames omitted
Caused by: javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Sessions attributes and checkpoints are disabled by default for better performance (to enable, annotate task class with @GridComputeTaskSessionFullSupport annotation).
at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1581) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:1689) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.loadCache(IgniteCacheProxy.java:318) ~[ignite-core-1.3.0-incubating.jar!/:1.3.0-incubating]
at my.service.MyService.init(MyService.java:284) ~[classes!/:na]

I see no mention of the need to annotate Service implementations with @ComputeTaskSessionFullSupport in the docs. What am I missing?

Thanks.


Re: Exception when deploying cluster service

Posted by Steve Scheck <ss...@silverspringnet.com>.
Val,

I added this method and call it before submitting jobs to my CollisionSpi implementation’s processing logic:

private boolean supportsAttributes(CollisionJobContext collisionJobContext)
{
    return collisionJobContext.getJob().getClass().isAnnotationPresent(ComputeTaskSessionFullSupport.class);
}


It appears to work around the IGNITE-2570 issue for now.

Thanks.



On 2/5/16, 9:48 PM, "vkulichenko" <va...@gmail.com> wrote:

>Steve,
>
>Looks like some of our internal jobs are not marked with the special
>annotation that should prevent from such issues. I create a ticket to fix
>this [1].
>
>As a workaround I can suggest to filter out our jobs by package name
>(org.apache.ignite) and apply your custom logic only to your jobs. Can you
>try this and see if it works?
>
>[1] https://issues.apache.org/jira/browse/IGNITE-2570
>
>-Val
>
>
>
>--
>View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-when-deploying-cluster-service-tp2868p2871.html
>Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Exception when deploying cluster service

Posted by vkulichenko <va...@gmail.com>.
Steve,

Looks like some of our internal jobs are not marked with the special
annotation that should prevent from such issues. I create a ticket to fix
this [1].

As a workaround I can suggest to filter out our jobs by package name
(org.apache.ignite) and apply your custom logic only to your jobs. Can you
try this and see if it works?

[1] https://issues.apache.org/jira/browse/IGNITE-2570

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-when-deploying-cluster-service-tp2868p2871.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Exception when deploying cluster service

Posted by Steve Scheck <ss...@silverspringnet.com>.
Yes. In fact I’ve defined my own CollisionSpi implementation which calls CollisionJobContext.getTaskSession().getAttribute() on the CollisionContext jobs. For my own jobs, I’ve used the @ComputeTaskSessionFullSupport annotation to make it work. I do see my CollisionSpi in the longer stack trace produced by the exception. My guess is that it’s calling getAttribute() on the Ignite loadCache() distributed task, which is not annotated.

How can I fix this?

Thanks,
-Steve





On 2/5/16, 7:11 PM, "vkulichenko" <va...@gmail.com> wrote:

>Hi Steve,
>
>This exception looks very weird. loadCache() method does execute a
>distributed task under the hood, but it never uses task session
>functionality, so this error should never happen.
>
>Are you using IgniteCompute API to run your own closures and/or tasks?
>
>Can you please go through logs for all nodes in the topology and check if
>there are any other exceptions?
>
>-Val
>
>
>
>--
>View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-when-deploying-cluster-service-tp2868p2869.html
>Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Exception when deploying cluster service

Posted by vkulichenko <va...@gmail.com>.
Hi Steve,

This exception looks very weird. loadCache() method does execute a
distributed task under the hood, but it never uses task session
functionality, so this error should never happen.

Are you using IgniteCompute API to run your own closures and/or tasks?

Can you please go through logs for all nodes in the topology and check if
there are any other exceptions?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-when-deploying-cluster-service-tp2868p2869.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.