首页 > 解决方案 > Hbase 远程 shell 命令

问题描述

我想在远程服务器中创建一个 hbase shell,如下所示

[root@localhost ~]#` ssh root@<hostname> " echo 'create '\'"sample'\'"','\'"cf'\'"' | hbase shell -n "`

Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will
likely be removed in a future release
19/06/28 07:25:55 INFO Configuration.deprecation: hadoop.native.lib is deprecated.
Instead, use io.native.lib.available
ERROR SyntaxError: stdin:1: syntax error, unexpected null

create 'sample',\cf'
                ^

任何人都可以帮我解决这个问题的语法。

提前致谢。

标签: regexlinuxshellhbase

解决方案


我已经用 EOF 选项解决了上述问题,如下所示

    ssh root@<hostname> <<-EOF
    echo " create 'table',schema "| hbase shell -n

EOF


推荐阅读