This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluo-uno.git


The following commit(s) were added to refs/heads/main by this push:
     new 1cf47c8  Add jshell cmd option to uno (#294)
1cf47c8 is described below

commit 1cf47c8ded1a894c09ee48a15587634d2215bee0
Author: Daniel Roberts <ddani...@gmail.com>
AuthorDate: Tue Jul 11 01:01:12 2023 -0400

    Add jshell cmd option to uno (#294)
    
    Adds a cmd line option to uno for starting an Accumulo JShell session.
---
 README.md            | 5 +++++
 bin/impl/commands.sh | 6 ++++++
 bin/uno              | 2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 88e8671..4f65439 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,11 @@ and password `secret` (set in the `uno.conf` file). 
Therefore, the shell can be
 accumulo shell -u root -p secret
 ```
 
+Starting with Accumulo 2.1, a Jshell session can also be used.
+```
+./bin/uno jshell
+```
+
 When you're all done testing out Accumulo you can clean up:
 ```
 ./bin/uno wipe
diff --git a/bin/impl/commands.sh b/bin/impl/commands.sh
index 5ca3e90..f8c9d51 100755
--- a/bin/impl/commands.sh
+++ b/bin/impl/commands.sh
@@ -279,6 +279,11 @@ function uno_ashell_main() {
   "$ACCUMULO_HOME"/bin/accumulo shell -u "$ACCUMULO_USER" -p 
"$ACCUMULO_PASSWORD" "$@"
 }
 
+function uno_jshell_main() {
+  check_dirs ACCUMULO_HOME || return 1
+  "$ACCUMULO_HOME"/bin/accumulo jshell "$@"
+}
+
 function uno_zk_main() {
   check_dirs ZOOKEEPER_HOME  || return 1
   "$ZOOKEEPER_HOME"/bin/zkCli.sh "$@"
@@ -327,6 +332,7 @@ Possible commands:
   status                 Check if Accumulo, Hadoop, or Zookeeper are running.
   kill                   Kills all processes
   ashell                 Runs the Accumulo shell
+  jshell                 Runs JShell with Accumulo properties
   zk                     Connects to ZooKeeper CLI
   env                    Prints out shell configuration for PATH and common 
environment variables.
                          Add '--paths' or '--vars' command to limit what is 
printed.
diff --git a/bin/uno b/bin/uno
index 6a510aa..8f1c176 100755
--- a/bin/uno
+++ b/bin/uno
@@ -37,7 +37,7 @@ source "$bin"/impl/load-env.sh "$uno_cmd"
 source "$UNO_HOME"/bin/impl/commands.sh
 
 case "$uno_cmd" in
-  ashell|env|fetch|install|kill|run|setup|start|status|stop|version|wipe|zk)
+  
ashell|env|fetch|install|jshell|kill|run|setup|start|status|stop|version|wipe|zk)
     "uno_${uno_cmd}_main" "$@"
     ;;
   *)

Reply via email to