Author: stevel Date: Thu Oct 16 20:22:57 2014 New Revision: 1632431 URL: http://svn.apache.org/r1632431 Log: SLIDER-523 renumber some exit codes to match "well known" http exit codes
Modified: incubator/slider/site/trunk/content/docs/examples.md incubator/slider/site/trunk/content/docs/exitcodes.md incubator/slider/site/trunk/content/docs/manpage.md Modified: incubator/slider/site/trunk/content/docs/examples.md URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/examples.md?rev=1632431&r1=1632430&r2=1632431&view=diff ============================================================================== --- incubator/slider/site/trunk/content/docs/examples.md (original) +++ incubator/slider/site/trunk/content/docs/examples.md Thu Oct 16 20:22:57 2014 @@ -116,15 +116,11 @@ This is for demos only, otherwise you lo --zkhosts localhost:2181 --image hdfs://master:9090/hbase.tar # create the cluster + + + // TODO - slider create cl1 \ - --component worker 4 --component master 1 \ - --manager master:8032 --filesystem hdfs://master:9090 --zkhosts localhost \ - --image hdfs://master:9090/hbase.tar \ - --appconf file:////Users/slider/Hadoop/configs/master/hbase \ - --compopt master jvm.heap 128 \ - --compopt master env.MALLOC_ARENA_MAX 4 \ - --compopt worker jvm.heap 128 + # freeze the cluster (*freeze has been renamed to stop in develop branch*) slider freeze cl1 \ @@ -146,14 +142,3 @@ This is for demos only, otherwise you lo --manager master:8032 --filesystem hdfs://master:9090 \ --component worker 5 -## Create an Accumulo Cluster - - slider create accl1 --provider accumulo \ - --component master 1 --component tserver 1 --component gc 1 --component monitor 1 --component tracer 1 \ - --manager localhost:8032 --filesystem hdfs://localhost:9000 \ - --zkhosts localhost:2181 --zkpath /local/zookeeper \ - --image hdfs://localhost:9000/user/username/accumulo-1.6.0-SNAPSHOT-bin.tar \ - --appconf hdfs://localhost:9000/user/username/accumulo-conf \ - -O zk.home /local/zookeeper -O hadoop.home /local/hadoop \ - -O site.monitor.port.client 50095 -O accumulo.password secret - Modified: incubator/slider/site/trunk/content/docs/exitcodes.md URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/exitcodes.md?rev=1632431&r1=1632430&r2=1632431&view=diff ============================================================================== --- incubator/slider/site/trunk/content/docs/exitcodes.md (original) +++ incubator/slider/site/trunk/content/docs/exitcodes.md Thu Oct 16 20:22:57 2014 @@ -17,140 +17,240 @@ # Apache Slider Client Exit Codes -Here are the exit codes returned +Here are the exit codes returned by slider -Exit code values 1 and 2 are interpreted by YARN -in particular converting the -"1" value from an error into a successful shut down. Slider -converts the -1 error code from a forked process into `EXIT_MASTER_PROCESS_FAILED`; -no. 72. +Many of the exit codes are designed to resemble HTTP error codes, +squashed into a single byte. e.g 44 , "not found" is the equivalent +of 404 +**0-10** general command issues +**30-39** equivalent to the 3XX responses, where those responses are + considered errors by the application. + +**40-49** request-related errors + +**50-59** server-side problems. These may be triggered by the request. + +**64+** application specific error codes + + + + /** * 0: success */ int EXIT_SUCCESS = 0; - + /** * -1: generic "false" response. The operation worked but * the result was not true */ int EXIT_FALSE = -1; - + /** - * Exit code when a client requested service termination: + * Exit code when a client requested service termination: {@value} */ int EXIT_CLIENT_INITIATED_SHUTDOWN = 1; - + /** - * Exit code when targets could not be launched: + * Exit code when targets could not be launched: {@value} */ int EXIT_TASK_LAUNCH_FAILURE = 2; - - /** - * Exit code when an exception was thrown from the service: - */ - int EXIT_EXCEPTION_THROWN = 32; - - /** - * Exit code when a usage message was printed: - */ - int EXIT_USAGE = 33; - - /** - * Exit code when something happened but we can't be specific: - */ - int EXIT_OTHER_FAILURE = 34; - + /** - * Exit code when a control-C, kill -3, signal was picked up: + * Exit code when a control-C, kill -3, signal was picked up: {@value} */ - - int EXIT_INTERRUPTED = 35; - + int EXIT_INTERRUPTED = 3; + /** - * Exit code when the command line doesn't parse:, or - * when it is otherwise invalid. + * Exit code when a usage message was printed: {@value} */ - int EXIT_COMMAND_ARGUMENT_ERROR = 36; - + int EXIT_USAGE = 4; + /** - * Exit code when the configurations in valid/incomplete: + * Exit code when something happened but we can't be specific: {@value} */ - int EXIT_BAD_CONFIGURATION = 37; - + int EXIT_OTHER_FAILURE = 5; + /** - * Exit code when the configurations in valid/incomplete: + * Exit code on connectivity problems: {@value} */ - int EXIT_CONNECTIVTY_PROBLEM = 38; + int EXIT_MOVED = 31; /** - * internal error: {@value} + * found: {@value}. + * <p> + * This is low value as in HTTP it is normally a success/redirect; + * whereas on the command line 0 is the sole success code. + * <p> + * <code>302 Found</code> */ - int EXIT_INTERNAL_ERROR = 64; - + int EXIT_FOUND = 32; + /** - * Unimplemented feature: {@value} - */ - int EXIT_UNIMPLEMENTED = 65; + * Exit code on a request where the destination has not changed + * and (somehow) the command specified that this is an error. + * That is, this exit code is somehow different from a "success" + * : {@value} + * <p> + * <code>304 Not Modified </code> + */ + int EXIT_NOT_MODIFIED = 34; /** - * service entered the failed state: {@value} + * Exit code when the command line doesn't parse: {@value}, or + * when it is otherwise invalid. + * <p> + * <code>400 BAD REQUEST</code> */ - int EXIT_YARN_SERVICE_FAILED = 66; + int EXIT_COMMAND_ARGUMENT_ERROR = 40; /** - * service was killed: {@value} + * The request requires user authentication: {@value} + * <p> + * <code>401 Unauthorized</code> */ - int EXIT_YARN_SERVICE_KILLED = 67; - + int EXIT_UNAUTHORIZE = 41; + /** - * timeout on monitoring client: {@value} + * Forbidden action: {@value} + * <p> + * <code>403: Forbidden</code> */ - int EXIT_TIMED_OUT = 68; - + int EXIT_FORBIDDEN = 43; + /** - * service finished with an error: {@value} + * Something was not found: {@value} + * <p> + * <code>404: NOT FOUND</code> */ - int EXIT_YARN_SERVICE_FINISHED_WITH_ERROR = 69; + int EXIT_NOT_FOUND = 44; /** - * the application instance is unknown: {@value} + * The operation is not allowed: {@value} + * <p> + * <code>405: NOT ALLOWED</code> */ - int EXIT_UNKNOWN_INSTANCE = 70; + int EXIT_OPERATION_NOT_ALLOWED = 45; /** - * the application instance is in the wrong state for that operation: {@value} + * The command is somehow not acceptable: {@value} + * <p> + * <code>406: NOT ACCEPTABLE</code> */ - int EXIT_BAD_STATE = 71; + int EXIT_NOT_ACCEPTABLE = 46; /** - * A spawned master process failed + * Exit code on connectivity problems: {@value} + * <p> + * <code>408: Request Timeout</code> */ - int EXIT_PROCESS_FAILED = 72; + int EXIT_CONNECTIVITY_PROBLEM = 48; /** - * The instance could not be deployed; too many containers were - * failing or some other threshold was reached + * The request could not be completed due to a conflict with the current + * state of the resource. {@value} + * <p> + * <code>409: conflict</code> */ - int EXIT_DEPLOYMENT_FAILED = 73; + int EXIT_CONFLICT = 49; /** - * The application is live -and the requested operation - * does not work if the cluster is running + * internal error: {@value} + * <p> + * <code>500 Internal Server Error</code> */ - int EXIT_APPLICATION_IN_USE = 74; + int EXIT_INTERNAL_ERROR = 50; /** - * There already is an application instance of that name - * when an attempt is made to create a new instance + * Unimplemented feature: {@value} + * <p> + * <code>501: Not Implemented</code> */ - int EXIT_INSTANCE_EXISTS = 75; - + int EXIT_UNIMPLEMENTED = 51; + /** - * The resource was not found - */ - int EXIT_NOT_FOUND = 77; - + * Service Unavailable; it may be available later: {@value} + * <p> + * <code>503 Service Unavailable</code> + */ + int EXIT_SERVICE_UNAVAILABLE = 53; + + /** + * The application does not support, or refuses to support this version: {@value}. + * If raised, this is expected to be raised server-side and likely due + * to client/server version incompatibilities. + * <p> + * <code> 505: Version Not Supported</code> + */ + int EXIT_UNSUPPORTED_VERSION = 55; + + /** + * Exit code when an exception was thrown from the service: {@value} + * <p> + * <code>5XX</code> + */ + int EXIT_EXCEPTION_THROWN = 56; + + /** + * service entered the failed state: {@value} + */ + int EXIT_YARN_SERVICE_FAILED = 65; + + /** + * service was killed: {@value} + */ + int EXIT_YARN_SERVICE_KILLED = 66; + + /** + * timeout on monitoring client: {@value} + */ + int EXIT_TIMED_OUT = 67; + + /** + * service finished with an error: {@value} + */ + int EXIT_YARN_SERVICE_FINISHED_WITH_ERROR = 68; + + /** + * the application instance is unknown: {@value} + */ + int EXIT_UNKNOWN_INSTANCE = 69; + + /** + * the application instance is in the wrong state for that operation: {@value} + */ + int EXIT_BAD_STATE = 70; + + /** + * A spawned master process failed + */ + int EXIT_PROCESS_FAILED = 71; + + /** + * The instance failed -too many containers were + * failing or some other threshold was reached + */ + int EXIT_DEPLOYMENT_FAILED = 72; + + /** + * The application is live -and the requested operation + * does not work if the cluster is running + */ + int EXIT_APPLICATION_IN_USE = 73; + + /** + * There already is an application instance of that name + * when an attempt is made to create a new instance + */ + int EXIT_INSTANCE_EXISTS = 75; + + /** + * Exit code when the configurations in valid/incomplete: {@value} + */ + int EXIT_BAD_CONFIGURATION = 77; + ## Other exit codes YARN itself can fail containers, here are some of the causes we've seen Modified: incubator/slider/site/trunk/content/docs/manpage.md URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/manpage.md?rev=1632431&r1=1632430&r2=1632431&view=diff ============================================================================== --- incubator/slider/site/trunk/content/docs/manpage.md (original) +++ incubator/slider/site/trunk/content/docs/manpage.md Thu Oct 16 20:22:57 2014 @@ -112,13 +112,13 @@ COMMANDS -### `build <name>` +### `slider build <name>` Build an instance of the given name, with the specific options. It is not started; this can be done later with a `thaw` command. -### `create <name>` +### `slider create <name>` Build and run an application instance of the given name