You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/07/15 17:11:53 UTC

[GitHub] [accumulo] Manno15 opened a new pull request #2202: Fix initialize.java by using terminalBuilder instead of default terminal

Manno15 opened a new pull request #2202:
URL: https://github.com/apache/accumulo/pull/2202


   While looking at https://issues.apache.org/jira/browse/ACCUMULO-3694 and testing the 'accumulo init --reset-security' feature, I ran into an error related to jline3 and how LineReader uses a default terminal and terminal type if none is specified.  A terminal object will now be created in the same way it is done in the shell.
   
   
   
   Error:
   ![image](https://user-images.githubusercontent.com/29436247/125827524-51c642f9-5eff-4434-bb01-e0b48e8e8f24.png)
   


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] Manno15 merged pull request #2202: Fix initialize.java by using terminalBuilder instead of default terminal

Posted by GitBox <gi...@apache.org>.
Manno15 merged pull request #2202:
URL: https://github.com/apache/accumulo/pull/2202


   


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on a change in pull request #2202: Fix initialize.java by using terminalBuilder instead of default terminal

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #2202:
URL: https://github.com/apache/accumulo/pull/2202#discussion_r670715479



##########
File path: server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
##########
@@ -143,12 +145,14 @@
   private static final String TABLE_TABLETS_TABLET_DIR = "table_info";
 
   private static LineReader reader = null;
+  private static Terminal terminal = null;
   private static ZooReaderWriter zoo = null;
 
   private static LineReader getLineReader() throws IOException {
-    if (reader == null) {
-      reader = LineReaderBuilder.builder().build();
-    }
+    if (terminal == null)
+      terminal = TerminalBuilder.builder().jansi(false).build();
+    if (reader == null)
+      reader = LineReaderBuilder.builder().terminal(terminal).build();

Review comment:
       I noticed there's a few places in our code, and I think this is one of them, where we don't really need to use a JLine terminal or reader at all. Really, we don't have a need to use it outside of accumulo-shell at all. But, I'm happy to have this change if it fixes the immediate bug. I opened #2203  to address this separately.




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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org