Hbase shell 远程命令

Hbase shell remote commands

如何在远程 运行 中执行此命令 shell ?

ssh namenode1 "su - hbase -c 'echo "create_namespace 'toto'" | hbase shell -n'"

这行不通:

ERROR NameError: undefined local variable or method `toto' for #<Object:0x1d4f5506>

谢谢

好的,我找到了,这里是答案:

ssh namenode01 "su - hbase -c \"echo 'create_namespace '\'"toto2'\'"' | hbase shell -n\""

感谢您的帮助!