Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-27-2017 03:03 AM
I use ambari and HDP.
Recently,I use flume,but I found that:
I had add a agent on flume,and it started,when I want add a new flume agent ,the config of new flume agent not appreaed on the configure,I had to restart the whole flume service.
Is there a way to add and start the new flume without restart all the flume service ??
Created 03-27-2017 03:46 AM
Can you try to start the newly added flume agent using the Ambari APIs?
Example:
curl -u admin:admin -H "X-Requested-By: ambari" -d '{"RequestInfo":{"context":"Starting Flume agent","flume_handler":"agent","operation_level": {"level":"HOST_COMPONENT","cluster_name":"Cluster","service_name":"FLUME","host_name":"${hostname_of_new_flume_agent}"}},"Body":{"HostRoles":{"state":"STARTED"}}}' -X PUT "http://${AMBARI_HOST}:8080/api/v1/clusters/${CLUSTER_NAME}/hosts/${hostname_of_new_flume_agent}/host_components/FLUME_HANDLER".
Please replace the values present inside the ${} according to your environment.
Created 03-27-2017 03:46 AM
Can you try to start the newly added flume agent using the Ambari APIs?
Example:
curl -u admin:admin -H "X-Requested-By: ambari" -d '{"RequestInfo":{"context":"Starting Flume agent","flume_handler":"agent","operation_level": {"level":"HOST_COMPONENT","cluster_name":"Cluster","service_name":"FLUME","host_name":"${hostname_of_new_flume_agent}"}},"Body":{"HostRoles":{"state":"STARTED"}}}' -X PUT "http://${AMBARI_HOST}:8080/api/v1/clusters/${CLUSTER_NAME}/hosts/${hostname_of_new_flume_agent}/host_components/FLUME_HANDLER".
Please replace the values present inside the ${} according to your environment.
Created 03-27-2017 06:50 AM
I try it and it works fine.
It should be:
curl -u ${ambari_user_name}:${ambari_user_pass} -H "X-Requested-By: ambari"-d '{"RequestInfo":{"context":"Starting Flume agent","flume_handler":"agent","operation_level": {"level":"HOST_COMPONENT","cluster_name":"${CLUSTER_NAME}","service_name":"FLUME","host_name":"${hostname_of_new_flume_agent}"}},"Body":{"HostRoles":{"state":"STARTED"}}}'-X PUT "http://${AMBARI_HOST}:8080/api/v1/clusters/${CLUSTER_NAME}/hosts/${hostname_of_new_flume_agent}/host_components/FLUME_HANDLER"
And now if I want do add a new agent ,I must change the configure on the ambari web ui ,then call the ambari server api above.
Why not make it more easy??