HBase shell 退格后崩溃

HBase shell crash after backspace

我是 运行 HBase 在 docker 容器中。 版本是 1.2.4

基本基于

https://github.com/dajobe/hbase-docker

当我执行以下操作时:

1) 构建镜像:docker build -t hbase-docker .

2)启动容器:./start-hbase.sh

3) 进入容器:docker exec -it hbase bash

4) 打开 HBase shell: hbase shell

5) 然后如果我输入内容并按退格键,它会崩溃并显示以下内容:

hbase(main):001:0> ConsoleReader.java:1414:in `backspace': java.lang.ArithmeticException: / by zero
    from ConsoleReader.java:1436:in `backspace'
    from ConsoleReader.java:628:in `readLine'
    from ConsoleReader.java:457:in `readLine'
    from Readline.java:237:in `s_readline'
    from Readline$s$s_readline.gen:65535:in `call'
    from CachingCallSite.java:332:in `cacheAndCall'
    ...
    ...

知道如何使退格键起作用并防止这种情况发生吗?! 谢谢。

这是 GUI 问题,您需要将终端 window 调整到最大尺寸。

ssh 到您的 docker 容器或以浏览模式连接到它并使用 -

检查为终端设置的列数

stty -a

你会在输出中看到类似下面的内容 -

speed 38400 baud; rows 39; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;

当列数设置为零时,您的 shell 可能会崩溃,这是一个已知的 jLine 错误。检查以下链接以供参考 - https://github.com/jruby/jruby/issues/151, https://github.com/sbt/sbt/issues/714

要解决此问题,只需将列数设置为 > 0,如下所示 -

stty columns 50