@author Generated from Forte @since 19-Nov-2008
This is the runnable class which starts the Serving Layer and its Tomcat-based HTTP server. It is started with {@link #call()} and can be shut down with {@link #close()}. This implementation is used both in stand-alone local mode, and in a distributed mode cooperating with a Computation Layer.
This program instantiates a Tomcat-based HTTP server exposing a REST-style API. It is available via HTTP, or HTTPS as well if {@link RunnerConfiguration#getKeystoreFile()} is set. It can also be passwordprotected by setting {@link RunnerConfiguration#getUserName()} and{@link RunnerConfiguration#getPassword()}.
{@link Runner} is configured by {@link RunnerConfiguration} but when run as a command-line program,it is configured via a set of analogous flags:
When run in local mode, the Serving Layer instance will compute a model locally and save it as the file {@code model.bin.gz} in the {@code --localInputDir} directory. It will be updated when the model is rebuilt.If the file is present at startup, it will be read to restore the server state, rather than re-reading CSV input in the directory and recomputing the model. Thus the file can be saved and restored as a way of preserving and recalling the server's state of learning.
Example of running in local mode:
{@code java -jar myrrix-serving-x.y.jar --port 8080}
(with an example of JVM tuning flags:)
{@code java -Xmx1g -XX:NewRatio=12 -XX:+UseParallelOldGC -jar myrrix-serving-x.y.jar --port 8080}
Finally, some more advanced tuning parameters are available. These are system parameters, set with {@code -Dproperty=value}.
configure()
is guaranteed to be called before any other method on the runner. A runner must start in the NOT_RUNNING state. At that point, the deploy()
method will be called once for each deployment file. These deployment files are typically in the form of zip files. After all deployment files are written, the start()
method will be called. At this point, the runner should attempt to start up. At some point after the runner is started, the stop()
method will be called to stop the given runner.
@author jkaplan
Runner
runs tests and notifies a {@link org.junit.runner.notification.RunNotifier}of significant events as it does so. You will need to subclass Runner
when using {@link org.junit.runner.RunWith} to invoke a custom runner. When creatinga custom runner, in addition to implementing the abstract methods here you must also provide a constructor that takes as an argument the {@link Class} containingthe tests. The default runner implementation guarantees that the instances of the test case class will be constructed immediately before running the test and that the runner will retain no reference to the test case instances, generally making them available for garbage collection. @see org.junit.runner.Description @see org.junit.runner.RunWith @since 4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|