Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Instead of launching Ambari shell via
java -jar ambari-shell/target/ambari-shell-1.3.0-SNAPSHOT.jar --ambari.server=localhost --ambari.port=8080
there are 2 improvement that could be made to make it simpler and more efficient to call.
1. read the ambari server and port out of the /etc/ambari-agent/conf/ambari-agent.ini config file's [server] section if present on the system and only require --args otherwise. This could also read $AMBARI_HOST and $AMBARI_PORT out of the environment if --args aren't specified to prevent a user having to specify them over and over, I do this for my programs, it saves a lot of typing and switches (see my Ambari Nagios plugins http://github.com/harisekhon/nagios-plugins here for example).
2. Instead of calling
java -jar <full_path_to_jar>
it can be wrapped in a shell script so it's just the simpler cleaner command such as:
ambari-shell
Regards,
Hari Sekhon
http://www.linkedin.com/in/harisekhon