ndimiduk commented on pull request #3224:
URL: https://github.com/apache/hbase/pull/3224#issuecomment-832063003


   > Could you please provide some examples on how to make use of this jshell? 
It is just a standalone process? Not inside a master or regionserver process?
   
   Sure. I see this being as a more advanced feature, maybe a developer 
feature. I'm not really sure who the intended audience of the `jshell` is from 
JDK perspective...
   
   The patch as I've posted provides an interactive environment with HBase 
classes loaded. It is the equivalent of a Ruby IRB session, without all of the 
helpful DSL code we have that makes the `hbase shell` experience. Unlike that 
IRB, this is a Java language experience, not a Ruby language experience.
   
   This is a stand-alone process that is run by a user on-demand. It does not 
impact any of our existing daemon processes.
   
   Here's an example of how we might update our examples in the book from being 
code snippets to being jshell snippets,
   
   ```
   $ ./bin/hbase jshell
   |  Welcome to JShell -- Version 11.0.10
   |  For an introduction type: /help intro
   
   jshell> import org.apache.hadoop.hbase.client.*;
   
   jshell> ConnectionFactory.createAsyncConnection()
      ...>       .thenApply(AsyncConnection::getAdmin)
      ...>       .thenCompose(AsyncAdmin::getMaster)
      ...>       .get()
   2021-05-04T09:00:17,827 WARN  [main] util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   $2 ==> localhost,16000,1620143354294
   ```


-- 
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]


Reply via email to