Hi,
i'm trying to run the helix-agent. But I can't seem to figure out how to
configure the command that should be run when the statetransition changes
from offline to online.
I have tried with a simple setup : One instance and one resource
IdealState for simpleHttpServer:
{
"id" : "simpleHttpServer",
"mapFields" : {
"simpleHttpServer_0" : {
"vbxl003_80" : "ONLINE"
},
"simpleHttpServer_1" : {
"vbxl003_80" : "ONLINE"
},
"simpleHttpServer_2" : {
"vbxl003_80" : "ONLINE"
}
},
"listFields" : {
"simpleHttpServer_0" : [ "vbxl003_80" ],
"simpleHttpServer_1" : [ "vbxl003_80" ],
"simpleHttpServer_2" : [ "vbxl003_80" ]
},
"simpleFields" : {
"COMMAND" : "/tmp/simpleHttpServer.py",
"IDEAL_STATE_MODE" : "AUTO",
"NUM_PARTITIONS" : "3",
"OFFLINE-ONLINE.COMMAND" : "/tmp/simpleHttpServer.py",
"REBALANCE_MODE" : "SEMI_AUTO",
"REPLICAS" : "1",
"STATE_MODEL_DEF_REF" : "OnlineOffline",
"STATE_MODEL_FACTORY_NAME" : "DEFAULT"
}
}
ExternalView for simpleHttpServer:
{
"id" : "simpleHttpServer",
"mapFields" : {
},
"listFields" : {
},
"simpleFields" : {
"BUCKET_SIZE" : "0"
}
But when I start the agent I get following error :
677 [pool-2-thread-1] ERROR
org.apache.helix.messaging.handling.HelixStateTransitionHandler -
Exception while executing a state transition task simpleHttpServer_0
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.helix.messaging.handling.HelixStateTransitionHandler.invoke(HelixStateTransitionHandler.java:299)
at
org.apache.helix.messaging.handling.HelixStateTransitionHandler.handleMessage(HelixStateTransitionHandler.java:253)
at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:85)
at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:42)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.Exception: Unable to find command for transition
from:OFFLINE to:ONLINE
So the agent can not find what command should be executed when going from
OFFLINE to ONLINE.
I also tried to edit the configs tree in the znode
get /VAPH_DEV/CONFIGS/RESOURCE/simpleHttpServer
{
"id" : "simpleHttpServer",
"simpleFields" : {
"COMMAND" : "/tmp/simpleHttpServer.py",
"WORKING_DIR" : "/tmp",
"PID" : "/tmp/mypid",
"OFFLINE-ONLINE.COMMAND" : "/tmp/simpleHttpServer.py"
},
"listFields" : {
},
"mapFields" : {
}
}
But that didn't work either.
Can someone point me in the right direction ? Where en how do define the
command that the agent should execute.
Regards,
Benoît
--
Benoît Vanderbeck
Systeembeheerder VAPH
tel: +32 2 225 84 80
--
Raadpleeg uw VAPH-dossier online via http://mijn.vaph.be.
------------------------------------------------------------
---------------------
http://www.vaph.be/disclaimer