Author: smohanty
Date: Mon Apr 13 06:05:23 2015
New Revision: 1673115
URL: http://svn.apache.org/r1673115
Log:
Doc update for hello world app
Modified:
incubator/slider/site/trunk/content/docs/slider_specs/hello_world_slider_app.md
Modified:
incubator/slider/site/trunk/content/docs/slider_specs/hello_world_slider_app.md
URL:
http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/slider_specs/hello_world_slider_app.md?rev=1673115&r1=1673114&r2=1673115&view=diff
==============================================================================
---
incubator/slider/site/trunk/content/docs/slider_specs/hello_world_slider_app.md
(original)
+++
incubator/slider/site/trunk/content/docs/slider_specs/hello_world_slider_app.md
Mon Apr 13 06:05:23 2015
@@ -133,13 +133,10 @@ The config template has few mandatory pa
* `application.def` - location of the application definition package in
default FS (e.g. HDFS). *This is where the application package is stored.*
* `java_home` - location of java on target hosts
-* `package_list` - location of the app tarball in the app package (relative
path starting at **files**)
-* `config_types` - leave it as empty string
-* `site.global.app_user` - the user that is running the app (e.g. "yarn")
-* `site.global.app_root` - location of app root, Slider extracts the tarball
at ${AGENT_WORK_ROOT}/app/install/, so append the relative path based on the
application tarball structure (e.g. jmemcached-1.0.0 for this package)
Add other parameters needed by the application itself. Currently we support
three parameters
+* `site.global.additional_cp` - this package uses this variable to provide the
location of other helper jars - ones found in the hadoop client jars location
(e.g. /usr/lib/hadoop/lib, your deployment may have the jars in a different
location)
* `site.global.xmx_val` - value of Xmx
* `site.global.xms_val` - value of Xms
* `site.global.memory_val` - value of memory
@@ -214,7 +211,6 @@ Note that the `parameter.py` file only r
process_cmd = format("{java64_home}/bin/java -Xmx{xmx_val}
-Xms{xms_val} -classpath {app_root}/*:{additional_cp}
com.thimbleware.jmemcached.Main --memory={memory_val} --port={port}")
Execute(process_cmd,
- user=params.app_user,
logoutput=False,
wait_for_finish=False,
pid_file=params.pid_file
@@ -228,10 +224,26 @@ Note that the `parameter.py` file only r
import params
env.set_params(params)
check_process_status(params.pid_file)
+
+ if __name__ == "__main__":
+ Memcached().execute()
Thats pretty much it. The script basically does the following:
* Expand the given tarball
* Reads the provided configuration and creates the command string
* Executes the command to start jmemcached
-* Start writes the PID into a file that is used to check status of the daemon
\ No newline at end of file
+* Start writes the PID into a file that is used to check status of the daemon
+
+## Debugging Tips
+End of the day, the above package runs the following command - post formatting
+
+ format("{java64_home}/bin/java -Xmx{xmx_val} -Xms{xms_val} -classpath
{app_root}/*:{additional_cp} com.thimbleware.jmemcached.Main
--memory={memory_val} --port={port}")
+
+which, expands to
+
+ /usr/jdk64/jdk1.7.0_67/bin/java -Xmx256m -Xms128m -classpath
/hadoop/yarn/local/usercache/yarn/appcache/application_1428879923172_0003/container_e01_1428879923172_0003_01_000002/app/install/*:/usr/lib/hadoop/lib/*
com.thimbleware.jmemcached.Main --memory=200M --port=37539
+
+ port and memory are based on the input provided. And, class path includes
YARN container location for the active container where the tarball got expanded.
+
+So, without Slider/YARN, one should be able to execute the command above and
see memcached up and running. It might be a better option to try the command
first to ensure that you have the right tarballs and environment to run
memcached.
\ No newline at end of file