slackwinner commented on a change in pull request #1910:
URL: https://github.com/apache/accumulo/pull/1910#discussion_r583734216
##########
File path: assemble/bin/accumulo
##########
@@ -58,6 +58,18 @@ function main() {
echo "$CLASSPATH"
exit 0
fi
+
+ # Set up path variable for default import config file
+ export jShellPath="$conf/jshell-init.jsh"
+
+ if [[ $cmd == "jshell" ]]; then
+ shift
+ if [[ -f "$jShellPath" ]]; then
+ exec "$cmd" --startup DEFAULT "$jShellPath" "$@"
Review comment:
For the DEFAULT script, I originally left that as a start up parameter
to ensure the user can see the default import library and the Accumulo API when
they first boot up JShell. I believe having two start-up statements should do
the trick and I do see the results you are getting from my end. Also I believe
I found a work around regarding the Scanner. Whenever a Scanner is defined, we
need to explicitly specify which Scanner we are referring to. For example:
**Referencing Accumulo Scanner:**
org.apache.accumulo.core.client.Scanner scan =
client.createScanner("GothamPD", Authorizations.EMPTY);
**Referencing Java Scanner:**
java.util.Scanner myObj = new java.util.Scanner(System.in);
I created a Java test code where one function uses the Accumulo Scanner and
another function uses the Java Scanner. I then executed the code in JShell with
Accumulo and both functions where able to execute with no issues.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]