You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/09/14 22:58:20 UTC
[incubator-nlpcraft] branch NLPCRAFT-108 updated: Update
NCCommandLine.scala
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-108
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-108 by this push:
new d6f8ec5 Update NCCommandLine.scala
new d3956d6 Merge branch 'NLPCRAFT-108' of https://github.com/apache/incubator-nlpcraft into NLPCRAFT-108
d6f8ec5 is described below
commit d6f8ec51aa00787226982d6c82bd9e1370448749
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Mon Sep 14 15:57:37 2020 -0700
Update NCCommandLine.scala
---
.../model/tools/cmdline/NCCommandLine.scala | 55 +++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
index a4e8af0..c6d7ab9 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
@@ -91,7 +91,7 @@ object NCCommandLine extends App {
Command(
id = "start-server",
names = Seq("start-server"),
- synopsis = s"Starts REST server.",
+ synopsis = s"Starts local REST server.",
desc = Some(
s"REST server is started in the external JVM process with both stdout and stderr piped out into log file."
),
@@ -142,6 +142,59 @@ object NCCommandLine extends App {
)
),
Command(
+ id = "stop-server",
+ names = Seq("stop-server"),
+ synopsis = s"Stops local REST server.",
+ desc = Some(
+ s"Local REST server must be started via $SCRIPT_NAME or ."
+ ),
+ body = cmdStartServer,
+ params = Seq(
+ Parameter(
+ id = "config",
+ names = Seq("--config", "-c"),
+ valueDesc = Some("{path}"),
+ optional = true,
+ desc =
+ "Configuration absolute file path. Server will automatically look for 'nlpcraft.conf' " +
+ "configuration file in the same directory as NLPCraft JAR file. If the configuration file has " +
+ "different name or in different location use this parameter to provide an alternative path. " +
+ "Note that the REST server and the data probe can use the same file for their configuration."
+ ),
+ Parameter(
+ id = "igniteConfig",
+ names = Seq("--ignite-config", "-i"),
+ valueDesc = Some("{path}"),
+ optional = true,
+ desc =
+ "Apache Ignite configuration absolute file path. Note that Apache Ignite is used as a cluster " +
+ "computing plane and a default distributed storage. REST server will automatically look for " +
+ "'ignite.xml' configuration file in the same directory as NLPCraft JAR file. If the " +
+ "configuration file has different name or in different location use this parameter to " +
+ "provide an alternative path."
+ ),
+ Parameter(
+ id = "outputPath",
+ names = Seq("--output-path", "-o"),
+ valueDesc = Some("{path}"),
+ optional = true,
+ desc =
+ "File path for both REST server stdout and stderr output. If not provided, the REST server" +
+ s"output will be piped into '$${USER_HOME}/.nlpcraft/server-output.txt' file."
+ )
+ ),
+ examples = Seq(
+ Example(
+ code = s"$$ $SCRIPT_NAME start-server",
+ desc = "Starts REST server with default configuration."
+ ),
+ Example(
+ code = s"$$ $SCRIPT_NAME start-server -c=/opt/nlpcraft/nlpcraft.conf",
+ desc = "Starts REST server with alternative configuration file."
+ )
+ )
+ ),
+ Command(
id = "help",
names = Seq("help", "?"),
synopsis = s"Displays manual page for '$SCRIPT_NAME'.",