We are running samza job on hadoop yarn. Till now we were manually deploying job by calling run-job.sh on Resource Manager host.
run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file:///usr/share/promo-rules-consumer/config/config.properties
Samza deploy script and samza distribtuion tar "samza-dist.tar.gz" are all placed on Resource Manager local file system.
But now I would like to deploy jobs remotely. For this I am trying to use Resource Manager Submit apps rest API .
Request: POST http://hostname:8088/ws/v1/cluster/apps
Body :
{
"application-id":"application_1470648527247_0031",
"application-name":"test1_0",
"am-container-spec":
{
"commands":
{
"command":"/usr/share/promo-rules-consumer/bin/run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file:///usr/share/promo-rules-consumer/config/montecarlo.properties"
}
},
"application-type":"SAMZA"
}
However I can see error from resource manager UI
Exception message: /bin/bash: /usr/share/promo-rules-consumer/bin/run-job.sh: No such file or directory
Please tell me the correct way of doing this. Is there any link showing deployment of samza job through rest API or through java code.
Thanks