shell - 退格后 HBase shell 崩溃

标签 shell docker hbase apache-zookeeper

我在 docker 容器中运行 HBase。
版本是 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'
    ...
    ...

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

最佳答案

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

关于shell - 退格后 HBase shell 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49649449/

相关文章:

Linux 网络监听器

bash - 什么在 Bash 中启动新的子 shell?

docker - 有没有办法将 docker-compose 中的扩展字段与 docker secret 一起使用?

maven - 如何为 docker shell gitlab runner 安装 maven

database - 具有hive客户端模式的kylin无法访问远程数据库

linux - 尝试获取具有最大行数的文件以使用行号打印

linux - 为什么我的 shell 命令在提示符下运行,而不是 bash 脚本?

hbase - 如何在hbase表中添加列而不添加列族

docker - 无法在Win 7 64位奇怪的虚拟盒子错误中运行boot2docker

scala - 编译 scala 时,对象 hbase 不是包 org.apache.hadoop 的成员