You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "aaron@tophold.com" <aa...@tophold.com> on 2017/07/19 03:00:47 UTC

How does node vistor task can work?

Try to fetch all nodes' statistic over the cluster but got exception:


------------------------------

for (ClusterNode node : ignite.cluster().forRemotes().nodes()) {
VisorGridConfiguration result = ignite.compute(ignite.cluster().forNode(node)).withNoFailover().execute(VisorNodeConfigurationCollectorTask.class,null);

VisorBasicConfiguration basic = result.getBasic();

build(sb, "Grid name", basic.getIgniteInstanceName());
build(sb, "Localhost", basic.getLocalHost());
build(sb, "Deployment Mode", String.valueOf(basic.getDeploymentMode()));}

------------------------------


Am I doing it wrong? or any steps missed?  very appreciate your time!

------------------------------


[ERROR] 2017-07-19 02:40:45.015 [main] [ig] GridTaskWorker - Failed to map task jobs to nodes due to undeclared user exception [cause=null, ses=GridTaskSessionImpl [taskName=o.a.i.i.v.node.VisorNodeCon
figurationCollectorTask, dep=LocalDeployment [super=GridDeployment [ts=1500432039515, depMode=SHARED, clsLdr=org.springframework.boot.loader.LaunchedURLClassLoader@2f2c9b19, clsLdrId=e97f7b85d51-1a2521
48-ca73-448e-b6bb-b2d2327e6dd6, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false, usage=0]], taskClsName=o.a.i.i.v.node.VisorNodeConfigurationCollectorTask, 
sesId=bb7f7b85d51-1a252148-ca73-448e-b6bb-b2d2327e6dd6, startTime=1500432044985, endTime=9223372036854775807, taskNodeId=1a252148-ca73-448e-b6bb-b2d2327e6dd6, clsLdr=org.springframework.boot.loader.Lau
nchedURLClassLoader@2f2c9b19, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=true, subjId=1a252148-ca73-448e-b6bb-b2d2327e6dd6, mapFut=IgniteFuture [orig=GridFut
ureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=1582785598]], execName=null]]
java.lang.NullPointerException: null
        at org.apache.ignite.internal.visor.VisorMultiNodeTask.map(VisorMultiNodeTask.java:72) ~[ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.visor.VisorMultiNodeTask.map(VisorMultiNodeTask.java:46) ~[ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.processors.task.GridTaskWorker$2.call(GridTaskWorker.java:516) ~[ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.processors.task.GridTaskWorker$2.call(GridTaskWorker.java:514) ~[ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6621) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:513) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:743) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:383) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.IgniteComputeImpl.executeAsync0(IgniteComputeImpl.java:527) [ignite-core-2.0.0.jar!/:2.0.0]
        at org.apache.ignite.internal.IgniteComputeImpl.execute(IgniteComputeImpl.java:497) [ignite-core-2.0.0.jar!/:2.0.0]
        at com.tophold.trade.ignite.SanityUtil.warnNodesMetrics(SanityUtil.java:173) [trade-ignite-0.0.1.jar!/:?]
        at com.tophold.trade.pnl.config.IgniteConfig.compute(IgniteConfig.java:38) [classes!/:?]
        at com.tophold.trade.pnl.config.IgniteConfig$$EnhancerBySpringCGLIB$$9e75fac8.CGLIB$compute$0(<generated>) [classes!/:?]
        at com.tophold.trade.pnl.config.IgniteConfig$$EnhancerBySpringCGLIB$$9e75fac8$$FastClassBySpringCGLIB$$d6c8648c.invoke(<generated>) [classes!/:?]
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [spring-core-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) [spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at com.tophold.trade.pnl.config.IgniteConfig$$EnhancerBySpringCGLIB$$9e75fac8.compute(<generated>) [classes!/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) [spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) [spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) [spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at com.tophold.trade.pnl.Application.main(Application.java:12) [classes!/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]



aaron@tophold.com

Re: Re: How does node vistor task can work?

Posted by "aaron@tophold.com" <aa...@tophold.com>.
Got very appreciate,  thanks Mikhail!

Regards
Aaron


aaron@tophold.com
 
From: mcherkasov
Date: 2017-07-19 22:29
To: user
Subject: Re: How does node vistor task can work?
Hi Arron,
 
you use internal classes that isn't part of public api, please read this
article:
https://apacheignite.readme.io/docs/memory-and-cache-metrics
 
it explains how to get memory and cache metrics.
 
Thanks,
Mikhail.
 
 
 
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-does-node-vistor-task-can-work-tp15095p15124.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How does node vistor task can work?

Posted by mcherkasov <mc...@gridgain.com>.
Hi Arron,

you use internal classes that isn't part of public api, please read this
article:
https://apacheignite.readme.io/docs/memory-and-cache-metrics

it explains how to get memory and cache metrics.

Thanks,
Mikhail.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-does-node-vistor-task-can-work-tp15095p15124.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re: How does node vistor task can work?

Posted by "aaron@tophold.com" <aa...@tophold.com>.
got thanks!!!



aaron@tophold.com
 
From: ezhuravlev
Date: 2017-07-19 21:21
To: user
Subject: Re: How does node vistor task can work?
You don't need to use Visor tasks to get statistics.
 
Try this:
 
ignite.cluster().metrics()
or 
ignite.cluster().node(node).metrics()
 
Evgeniii
 
 
 
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-does-node-vistor-task-can-work-tp15095p15121.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How does node vistor task can work?

Posted by ezhuravlev <e....@gmail.com>.
You don't need to use Visor tasks to get statistics.

Try this:

ignite.cluster().metrics()
or 
ignite.cluster().node(node).metrics()

Evgeniii



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-does-node-vistor-task-can-work-tp15095p15121.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.